summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-08-20 10:22:22 +0200
committerThomas Haller <thaller@redhat.com>2016-08-23 10:51:18 +0200
commit071103b172929ee4d9f897affb4b15400932d1d9 (patch)
tree7c0585182accd4573059b62bdb2d8ab7f35cc2c7
parent2da35ddfe80346d4aee2510e830a59f62fc9434f (diff)
downloadNetworkManager-071103b172929ee4d9f897affb4b15400932d1d9.tar.gz
vpn: ignore unexpected default-route for nm_vpn_connection_ip6_config_get()
The VPN data comes from an external source, it may be bogus. Default-routes are not allowed on this point and would trigger an assertion afterwards. Skip over them.
-rw-r--r--src/vpn-manager/nm-vpn-connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index f9c4f01e68..92c5bd8fa3 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -1640,7 +1640,7 @@ nm_vpn_connection_ip6_config_get (NMVpnConnection *self, GVariant *dict)
if (!ip6_addr_from_variant (dest, &route.network))
goto next;
- if (prefix > 128)
+ if (prefix > 128 || prefix == 0)
goto next;
route.plen = prefix;