device: apply the iv6 configuration as soon as we get the RA

With DHCPv6 it might be quite some time (we may even time out) until we get all
the information to finish activation, but we already have the addresses and
routes.
This commit is contained in:
Lubomir Rintel 2016-01-14 20:42:01 +01:00
parent 3dc28b2b23
commit ad2584c375

View file

@ -5492,18 +5492,21 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self)
"Activation: Stage 3 of 5 (IP Configure Start) starting DHCPv6"
" as requested by IPv6 router...");
if (!dhcp6_start (self, FALSE, &reason)) {
if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_MANAGED)
if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_MANAGED) {
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
return;
}
}
return;
}
}
if (changed & NM_RDISC_CONFIG_HOP_LIMIT)
nm_platform_sysctl_set_ip6_hop_limit_safe (NM_PLATFORM_GET, nm_device_get_ip_iface (self), rdisc->hop_limit);
if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_NONE) {
if (changed & NM_RDISC_CONFIG_HOP_LIMIT)
nm_platform_sysctl_set_ip6_hop_limit_safe (NM_PLATFORM_GET, nm_device_get_ip_iface (self), rdisc->hop_limit);
if (changed & NM_RDISC_CONFIG_MTU)
priv->ip6_mtu = rdisc->mtu;
if (changed & NM_RDISC_CONFIG_MTU)
priv->ip6_mtu = rdisc->mtu;
}
nm_device_activate_schedule_ip6_config_result (self);
}