core: fix crash when reading routes from VPN Ip6Config (bgo #706332)

https://bugzilla.gnome.org/show_bug.cgi?id=706332

Reported-by: Nicolas Iooss <nicolas.iooss.2010_nm@m4x.org>
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2013-11-01 10:57:18 +01:00
parent 6457e2c367
commit 886ca75ac3

View file

@ -1084,7 +1084,7 @@ nm_vpn_connection_ip6_config_get (DBusGProxy *proxy,
* the VPN server, we want to use the NM created route instead of
* whatever the server provides.
*/
if (IN6_ARE_ADDR_EQUAL (&route.network, priv->ip6_external_gw) && route.plen == 128)
if (priv->ip6_external_gw && IN6_ARE_ADDR_EQUAL (&route.network, priv->ip6_external_gw) && route.plen == 128)
continue;
/* Otherwise accept the VPN-provided route */