From 3e076cf8b1eba4937e1462d2ca34b9a65f500aff Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 27 Apr 2017 15:37:14 +0200 Subject: 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 --- src/devices/nm-device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/devices/nm-device.c') 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); -- cgit v1.2.1