Re: [PATCH] vpn-connection: lack of ipv4 config in remote VPN is not fatal


On 05/11/2015 12:31, Lubomir Rintel wrote:
Thanks for the patch, Rafaël.

I'm not sure it's correct, though. The VPN plugin probably should
probably only emit "Config" signal and not "IP4Config" when it has no
IPv4 configuration.

You tell me :)

I've been looking at this issue for a couple years already and this is
the first time I'm coming up with a patch.

Previously I was using this script as nm-openvpn-service-openvpn-helper

if [ "$X509_1_ST" = "Foobar" ]
    export ifconfig_netmask=
    export ifconfig_local=

exec /usr/lib/networkmanager/nm-openvpn-service-openvpn-helper.real $*

Do you want to give me a patch that I could test?

On Tue, 2015-11-03 at 19:31 +0100, Rafaël Carré wrote:
IPv4 config can be set manually
 src/vpn-manager/nm-vpn-connection.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-
index 0c0ac1c..fc49304 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -1419,10 +1419,7 @@ nm_vpn_connection_ip4_config_get
(NMVpnConnection *self, GVariant *dict)
             address.source = NM_IP_CONFIG_SOURCE_VPN;
             nm_ip4_config_add_address (config, &address);
     } else {
-            _LOGE ("invalid IP4 config received!");
-            g_object_unref (config);
-            nm_vpn_connection_config_maybe_complete (self,
-            return;
+            _LOGW ("invalid IP4 config received!");
     if (g_variant_lookup (dict, NM_VPN_PLUGIN_IP4_CONFIG_DNS,
"au", &iter)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]