Hello,

On 05/11/2015 12:34, Lubomir Rintel wrote:
> Hello Rafaël,
> 
> I'm not sure I understand this one either. What do you mean it's fatal
> now? There's just a g_warning(). Is it that without your other patch
> this produces invalid IPv4 config and causes the daemon to tear the
> down the connection?

Yes, that is the case at least on 1.0.4.

I tested 1.0.4 because that is what Ubuntu 15.10 is shipping, and I
don't know
how I would be able to test the git version.

Maybe I didn't pay much attention to that code because it changed quite
a bit
between 1.0.4 and git.

Here is the diff I tested:

--- network-manager-1.0.4.orig/src/vpn-manager/nm-vpn-connection.c
+++ network-manager-1.0.4/src/vpn-manager/nm-vpn-connection.c
@@ -1300,7 +1300,7 @@ nm_vpn_connection_ip4_config_get (DBusGP
    if (address.address && address.plen) {
        address.source = NM_IP_CONFIG_SOURCE_VPN;
        nm_ip4_config_add_address (config, &address);
-   } else {
+   } else if (0) {
        nm_log_err (LOGD_VPN, "invalid IP4 config received!");
        g_object_unref (config);
        nm_vpn_connection_config_maybe_complete (connection, FALSE);


> On Tue, 2015-11-03 at 19:31 +0100, Rafaël Carré wrote:
>> IPv4 config can be set manually
>> ---
>>  src/nm-openvpn-service-openvpn-helper.c | 11 ++++-------
>>  1 file changed, 4 insertions(+), 7 deletions(-)
>>
>> diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-
>> openvpn-service-openvpn-helper.c
>> index 512d6ce..4f93193 100644
>> --- a/src/nm-openvpn-service-openvpn-helper.c
>> +++ b/src/nm-openvpn-service-openvpn-helper.c
>> @@ -583,13 +583,10 @@ main (int argc, char *argv[])
>>      if (tmp && inet_pton (AF_INET, tmp, &temp_addr) > 0) {
>>              val = g_variant_new_uint32
>> (nm_utils_ip4_netmask_to_prefix (temp_addr.s_addr));
>>              g_variant_builder_add (&ip4builder, "{sv}",
>> NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
>> -    } else if (!tapdev) {
>> -            if (!has_ip4_prefix) {
>> -                    val = g_variant_new_uint32 (32);
>> -                    g_variant_builder_add (&ip4builder, "{sv}",
>> NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
>> -            }
>> -    } else
>> -            g_warning ("No IP4 netmask/prefix (missing or
>> invalid 'ifconfig_netmask')");
>> +    } else if (!has_ip4_prefix) {
>> +            val = g_variant_new_uint32 (32);
>> +            g_variant_builder_add (&ip4builder, "{sv}",
>> NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
>> +    }
>>  
>>      val = get_ip4_routes ();
>>      if (val)
> 
> Thanks,
> Lubo
> 
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to