mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-13 02:20:33 +01:00
core: fix attaching managed slaves to master devices (rh #1141266)
Broken by 25387cd1ff
When an activation request comes in via D-Bus for a slave, the
slave device's priv->master is set in stage1 in master_ready_cb().
Then nm_device_bring_up() is called on the slave, which triggers
link_changed_cb() and device_link_changed(). That then executes
this code:
if (priv->master)
nm_device_enslave_slave (priv->master, self, NULL);
which enslaves the slave, but due to the NULL will not configure
the slave.
This code was only meant to be run for externally triggered
master/slave changes.
This commit is contained in:
parent
7d5c0db53a
commit
9337a13a87
1 changed files with 4 additions and 3 deletions
|
|
@ -1219,10 +1219,11 @@ device_link_changed (NMDevice *self, NMPlatformLink *info)
|
|||
/* Update slave status for external changes */
|
||||
if (priv->enslaved && info->master != nm_device_get_ifindex (priv->master))
|
||||
nm_device_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_NONE);
|
||||
if (info->master && !priv->enslaved)
|
||||
if (info->master && !priv->enslaved) {
|
||||
device_set_master (self, info->master);
|
||||
if (priv->master)
|
||||
nm_device_enslave_slave (priv->master, self, NULL);
|
||||
if (priv->master)
|
||||
nm_device_enslave_slave (priv->master, self, NULL);
|
||||
}
|
||||
|
||||
if (klass->link_changed)
|
||||
klass->link_changed (self, info);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue