diff options
author | Thomas Haller <thaller@redhat.com> | 2016-04-15 20:53:15 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-04-22 16:14:49 +0200 |
commit | 89936be5815f0353bb0c60ccf1734f316159379e (patch) | |
tree | b715006c055de6d4f10730b93e03ccefe01fe711 | |
parent | 14ee0de9f071ed5438efe1c70d06d54a1a39f519 (diff) | |
download | NetworkManager-th/device-ip-config-on-link-up-rh1309899.tar.gz |
platform: ensure refetching routes when link goes downth/device-ip-config-on-link-up-rh1309899
It's not enough to consider IF_LOWER_UP flag. Instead,
the important flag is actually IF_UP.
Actually, I suspect that IF_LOWER_UP is not needed. But for
now leave it, in order not to break something.
-rw-r--r-- | src/platform/nm-linux-platform.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 4164e0c091..7bd9dbc92a 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -3314,9 +3314,14 @@ cache_pre_hook (NMPCache *cache, const NMPObject *old, const NMPObject *new, NMP if ( ops_type == NMP_CACHE_OPS_UPDATED && old && new /* <-- nonsensical, make coverity happy */ && old->_link.netlink.is_in_netlink - && NM_FLAGS_HAS (old->link.n_ifi_flags, IFF_LOWER_UP) && new->_link.netlink.is_in_netlink - && !NM_FLAGS_HAS (new->link.n_ifi_flags, IFF_LOWER_UP)) { + && ( ( NM_FLAGS_HAS (old->link.n_ifi_flags, IFF_UP) + && !NM_FLAGS_HAS (new->link.n_ifi_flags, IFF_UP)) + || ( NM_FLAGS_HAS (old->link.n_ifi_flags, IFF_LOWER_UP) + && !NM_FLAGS_HAS (new->link.n_ifi_flags, IFF_LOWER_UP)))) { + /* FIXME: I suspect that IFF_LOWER_UP must not be considered, and I + * think kernel does send RTM_DELROUTE events for IPv6 routes, so + * we might not need to refresh IPv6 routes. */ delayed_action_schedule (platform, DELAYED_ACTION_TYPE_REFRESH_ALL_IP4_ROUTES | DELAYED_ACTION_TYPE_REFRESH_ALL_IP6_ROUTES, |