l3cfg: do not add dependent routes for non-default routes

When the route is not a default route 0.0.0.0/0, NetworkManager should
not add dependent routes.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
This commit is contained in:
Fernando Fernandez Mancera 2021-11-10 11:02:17 +01:00 committed by Beniamino Galvani
parent 81ac02ae75
commit 6b4123db1c

View file

@ -2385,7 +2385,8 @@ nm_l3_config_data_add_dependent_onlink_routes(NML3ConfigData *self, int addr_fam
if (nm_ip_addr_is_null(addr_family, p_gateway))
continue;
if (_data_get_direct_route_for_host(
if (!NM_PLATFORM_IP_ROUTE_IS_DEFAULT(route_src)
|| _data_get_direct_route_for_host(
self,
addr_family,
p_gateway,