device: don't remove the device from master if its link has no master

We only need to do that when we're replacing the master with a different
one. Just after the link creation is has no master and we'd remove it
from the master device here.
This commit is contained in:
Lubomir Rintel 2015-12-16 18:51:58 +01:00
parent 88f3aba9bf
commit 2e22880894

View file

@ -1406,6 +1406,9 @@ device_recheck_slave_status (NMDevice *self, const NMPlatformLink *plink)
g_return_if_fail (plink);
if (plink->master <= 0)
return;
if (priv->master) {
if ( plink->master > 0
&& plink->master == nm_device_get_ifindex (priv->master)) {