mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 14:40:13 +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.
(cherry picked from commit 4697376f99)
This commit is contained in:
parent
b6973827cf
commit
58c501eda5
1 changed files with 3 additions and 0 deletions
|
|
@ -10025,6 +10025,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