mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 06:20:28 +01:00
default-route-manager: fix handling for absent default routes for VPN
When a VPN has no default route, it is wrong to enforce the absence of a default route on that device. Instead, if there is no default route, NMDefaultRouteManager should just forget about the route. This is especially important, because for VPN types like openswan there is no distinct tunnel interface. Instead, it shares the ifindex with the parent-device. Note that devices usually only enforce their default-route for a short time and afterwards switch to non-synced. If that happens and there is a VPN that enforces the absense of the default route on that device, we end up deleting the default route.
This commit is contained in:
parent
befb36691a
commit
16d0850c37
1 changed files with 7 additions and 1 deletions
|
|
@ -789,7 +789,13 @@ _ipx_update_default_route (const VTableIP *vtable, NMDefaultRouteManager *self,
|
|||
}
|
||||
}
|
||||
}
|
||||
synced = TRUE;
|
||||
if (nm_vpn_connection_get_ip_ifindex (vpn) > 0)
|
||||
synced = TRUE;
|
||||
else {
|
||||
/* a VPN connection without tunnel device cannot have a non-synced, missing default route.
|
||||
* Either it has a default route (which is synced), or it has no entry. */
|
||||
synced = default_route && !never_default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue