From d1ffdb28ebaf3af23ac76b59c35fe7e4672cb5bc 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. --- 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 4f196e4a0..b5a7fc4c2 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);