From d19cbabc141f485549a1eb7dbf94d167e3cbfa2e Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 9 Nov 2015 11:44:09 +0100 Subject: [PATCH] nm-device: only progress with ip-config if the device is still in IP_WAIT The device might be a slave and not need any L3 configuration in which case it will move to IP_DONE: Running test bridge_manipulation_with_1000_slaves ... [1446834482.545396] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 12-dhcpd succeeded [1446834482.545404] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 20-chrony succeeded [1446834482.545481] [devices/nm-device.c:5374] nm_device_activate_stage3_ip_config_start(): [0x7fc77e1c0fc0] (port120): Activation: Stage 3 of 5 (IP Configure Start) started... (port120): device state change: config -> ip-config (reason 'none') [50 70 0] [1446834482.545578] [devices/nm-device.c:1683] slave_state_changed(): [0x7fc77df77020] (bridge0): slave port120 state change 50 (config) -> 70 (ip-config) [1446834482.545629] [devices/nm-device.c:7955] nm_device_add_pending_action(): [0x7fc77e1c0fc0] (port120): add_pending_action (2): 'queued state change to secondaries' [1446834482.545642] [devices/nm-device.c:8806] nm_device_queue_state(): [0x7fc77e1c0fc0] (port120): queued state change to secondaries due to none (id 11380) ** NetworkManager:ERROR:devices/nm-device.c:5250:nm_device_activate_stage3_ip4_start: assertion failed: (priv->ip4_state == IP_WAIT) 5250 g_assert (priv->ip4_state == IP_WAIT); (gdb) print priv->ip4_state $1 = IP_DONE (gdb) print priv->master $3 = { ... master = 0x7fc77df77020, enslaved = 1, master_ready_handled = 1, master_ready_id = 0, is_master = 0, slaves = 0x0, ...} (cherry picked from commit f8973a7f4282d27a86239164e6ae121f0f7faabe) --- src/devices/nm-device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 2676636ebb..254b676b90 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5400,11 +5400,13 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) } /* IPv4 */ - if (!nm_device_activate_stage3_ip4_start (self)) + if ( nm_device_activate_ip4_state_in_wait (self) + && !nm_device_activate_stage3_ip4_start (self)) goto out; /* IPv6 */ - if (!nm_device_activate_stage3_ip6_start (self)) + if ( nm_device_activate_ip6_state_in_wait (self) + && !nm_device_activate_stage3_ip6_start (self)) goto out; nm_device_check_ip_failed (self, TRUE);