diff options
| author | Roy Marples <roy@marples.name> | 2012-07-13 08:22:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2012-07-13 08:22:04 +0000 |
| commit | bde566f574065f5212f7977c43bf9104077a7059 (patch) | |
| tree | 01b9c5ca8cfc72d215dd934bca292e34660754f1 /dhcpcd.c | |
| parent | 8ac16c4bb23e4b658b54d35cd323d61b59a6b085 (diff) | |
| download | dhcpcd-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.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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); |
