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.

(cherry picked from commit 071103b172)
This commit is contained in:
Thomas Haller
2016-08-20 10:22:22 +02:00
parent 6757dd3713
commit 0852401b0e

View File

@@ -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;