After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706286 - VPN no longer accept IPv6 addresses
VPN no longer accept IPv6 addresses
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN (general)
git master
Other Linux
: Normal critical
: ---
Assigned To: Pavel Simerda
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-08-19 08:49 UTC by Nicolas Iooss
Modified: 2013-08-19 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
accept IPv6 address in VPN plugins (889 bytes, patch)
2013-08-19 08:49 UTC, Nicolas Iooss
none Details | Review

Description Nicolas Iooss 2013-08-19 08:49:28 UTC
Created attachment 252182 [details] [review]
accept IPv6 address in VPN plugins

Commit d8e6065f634424b99a9e033144cfad3418c46159 introduced a regression in VPN plugins, in file src/vpn-manager/nm-vpn-connection.c (http://cgit.freedesktop.org/NetworkManager/NetworkManager/diff/src/vpn-manager/nm-vpn-connection.c?id=d8e6065f634424b99a9e033144cfad3418c46159):

@@ -1072,13 +1068,12 @@ nm_vpn_connection_ip6_config_get (DBusGProxy *proxy,
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP6_CONFIG_PREFIX);
if (val)
- nm_ip6_address_set_prefix (addr, g_value_get_uint (val));
+ address.plen = g_value_get_uint (val);
- if (nm_ip6_address_get_address (addr) && nm_ip6_address_get_prefix (addr)) {
- nm_ip6_config_take_address (config, addr);
- } else {
+ if (IN6_IS_ADDR_UNSPECIFIED (&address.address) && address.plen)
+ nm_ip6_config_add_address (config, &address);
+ else {
nm_log_err (LOGD_VPN, "invalid IP6 config received!");
- nm_ip6_address_unref (addr);
g_object_unref (config);
nm_vpn_connection_config_maybe_complete (connection, FALSE);
}

IN6_IS_ADDR_UNSPECIFIED (&address.address) is always FALSE for valid IPv6 addresses and therefore trigger the error "invalid IP6 config received!". To solve this bug, a ! should be added in the if condition.
Comment 1 Pavel Simerda 2013-08-19 10:20:46 UTC
commit ff6d9b3c0fe95d63613bd1a1eb1ac030c9f9163c
Author: Pavel Šimerda <psimerda@redhat.com>
Date:   Mon Aug 19 11:25:39 2013 +0200

    vpn: fix zero IPv6 address check
    
    Bug introduced by commit d8e6065.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706286
    
    Reported-by: Nicolas Iooss <nicolas.iooss.2010_nm@m4x.org>
    Acked-by: Thomas Haller <thaller@redhat.com>