Skip to content

Linux: fix RA time unit confusion#12

Merged
rsmarples merged 1 commit intoNetworkConfiguration:masterfrom
andersk:ra-time-units
Jan 1, 2020
Merged

Linux: fix RA time unit confusion#12
rsmarples merged 1 commit intoNetworkConfiguration:masterfrom
andersk:ra-time-units

Conversation

@andersk
Copy link
Contributor

@andersk andersk commented Jan 1, 2020

The RA times are provided in milliseconds, but commit 569051c (dhcpcd-8.1.3~18) “Linux: prefer ms RA times” incorrectly scaled them by an extra factor of 1000 before writing them to retrans_time_ms and base_reachable_time_ms. Instead, write the values in milliseconds directly to the *_ms files, and correctly convert to jiffies or seconds for the other files if necessary.

Fixes NixOS/nixpkgs#76710.

The RA times are provided in milliseconds, but commit
569051c (dhcpcd-8.1.3~18) “Linux:
prefer ms RA times” incorrectly scaled them by an extra factor of 1000
before writing them to retrans_time_ms and base_reachable_time_ms.
Instead, write the values in milliseconds directly to the *_ms files,
and correctly convert to jiffies or seconds for the other files if
necessary.

Fixes NixOS/nixpkgs#76710.

Signed-off-by: Anders Kaseorg <[email protected]>
@rsmarples
Copy link
Member

@andersk during merging this into dhcpcd-8, I think that converting to large timers to jiffies could overflow on 32-bit systems, so I've just removed the support for really old kernels in 2b18b85

andersk added a commit to andersk/nixpkgs that referenced this pull request Jan 1, 2020
Fixes NixOS#76710.  Submitted upstream as NetworkConfiguration/dhcpcd#12.

Signed-off-by: Anders Kaseorg <[email protected]>
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Jan 2, 2020
Fixes NixOS#76710.  Submitted upstream as NetworkConfiguration/dhcpcd#12.

Signed-off-by: Anders Kaseorg <[email protected]>
(cherry picked from commit e474db2)
rsmarples added a commit that referenced this pull request Jan 25, 2021
The RA times are provided in milliseconds, but commit
569051c (dhcpcd-8.1.3~18) “Linux:
prefer ms RA times” incorrectly scaled them by an extra factor of 1000
before writing them to retrans_time_ms and base_reachable_time_ms.
Instead, write the values in milliseconds directly to the *_ms files,
and correctly convert to jiffies or seconds for the other files if
necessary.

Signed-off-by: Anders Kaseorg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nixos.tests.ipv6.x86_64-linux fails blocking nixos channels

2 participants