mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 02:08:02 +02:00
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:
parent
52dca880cc
commit
500fb12c28
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue