summaryrefslogtreecommitdiffstats
path: root/ipv6rs.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-03-07 10:06:45 +0000
committerRoy Marples <roy@marples.name>2012-03-07 10:06:45 +0000
commit61dd6cf9ab7dfbdf6dac4e4517517448c02003b2 (patch)
treea3a8c0c9033d800ab0e23e4fd699e6ca7c293ae3 /ipv6rs.c
parent59b38886f9e00950b4b83d67d115f3f8cd120f4f (diff)
downloaddhcpcd-61dd6cf9ab7dfbdf6dac4e4517517448c02003b2.tar.xz
Add an option to control dhcpcd forking or not if the RA does not contain
a RDNSS option. This involves changing our options to an unsigned long long so we can use more than 32 bits.
Diffstat (limited to 'ipv6rs.c')
-rw-r--r--ipv6rs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ipv6rs.c b/ipv6rs.c
index 4c5f67a8..999c4602 100644
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -468,7 +468,8 @@ ipv6rs_handledata(_unused void *arg)
'\0';
} else
opt = xstrdup(cbp);
- has_dns = 1;
+ if (lifetime > 0)
+ has_dns = 1;
}
op += sizeof(addr.s6_addr);
}
@@ -535,6 +536,10 @@ ipv6rs_handledata(_unused void *arg)
if (options & DHCPCD_TEST)
exit(EXIT_SUCCESS);
+ /* If we don't require RDNSS then set has_dns = 1 so we fork */
+ if (!(ifp->state->options->options & DHCPCD_IPV6RA_REQRDNSS))
+ has_dns = 1;
+
if (has_dns)
delete_q_timeout(0, handle_exit_timeout, NULL);
delete_timeouts(ifp, NULL);