summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2024-05-08 11:04:04 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2024-05-23 13:35:40 +0200
commita91c6963dea8959667b6d233345c52ed4c4d59e2 (patch)
tree36b0cc341f491400775d736fee284a4962301121
parent850037ba9b47afddc08268a364d4a42f09e7c49e (diff)
vpn: allow IP configurations with routes and without addressesbg/vpn
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.
-rw-r--r--src/core/vpn/nm-vpn-connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/vpn/nm-vpn-connection.c b/src/core/vpn/nm-vpn-connection.c
index 4f196e4a09..b5a7fc4c29 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);