mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 02:30:08 +01:00
platform: ensure refetching routes when link goes down
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.
This commit is contained in:
parent
35a7ea77b0
commit
02e84ba1e8
1 changed files with 7 additions and 2 deletions
|
|
@ -3301,9 +3301,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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue