From: Roy Marples Date: Tue, 4 Feb 2014 15:45:51 +0000 (+0000) Subject: Reset kernel RA flag correctly. X-Git-Tag: v6.3.0~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98c55ba576eb7109ab57e98196041d55a41446d6;p=thirdparty%2Fdhcpcd.git Reset kernel RA flag correctly. --- diff --git a/platform-bsd.c b/platform-bsd.c index 8e0f813d..ea346ae5 100644 --- a/platform-bsd.c +++ b/platform-bsd.c @@ -89,11 +89,12 @@ inet6_sysctl(int code, int val, int action) return val; } +static int kernel_ra_set; void restore_kernel_ra(void) { - if (options & DHCPCD_FORKED) + if (kernel_ra_set == 0 || options & DHCPCD_FORKED) return; syslog(LOG_INFO, "restoring Kernel IPv6 RA support"); if (set_inet6_sysctl(IPV6CTL_ACCEPT_RTADV, 1) == -1) @@ -142,6 +143,7 @@ check_ipv6(const char *ifname, int own) return ra; } ra = 0; + kernel_ra_set = 1; /* Flush the kernel knowledge of advertised routers * and prefixes so the kernel does not expire prefixes