diff options
| author | Iain Lane <iain.lane@canonical.com> | 2018-10-03 09:30:23 +0100 |
|---|---|---|
| committer | Iain Lane <iain.lane@canonical.com> | 2018-10-03 09:33:16 +0100 |
| commit | 898733d427e7b640bab0ea0fa578b3224102fde2 (patch) | |
| tree | 91c16e4d9d2c363858d1c9ea8a937e0f2c25373a /src/nm-manager.c | |
| parent | 9ba7891e6e49755ef4f3c9e3ef424a9ef06cf58c (diff) | |
| parent | eca0cfe89a2a7ec88abe9c03075160f46b338137 (diff) | |
Merge tag 'debian/1.12.4-1' into cosmic
network-manager Debian release 1.12.4-1
Diffstat (limited to 'src/nm-manager.c')
| -rw-r--r-- | src/nm-manager.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 289dcf83..ad906169 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3008,10 +3008,21 @@ platform_link_added (NMManager *self, continue; if (nm_device_is_real (candidate)) { - /* Ignore the link added event since there's already a realized - * device with the link's name. + /* There's already a realized device with the link's name + * and a different ifindex. */ - nm_device_update_from_platform_link (candidate, plink); + if (nm_device_get_ifindex (candidate) <= 0) + nm_device_update_from_platform_link (candidate, plink); + else { + /* The ifindex of a device can't be changed after + * initialization because it is used as a key by + * the dns-manager. + */ + _LOGD (LOGD_DEVICE, "(%s): removing old device %p after ifindex change from %d to %d", + plink->name, candidate, nm_device_get_ifindex (candidate), ifindex); + remove_device (self, candidate, FALSE, TRUE); + goto add; + } return; } else if (nm_device_realize_start (candidate, plink, @@ -3031,6 +3042,7 @@ platform_link_added (NMManager *self, /* Try next unrealized device */ } +add: /* Try registered device factories */ factory = nm_device_factory_manager_find_factory_for_link_type (plink->type); if (factory) { |