charon-nm: Mark VPN connection as persistent

If this is not set, it looks like NM shuts down the VPN connection and
calls disconnect() if there is any connectivity change.

References strongswan/strongswan#2707
This commit is contained in:
Tobias Brunner
2025-04-14 11:40:59 +02:00
parent 57e74f64b3
commit 8ae00c334a
+4
View File
@@ -214,6 +214,10 @@ static void signal_ip_config(NMVpnServicePlugin *plugin,
handler = priv->handler;
/* we can reconnect automatically if interfaces change */
g_variant_builder_add (&builder, "{sv}", NM_VPN_PLUGIN_CAN_PERSIST,
g_variant_new_boolean (TRUE));
/* NM apparently requires to know the gateway (it uses it to install a
* direct route via physical interface if conflicting routes are passed) */
other = ike_sa->get_other_host(ike_sa);