summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-10-22 08:54:09 +0000
committerRoy Marples <roy@marples.name>2014-10-22 08:54:09 +0000
commitd9b80fcda013b7fb637e5602e86207de1c01aa4e (patch)
tree1fd38b8a54886970e52dfcda9241e9e4c298e7c6 /dhcpcd.c
parent2bb3652962752ba049ea0d9e23503e58654cd589 (diff)
downloaddhcpcd-d9b80fcda013b7fb637e5602e86207de1c01aa4e.tar.xz
If not doing DHCP or DHCP6, disable the DNS requirement in the RA to fork.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 7e1844c5..b62546f7 100644
--- 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,