mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 11:58:12 +02:00
l3-config-data: do not check route table to get direct routes
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.
(cherry picked from commit f187e63fa8)
This commit is contained in:
parent
d27a164d09
commit
79a9fcb166
1 changed files with 2 additions and 12 deletions
|
|
@ -2408,10 +2408,7 @@ nm_l3_config_data_cmp_full(const NML3ConfigData *a,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static const NMPObject *
|
static const NMPObject *
|
||||||
_data_get_direct_route_for_host(const NML3ConfigData *self,
|
_data_get_direct_route_for_host(const NML3ConfigData *self, int addr_family, gconstpointer host)
|
||||||
int addr_family,
|
|
||||||
gconstpointer host,
|
|
||||||
guint32 route_table)
|
|
||||||
{
|
{
|
||||||
const int IS_IPv4 = NM_IS_IPv4(addr_family);
|
const int IS_IPv4 = NM_IS_IPv4(addr_family);
|
||||||
const NMPObject *best_route_obj = NULL;
|
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)
|
if (best_route && best_route->rx.plen > item->rx.plen)
|
||||||
continue;
|
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))
|
if (!nm_ip_addr_same_prefix(addr_family, host, item->rx.network_ptr, item->rx.plen))
|
||||||
continue;
|
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))
|
if (nm_ip_addr_is_null(addr_family, p_gateway))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (_data_get_direct_route_for_host(
|
if (_data_get_direct_route_for_host(self, addr_family, p_gateway))
|
||||||
self,
|
|
||||||
addr_family,
|
|
||||||
p_gateway,
|
|
||||||
nm_platform_route_table_uncoerce(route_src->rx.table_coerced, TRUE)))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
new_route = nmp_object_clone(obj_src, FALSE);
|
new_route = nmp_object_clone(obj_src, FALSE);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue