mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 05:20:32 +01:00
core: don't fail IPv6 if otherconf/info-only DHCPv6 fails
Just like we don't fail IPv4 if DHCP fails to get DNS servers, don't fail IPv6 if we've already got an RA and for some reason DHCPv6 fails. otherconf/info-only DHCP is not mandatory, and lack of results thus should not fail the entire IPv6 config, since DNS servers can also be passed in the RA. RFC4861: 1-bit "Other configuration" flag. When set, it indicates that other configuration information is available via DHCPv6. Examples of such information are DNS-related information or information on other servers within the network.
This commit is contained in:
parent
ffb6df6f4a
commit
6551e9bbc4
1 changed files with 17 additions and 1 deletions
|
|
@ -2653,12 +2653,28 @@ static void
|
|||
dhcp6_timeout (NMDHCPClient *client, gpointer user_data)
|
||||
{
|
||||
NMDevice *device = NM_DEVICE (user_data);
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
|
||||
NMIP6Config *config;
|
||||
|
||||
g_return_if_fail (nm_device_get_act_request (device) != NULL);
|
||||
g_return_if_fail (nm_dhcp_client_get_ipv6 (client) == TRUE);
|
||||
|
||||
nm_dhcp_client_stop (client, FALSE);
|
||||
dhcp6_fail (device, TRUE);
|
||||
if (priv->dhcp6_mode == IP6_DHCP_OPT_MANAGED)
|
||||
dhcp6_fail (device, TRUE);
|
||||
else {
|
||||
/* not a hard failure; just live with the RA info */
|
||||
nm_dhcp6_config_reset (priv->dhcp6_config);
|
||||
if (priv->dhcp6_ip6_config)
|
||||
g_object_unref (priv->dhcp6_ip6_config);
|
||||
priv->dhcp6_ip6_config = NULL;
|
||||
|
||||
if (priv->ip6_state == IP_CONF) {
|
||||
config = nm_ip6_config_new ();
|
||||
nm_device_activate_schedule_ip6_config_result (device, config);
|
||||
g_object_unref (config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static NMActStageReturn
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue