diff options
| author | Roy Marples <roy@marples.name> | 2018-02-02 11:24:58 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2018-02-02 11:24:58 +0000 |
| commit | 8f483d192082a953dd035f38ee4555735106f1fc (patch) | |
| tree | c88603ef9b0e5c2b04dcf0c820af0f6b77c92dcb /src/dhcpcd.c | |
| parent | ad85ee61b6205daa07452e8504492385411a4e65 (diff) | |
| download | dhcpcd-8f483d192082a953dd035f38ee4555735106f1fc.tar.xz | |
inet6: simplify setup of kernel
Rename if_checkipv6 to if_setup_inet6 so it's more descriptive.
simpify code as we don't really care about the result.
Restore the prior behavior of not disabling kernel RA handling
if dhcpcd is not doing it.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 7f3ef86b..d025ccdf 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -437,19 +437,15 @@ configure_interface1(struct interface *ifp) ifo->options &= ~(DHCPCD_IPV6RS | DHCPCD_DHCP6 | DHCPCD_WAITIP6); - /* We want to disable kernel interface RA as early as possible. */ + /* We want to setup INET6 on the interface as soon as possible. */ if (ifp->active == IF_ACTIVE_USER && - !(ifp->ctx->options & DHCPCD_DUMPLEASE)) + ifo->options & DHCPCD_IPV6 && + !(ifp->ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST))) { - int ra_global, ra_iface; - /* If not doing any DHCP, disable the RDNSS requirement. */ if (!(ifo->options & (DHCPCD_DHCP | DHCPCD_DHCP6))) ifo->options &= ~DHCPCD_IPV6RA_REQRDNSS; - ra_global = if_checkipv6(ifp->ctx, NULL); - ra_iface = if_checkipv6(ifp->ctx, ifp); - if (ra_global == -1 || ra_iface == -1) - ifo->options &= ~DHCPCD_IPV6RS; + if_setup_inet6(ifp); } #endif |
