From d9addb0ded2da8b86fa4b6e1cdc4b96f83729afd Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Wed, 11 Dec 2024 22:22:59 +0800 Subject: [PATCH 1/1] vpn: Place gateway route to table defined in ipvx.route-table Previously, NM create direct route to gateway to main(254) route table regardless `ipvx.route-table` value. Fixed by setting `NMPlatformIP4Route.table_any` to `TRUE`. Resolves: https://issues.redhat.com/browse/RHEL-69901 Signed-off-by: Gris Ge (cherry picked from commit 6d06286f1db7421bef1c4dab5fada918c59daf87) (cherry picked from commit 29f23d3519dbb4dcffc9682fbdfb721cfc0b851c) (cherry picked from commit 0dc07c5ca4d32b5ea8e104cbad106da9bb5b096d) --- src/core/vpn/nm-vpn-connection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/vpn/nm-vpn-connection.c b/src/core/vpn/nm-vpn-connection.c index b5a7fc4c29..88c5703a69 100644 --- a/src/core/vpn/nm-vpn-connection.c +++ b/src/core/vpn/nm-vpn-connection.c @@ -1242,6 +1242,7 @@ _parent_device_l3cd_add_gateway_route(NML3ConfigData *l3cd, .gateway = parent_gw.addr4, .rt_source = NM_IP_CONFIG_SOURCE_VPN, .metric_any = TRUE, + .table_any = TRUE, }; } else { route.r6 = (NMPlatformIP6Route){ @@ -1251,6 +1252,7 @@ _parent_device_l3cd_add_gateway_route(NML3ConfigData *l3cd, .gateway = parent_gw.addr6, .rt_source = NM_IP_CONFIG_SOURCE_VPN, .metric_any = TRUE, + .table_any = TRUE, }; } nm_l3_config_data_add_route(l3cd, addr_family, NULL, &route.rx); @@ -1267,6 +1269,7 @@ _parent_device_l3cd_add_gateway_route(NML3ConfigData *l3cd, .plen = 32, .rt_source = NM_IP_CONFIG_SOURCE_VPN, .metric_any = TRUE, + .table_any = TRUE, }; } else { route.r6 = (NMPlatformIP6Route){ @@ -1274,6 +1277,7 @@ _parent_device_l3cd_add_gateway_route(NML3ConfigData *l3cd, .plen = 128, .rt_source = NM_IP_CONFIG_SOURCE_VPN, .metric_any = TRUE, + .table_any = TRUE, }; } nm_l3_config_data_add_route(l3cd, addr_family, NULL, &route.rx); -- 2.45.0