mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-11-05 19:03:31 +00:00
platform: don't remove default route in *_route_sync()
This commit is contained in:
parent
db46beaa2f
commit
801434ce45
1 changed files with 8 additions and 0 deletions
|
@ -1486,6 +1486,10 @@ nm_platform_ip4_route_sync (int ifindex, const GArray *known_routes)
|
|||
route = &g_array_index (routes, NMPlatformIP4Route, i);
|
||||
route->ifindex = 0;
|
||||
|
||||
/* Ignore default route */
|
||||
if (!route->plen)
|
||||
continue;
|
||||
|
||||
if (!known_routes || !array_contains_ip4_route (known_routes, route))
|
||||
nm_platform_ip4_route_delete (ifindex, route->network, route->plen, route->metric);
|
||||
}
|
||||
|
@ -1534,6 +1538,10 @@ nm_platform_ip6_route_sync (int ifindex, const GArray *known_routes)
|
|||
route = &g_array_index (routes, NMPlatformIP6Route, i);
|
||||
route->ifindex = 0;
|
||||
|
||||
/* Ignore default route */
|
||||
if (!route->plen)
|
||||
continue;
|
||||
|
||||
if (!known_routes || !array_contains_ip6_route (known_routes, route))
|
||||
nm_platform_ip6_route_delete (ifindex, route->network, route->plen, route->metric);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue