From: Tobias Brunner Date: Fri, 22 Feb 2013 17:52:17 +0000 (+0100) Subject: charon-nm: Prevent NM from changing the default route X-Git-Tag: 5.0.3rc1~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3651c8dcd5b947ec0e0dfcdf9fc6b4a587745e0d;p=thirdparty%2Fstrongswan.git charon-nm: Prevent NM from changing the default route This is not required as we install our own (narrow) route(s) in our own routing table. This should allow split tunneling if configured on the gateway. --- diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c index aa5fdc04a3..901abd348e 100644 --- a/src/charon-nm/nm/nm_service.c +++ b/src/charon-nm/nm/nm_service.c @@ -121,6 +121,14 @@ static void signal_ipv4_config(NMVPNPlugin *plugin, g_value_set_uint(val, me->get_address(me).len * 8); g_hash_table_insert(config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val); + /* prevent NM from changing the default route. we set our own route in our + * own routing table + */ + val = g_slice_new0(GValue); + g_value_init(val, G_TYPE_BOOLEAN); + g_value_set_boolean(val, TRUE); + g_hash_table_insert(config, NM_VPN_PLUGIN_IP4_CONFIG_NEVER_DEFAULT, val); + val = handler_to_val(handler, INTERNAL_IP4_DNS); g_hash_table_insert(config, NM_VPN_PLUGIN_IP4_CONFIG_DNS, val);