ipv6: ignore default routes when creating configuration for generic interface

NM handles the default routes, so they shouldn't show up in the NMIP6Config
for any interface.  They get exposed via the 'default' and 'default6' properties
of the ActiveConnection instead.

The same has been done for IPv4 by c77c566983.
This commit is contained in:
Jiří Klimeš 2013-06-27 10:49:04 +02:00
parent 52dca880cc
commit 500fb12c28

View file

@ -105,6 +105,12 @@ nm_ip6_config_new_for_interface (int ifindex)
routes_array = nm_platform_ip6_route_get_all (ifindex);
routes = (NMPlatformIP6Route *)routes_array->data;
for (i = 0; i < routes_array->len; i++) {
/* Default route ignored; it's handled internally by NM and not
* tracked in the device's IP config.
*/
if (routes[i].plen == 0)
continue;
route = nm_ip6_route_new ();
nm_ip6_route_set_dest (route, &routes[i].network);
nm_ip6_route_set_prefix (route, routes[i].plen);