summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-04-27 15:37:14 +0200
committerLubomir Rintel <lkundrak@v3.sk>2017-04-27 15:41:19 +0200
commit3e076cf8b1eba4937e1462d2ca34b9a65f500aff (patch)
tree616beaa92ab9a4ffceb5cc1cefc2b4eac552ac3e
parentd19553392bca006174c2fe05119fb072663a8042 (diff)
downloadNetworkManager-3e076cf8b1eba4937e1462d2ca34b9a65f500aff.tar.gz
device: disable delegating prefixes to the device when the IPv6 config is removed
Fixes a crash where the default DNS domain to be announced together with the prefixes to be delegated is updated at the same time the device is being unrealized. https://bugzilla.redhat.com/show_bug.cgi?id=1425818
-rw-r--r--src/devices/nm-device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 2b17db97b6..d49e36b34b 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -9895,6 +9895,7 @@ nm_device_set_ip6_config (NMDevice *self,
} else if (old_config) {
has_changes = TRUE;
priv->ip6_config = NULL;
+ priv->needs_ip6_subnet = FALSE;
_LOGD (LOGD_IP6, "ip6-config: clear IP6Config instance (%s)",
nm_exported_object_get_path (NM_EXPORTED_OBJECT (old_config)));
}
@@ -11956,7 +11957,9 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type)
g_slist_free_full (priv->vpn6_configs, g_object_unref);
priv->vpn6_configs = NULL;
- priv->needs_ip6_subnet = FALSE;
+ /* We no longer accept the delegations. nm_device_set_ip6_config(NULL)
+ * above disables them. */
+ nm_assert (priv->needs_ip6_subnet == FALSE);
if (priv->act_request) {
nm_active_connection_set_default (NM_ACTIVE_CONNECTION (priv->act_request), FALSE);