diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2023-01-24 15:07:04 +0100 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2023-01-26 11:10:08 +0100 |
commit | f187e63fa8607f09e8a93a1df27d7b1ff639ffe3 (patch) | |
tree | 230ddddeb5ce17696041f6ea45f9261f033d54d9 | |
parent | cbf70b4dca4ff520ab33c1b944f95fc52eae52e1 (diff) | |
download | NetworkManager-ff/fix_l3cfg_onlink.tar.gz |
l3-config-data: do not check route table to get direct routesff/fix_l3cfg_onlink
Kernel enforces that all route nexthop are reachable but it doesn't care
if the drect route to the nexthop is in a different route table.
-rw-r--r-- | src/core/nm-l3-config-data.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/core/nm-l3-config-data.c b/src/core/nm-l3-config-data.c index d7ffe126d3..1c8200c248 100644 --- a/src/core/nm-l3-config-data.c +++ b/src/core/nm-l3-config-data.c @@ -2408,10 +2408,7 @@ nm_l3_config_data_cmp_full(const NML3ConfigData *a, /*****************************************************************************/ static const NMPObject * -_data_get_direct_route_for_host(const NML3ConfigData *self, - int addr_family, - gconstpointer host, - guint32 route_table) +_data_get_direct_route_for_host(const NML3ConfigData *self, int addr_family, gconstpointer host) { const int IS_IPv4 = NM_IS_IPv4(addr_family); const NMPObject *best_route_obj = NULL; @@ -2439,9 +2436,6 @@ _data_get_direct_route_for_host(const NML3ConfigData *self, if (best_route && best_route->rx.plen > item->rx.plen) continue; - if (nm_platform_route_table_uncoerce(item->rx.table_coerced, TRUE) != route_table) - continue; - if (!nm_ip_addr_same_prefix(addr_family, host, item->rx.network_ptr, item->rx.plen)) continue; @@ -2569,11 +2563,7 @@ 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( - self, - addr_family, - p_gateway, - nm_platform_route_table_uncoerce(route_src->rx.table_coerced, TRUE))) + if (_data_get_direct_route_for_host(self, addr_family, p_gateway)) continue; new_route = nmp_object_clone(obj_src, FALSE); |