diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-08-16 15:44:24 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-30 17:38:37 +0100 |
commit | d7f7725ae8c965756902bd492bf2cf0834319548 (patch) | |
tree | 6f8d3f5b53318732f28b53363e0d4e498624c0e1 /src/nm-manager.c | |
parent | abaa8528667f683eaedc7974eb834cefa174862c (diff) | |
download | NetworkManager-d7f7725ae8c965756902bd492bf2cf0834319548.tar.gz |
manager: always update the device when the plink comes and goes
For some software devices, the platform link appears only after they've been
realized. Update their properties and let them know that the link has changed
so they can eventually proceed with activation.
Also, reset the properties (udi, iface, driver) that are set from the platform
link when the link goes away. At that point they don't reflect reality anymore.
Removes some code duplication too.
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r-- | src/nm-manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 647f0ddc2f..575a15e6c6 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2351,6 +2351,7 @@ platform_link_added (NMManager *self, /* Ignore the link added event since there's already a realized * device with the link's name. */ + nm_device_update_from_platform_link (candidate, plink); return; } else if (nm_device_realize_start (candidate, plink, @@ -2481,6 +2482,8 @@ _platform_link_cb_idle (PlatformLinkCbData *data) _LOG2W (LOGD_DEVICE, device, "failed to unrealize: %s", error->message); g_clear_error (&error); remove_device (self, device, FALSE, TRUE); + } else { + nm_device_update_from_platform_link (device, NULL); } } else { /* Hardware and external devices always get removed when their kernel link is gone */ |