From: Tobias Brunner Date: Thu, 20 Mar 2025 08:26:33 +0000 (+0100) Subject: charon-nm: Mark VPN connection as persistent X-Git-Tag: 6.0.2dr1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ae00c334a89220a8e7295678dc56dc23e0a73e1;p=thirdparty%2Fstrongswan.git 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 --- diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c index b920d5857f..7c010dae21 100644 --- a/src/charon-nm/nm/nm_service.c +++ b/src/charon-nm/nm/nm_service.c @@ -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);