From: Roy Marples Date: Wed, 1 Jan 2020 22:52:43 +0000 (+0000) Subject: inet6: Adjust prior so that we don't support old kernels X-Git-Tag: v9.0.0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7045810f2f75e49fa978c79c085ad24de664f9;p=thirdparty%2Fdhcpcd.git inet6: Adjust prior so that we don't support old kernels Mulitplying retrans could overflow on 32-bit kernels with big timers, so just don't bother. --- diff --git a/src/if-linux.c b/src/if-linux.c index fe05901e..f67704bb 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -1948,22 +1948,14 @@ if_applyra(const struct ra *rap) error = -1; snprintf(path, sizeof(path), "%s/%s/retrans_time_ms", p_neigh, ifname); - if (if_writepathuint(ctx, path, rap->retrans) == -1) { - snprintf(path, sizeof(path), "%s/%s/retrans_time", - p_neigh, ifname); - /* Jiffies */ - if (if_writepathuint(ctx, path, rap->retrans * sysconf(_SC_CLK_TCK) / 1000) == -1) - error = -1; - } + if (if_writepathuint(ctx, path, rap->retrans) == -1) + error = -1; snprintf(path, sizeof(path), "%s/%s/base_reachable_time_ms", p_neigh, ifname); - if (if_writepathuint(ctx, path, rap->reachable) == -1) { - snprintf(path, sizeof(path), "%s/%s/base_reachable_time", - p_neigh, ifname); - if (if_writepathuint(ctx, path, rap->reachable / 1000) == -1) - error = -1; - } + if (if_writepathuint(ctx, path, rap->reachable) == -1) + error = -1; + return error; } diff --git a/src/ipv6nd.c b/src/ipv6nd.c index c2f592b0..0f9b050e 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -645,7 +645,7 @@ ipv6nd_applyra(struct dhcpcd_ctx *ctx, struct interface *ifp) return; state->retrans = rap->retrans; - if (if_applyra(rap) == -1) + if (if_applyra(rap) == -1 && errno != ENOENT) logerr(__func__); }