From: Roy Marples Date: Thu, 5 Jun 2014 12:33:18 +0000 (+0000) Subject: If we can turn off IPv6 auto link-addr in the kernel, lets do so X-Git-Tag: v6.4.0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=457dd83a486108e52d74875f80f0154e2a3c98de;p=thirdparty%2Fdhcpcd.git If we can turn off IPv6 auto link-addr in the kernel, lets do so to ensure we have the best chance of generating our private link-addr. --- diff --git a/if-bsd.c b/if-bsd.c index 51786481..9a6e4864 100644 --- a/if-bsd.c +++ b/if-bsd.c @@ -1108,6 +1108,34 @@ if_checkipv6(struct dhcpcd_ctx *ctx, const char *ifname, int own) } #endif +#ifdef ND6_IFF_AUTO_LINKLOCAL + if (own) { + int all; + + all = get_if_nd6_flag(ifname, ND6_IFF_AUTO_LINKLOCAL); + if (all == -1) + syslog(LOG_ERR, + "%s: get_if_nd6_flag: " + "ND6_IFF_AUTO_LINKLOCAL: %m", + ifname); + else if (all != 0) { + syslog(LOG_DEBUG, + "%s: disabling Kernel IPv6 " + "auto link-local support", + ifname); + if (del_if_nd6_flag(ifname, + ND6_IFF_AUTO_LINKLOCAL) == -1) + { + syslog(LOG_ERR, + "%s: del_if_nd6_flag: " + "ND6_IFF_AUTO_LINKLOCAL: %m", + ifname); + return -1; + } + } + } +#endif + #ifdef ND6_IFF_OVERRIDE_RTADV override = get_if_nd6_flag(ifname, ND6_IFF_OVERRIDE_RTADV); if (override == -1)