mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 19:10:31 +01:00
device: fix preserving the default-route during _cleanup_generic_post()
When we want to preserve the default-route on cleanup, we must first set it to assumed, before clearing it. Otherwise, NMDefaultRouteManager's update() will delete the default route. This is the oposite of the deconfigure case, where we first set it to !has && !assumed, to force the route-manager to delete the route.
This commit is contained in:
parent
b2f794fe1e
commit
4697376f99
1 changed files with 3 additions and 0 deletions
|
|
@ -10067,6 +10067,9 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type)
|
|||
if (cleanup_type == CLEANUP_TYPE_DECONFIGURE) {
|
||||
_update_default_route (self, AF_INET, FALSE, FALSE);
|
||||
_update_default_route (self, AF_INET6, FALSE, FALSE);
|
||||
} else {
|
||||
_update_default_route (self, AF_INET, priv->default_route.v4_has, TRUE);
|
||||
_update_default_route (self, AF_INET6, priv->default_route.v6_has, TRUE);
|
||||
}
|
||||
_update_default_route (self, AF_INET, FALSE, TRUE);
|
||||
_update_default_route (self, AF_INET6, FALSE, TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue