]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If not doing DHCP or DHCP6, disable the DNS requirement in the RA to fork.
authorRoy Marples <roy@marples.name>
Wed, 22 Oct 2014 08:54:09 +0000 (08:54 +0000)
committerRoy Marples <roy@marples.name>
Wed, 22 Oct 2014 08:54:09 +0000 (08:54 +0000)
dhcpcd.c

index 7e1844c5f034ef547c6c95e1620bcc7de412ef18..b62546f702a79d4596a6ddc743aca2fbf3c84b2a 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -368,14 +368,20 @@ configure_interface1(struct interface *ifp)
        if (ifo->metric != -1)
                ifp->metric = (unsigned int)ifo->metric;
 
+       if (!(ifo->options & DHCPCD_IPV4))
+               ifo->options &= ~(DHCPCD_DHCP | DHCPCD_IPV4LL);
+
        if (!(ifo->options & DHCPCD_IPV6))
-               ifo->options &= ~DHCPCD_IPV6RS;
+               ifo->options &= ~(DHCPCD_IPV6RS | DHCPCD_DHCP6);
 
        if (ifo->options & DHCPCD_SLAACPRIVATE)
                ifo->options |= DHCPCD_IPV6RA_OWN;
 
        /* We want to disable kernel interface RA as early as possible. */
        if (ifo->options & DHCPCD_IPV6RS) {
+               /* 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,
                    ifp->ctx->options & DHCPCD_IPV6RA_OWN ? 1 : 0);
                ra_iface = if_checkipv6(ifp->ctx, ifp,