summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-07-13 08:22:04 +0000
committerRoy Marples <roy@marples.name>2012-07-13 08:22:04 +0000
commitbde566f574065f5212f7977c43bf9104077a7059 (patch)
tree01b9c5ca8cfc72d215dd934bca292e34660754f1 /dhcpcd.c
parent8ac16c4bb23e4b658b54d35cd323d61b59a6b085 (diff)
downloaddhcpcd-bde566f574065f5212f7977c43bf9104077a7059.tar.xz
Disable kernel interface RA as early as possible on Linux.
Don't add duplicate interfaces to the restore kernel RA on Linux.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 4b318cac..06026c48 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -785,6 +785,12 @@ configure_interface1(struct interface *iface)
if (ifo->metric != -1)
iface->metric = ifo->metric;
+ /* We want to disable kernel interface RA as early as possible. */
+ if (options & DHCPCD_IPV6RS && ifo->options & DHCPCD_IPV6RS) {
+ if (check_ipv6(iface->name) != 1)
+ ifo->options &= ~DHCPCD_IPV6RS;
+ }
+
/* If we haven't specified a ClientID and our hardware address
* length is greater than DHCP_CHADDR_LEN then we enforce a ClientID
* of the hardware address family and the hardware address. */
@@ -1167,12 +1173,8 @@ start_interface(void *arg)
free(iface->state->offer);
iface->state->offer = NULL;
- if (options & DHCPCD_IPV6RS && ifo->options & DHCPCD_IPV6RS) {
- if (check_ipv6(iface->name) == 1)
- ipv6rs_start(iface);
- else
- ifo->options &= ~DHCPCD_IPV6RS;
- }
+ if (options & DHCPCD_IPV6RS && ifo->options & DHCPCD_IPV6RS)
+ ipv6rs_start(iface);
if (iface->state->arping_index < ifo->arping_len) {
start_arping(iface);