mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 12:50:17 +01:00
device: let slaves wait in IP_CONFIG until master is ready
We call nm_device_activate_stage3_ipX_start() in various places, e.g. after a carrier change or when a master enslaves a new device to configure IP for the device. If the device is a slave in state IP_CONFIG, this makes it transition to IP_CHECK, while it should stay in IP_CONFIG until the master becomes ready. When the master is ready, it will move slaves directly to SECONDARIES, skipping IP configuration entirely.
This commit is contained in:
parent
f5d29e6f61
commit
41f6540afd
1 changed files with 12 additions and 0 deletions
|
|
@ -7775,6 +7775,12 @@ nm_device_activate_stage3_ip4_start (NMDevice *self)
|
|||
|
||||
g_assert (priv->ip4_state == IP_WAIT);
|
||||
|
||||
/* Slaves stay in IP_CONFIG state until master is ready, and then
|
||||
* they go directly to SECONDARIES without configuring IPv4.
|
||||
*/
|
||||
if (nm_active_connection_get_master (NM_ACTIVE_CONNECTION (priv->act_request)))
|
||||
return TRUE;
|
||||
|
||||
_set_ip_state (self, AF_INET, IP_CONF);
|
||||
ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &ip4_config, &failure_reason);
|
||||
if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
|
||||
|
|
@ -7816,6 +7822,12 @@ nm_device_activate_stage3_ip6_start (NMDevice *self)
|
|||
|
||||
g_assert (priv->ip6_state == IP_WAIT);
|
||||
|
||||
/* Slaves stay in IP_CONFIG state until master is ready, and then
|
||||
* they go directly to SECONDARIES without configuring IPv6.
|
||||
*/
|
||||
if (nm_active_connection_get_master (NM_ACTIVE_CONNECTION (priv->act_request)))
|
||||
return TRUE;
|
||||
|
||||
_set_ip_state (self, AF_INET6, IP_CONF);
|
||||
ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip6_config_start (self, &ip6_config, &failure_reason);
|
||||
if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue