summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-02-18 13:43:37 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2016-02-18 14:18:07 +0100
commit86f005ea4b646b21ad2cf8ffdb783e72bff76065 (patch)
tree2d876c0e52e5d29adfd274867a8da2df0240397d
parentd48790cbec7d19b20a10e1627dd8ee1c996425b1 (diff)
downloadNetworkManager-86f005ea4b646b21ad2cf8ffdb783e72bff76065.tar.gz
device: fix assertion on unmanaged_mask for slave devices
When executing these commands: ip link add br0 type bridge ip link set dev br0 up ip link add dummy1 type dummy ip link set dev dummy1 up ip addr add 1.1.1.1/24 dev br0 brctl addif br0 dummy1 sleep 1 ip link del br0 ip link del dummy1 the following assertion was failing: nm_device_master_release_one_slave: runtime check failed: (NM_FLAGS_HAS (slave_priv->unmanaged_mask, NM_UNMANAGED_IS_SLAVE)) #0 g_logv() #1 g_log() #2 g_warn_message() #3 nm_device_master_release_one_slave() #4 nm_device_cleanup() #5 _set_state_full() #6 nm_device_state_changed() #7 nm_device_unrealize() #8 _platform_link_cb_idle() #9 g_main_context_dispatch() #10 g_main_context_dispatch() #11 g_main_context_iterate() #12 g_main_loop_run() #13 main() Upon slave removal we unrealize the device, resetting the unmanaged flags to NM_UNMANAGED_PLATFORM_INIT, then we clean up the device and call nm_device_master_release_one_slave(), which asserts the presence of NM_UNMANAGED_IS_SLAVE flag cleared just before. Drop the check. Fixes: 87a3df2e572ed47b5f76f6d1cad63ce622296e21
-rw-r--r--src/devices/nm-device.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 21e653df43..2389015528 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1185,8 +1185,6 @@ nm_device_master_release_one_slave (NMDevice *self, NMDevice *slave, gboolean co
* when slaves change.
*/
nm_device_update_hw_address (self);
-
- g_warn_if_fail (NM_FLAGS_HAS (slave_priv->unmanaged_mask, NM_UNMANAGED_IS_SLAVE));
nm_device_set_unmanaged_by_flags (slave, NM_UNMANAGED_IS_SLAVE, NM_UNMAN_FLAG_OP_FORGET, NM_DEVICE_STATE_REASON_REMOVED);
}