]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Linux: fix RA time unit confusion 12/head
authorAnders Kaseorg <andersk@mit.edu>
Wed, 1 Jan 2020 19:42:47 +0000 (11:42 -0800)
committerAnders Kaseorg <andersk@mit.edu>
Wed, 1 Jan 2020 19:48:37 +0000 (11:48 -0800)
commitdb00406100cd6bb0c1d53ade166cf9376030bcaa
tree315321ea31d284dc890c9abd88381bd14004bd66
parent81e7d0aa1a6cf70a7ad2635a7b6476efc2283d69
Linux: fix RA time unit confusion

The RA times are provided in milliseconds, but commit
569051c8aa8fc297eb8edb7bd228e0fd353d30c1 (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 <andersk@mit.edu>
src/if-linux.c