diff options
author | Thomas Haller <thaller@redhat.com> | 2016-08-20 10:22:22 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-08-23 11:12:10 +0200 |
commit | 0852401b0e9384e4e88c0ab6cd6fa3d9cd59cba5 (patch) | |
tree | 3179fdcdad5b21657eca03198ba97cb751e18986 | |
parent | 6757dd371371d190871e433032f5d912f771a1fd (diff) | |
download | NetworkManager-0852401b0e9384e4e88c0ab6cd6fa3d9cd59cba5.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.
(cherry picked from commit 071103b172929ee4d9f897affb4b15400932d1d9)
-rw-r--r-- | src/vpn-manager/nm-vpn-connection.c | 2 |
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; |