Mercurial > hg > dhcpcd
changeset 2520:1d6444e11b21 draft
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.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 05 Jun 2014 12:33:18 +0000 |
| parents | 80278d0c53c3 |
| children | 1bea2300e658 |
| files | if-bsd.c |
| diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/if-bsd.c Thu Jun 05 11:38:04 2014 +0000 +++ b/if-bsd.c Thu Jun 05 12:33:18 2014 +0000 @@ -1108,6 +1108,34 @@ } #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)
