diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-01-26 21:32:07 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-02-12 14:45:30 +0100 |
commit | afb244778952b7cfff515963daa516aa29a779c5 (patch) | |
tree | 5f981b3f8b8eb6cdc88eba44813e74b15e944eec | |
parent | 05a14d0818d638e686c424f1162dd3d781d40ed0 (diff) | |
download | NetworkManager-afb244778952b7cfff515963daa516aa29a779c5.tar.gz |
platform: always try to refetch new ethernet links
Due to a kernel bug [1], we sometimes receive spurious NEWLINK
messages after a wifi interface has disappeared. Since the link is not
present anymore we can't determine its type and thus it will show up
as a Ethernet one, with no address specified. Request the link again
to check if it really exists.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1302037
https://bugzilla.gnome.org/show_bug.cgi?id=761151
(cherry picked from commit 97be12b6625e738856814403195b60f7ebc13bfe)
-rw-r--r-- | src/platform/nm-linux-platform.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 6b9b3573d3..0375da944b 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -1909,6 +1909,19 @@ cache_pre_hook (NMPCache *cache, const NMPObject *old, const NMPObject *new, NMP DELAYED_ACTION_TYPE_REFRESH_LINK, GINT_TO_POINTER (new->link.ifindex)); } + if ( new->link.type == NM_LINK_TYPE_ETHERNET + && new->link.addr.len == 0) { + /* Due to a kernel bug, we sometimes receive spurious NEWLINK + * messages after a wifi interface has disappeared. Since the + * link is not present anymore we can't determine its type and + * thus it will show up as a Ethernet one, with no address + * specified. Request the link again to check if it really + * exists. https://bugzilla.redhat.com/show_bug.cgi?id=1302037 + */ + delayed_action_schedule (platform, + DELAYED_ACTION_TYPE_REFRESH_LINK, + GINT_TO_POINTER (new->link.ifindex)); + } } { /* on enslave/release, we also refresh the master. */ |