From 83847cc621aaa5ee6130e4088582875fcd98dd64 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 8 May 2024 11:04:04 +0200 Subject: [PATCH] vpn: allow IP configurations with routes and without addresses Usually, when the method is "auto" we want to avoid configuring routes until the automatic method completes. To achieve that, we clear the "allow_routes_without_address" flag of l3cds when the method is "auto". For VPNs, IP configurations with only routes are perfectly valid, therefore set the flag. (cherry picked from commit d1ffdb28ebaf3af23ac76b59c35fe7e4672cb5bc) (cherry picked from commit 5b4ed809cc458504f01a02e908a91f2625613787) --- 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 62aecbd286..f26f4c42e0 100644 --- a/src/core/vpn/nm-vpn-connection.c +++ b/src/core/vpn/nm-vpn-connection.c @@ -1433,6 +1433,10 @@ _check_complete(NMVpnConnection *self, gboolean success) l3cd = nm_l3_config_data_new_from_connection(nm_netns_get_multi_idx(priv->netns), nm_vpn_connection_get_ip_ifindex(self, TRUE), connection); + + nm_l3_config_data_set_allow_routes_without_address(l3cd, AF_INET, TRUE); + nm_l3_config_data_set_allow_routes_without_address(l3cd, AF_INET6, TRUE); + _l3cfg_l3cd_set(self, L3CD_TYPE_STATIC, l3cd); _l3cfg_l3cd_gw_extern_update(self);