diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-09-24 16:02:37 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-09-24 16:32:40 +0200 |
commit | 13476519ebf648dbc5810e3fdd247ac5cca6c66d (patch) | |
tree | 37b90795ab89770a46f4b2a68c1cb5292174e8ca | |
parent | 3adeffe1f1c747b3845e815ba6bd1f151be83bcd (diff) | |
download | NetworkManager-jk/external-enslave-fix.tar.gz |
core: do not assert when a device is enslaved externallyjk/external-enslave-fix
Test case:
# ip link add name BR type bridge
# brctl addif BR eth0
Monitoring external master/slave changes was intruduced by
08e0cfb484dfc6aa6342871158ffe752c7c50f03.
-rw-r--r-- | src/devices/nm-device.c | 4 | ||||
-rw-r--r-- | src/nm-active-connection.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 8eb86d9294..9e8ef69103 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2943,8 +2943,6 @@ act_stage3_ip4_config_start (NMDevice *self, g_assert (connection); method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP4_CONFIG); - if (priv->master) - g_assert_cmpstr (method, ==, NM_SETTING_IP4_CONFIG_METHOD_DISABLED); if ( strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) != 0 && priv->is_master @@ -3948,8 +3946,6 @@ act_stage3_ip6_config_start (NMDevice *self, g_assert (connection); method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG); - if (priv->master) - g_assert_cmpstr (method, ==, NM_SETTING_IP6_CONFIG_METHOD_IGNORE); if ( strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) != 0 && priv->is_master diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 30e319b2e2..130b5229b0 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -365,11 +365,11 @@ device_master_changed (GObject *object, return; if (!nm_device_get_master (device)) return; + if (!nm_active_connection_get_master (self)) + return; g_signal_handlers_disconnect_by_func (device, G_CALLBACK (device_master_changed), self); master = nm_active_connection_get_master (self); - g_assert (master); - master_state = nm_active_connection_get_state (master); if (master_state >= NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) { /* Master failed before attaching the slave */ |