mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-18 17:48:28 +02:00
ip6: avoid autoconf routes where dest == gateway
These return errors when we try to add them via netlink (both internal code and using /sbin/ip) so we'll ignore them for now.
This commit is contained in:
parent
32b255e128
commit
5ca72c78a0
1 changed files with 7 additions and 0 deletions
|
|
@ -983,6 +983,13 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, int ifindex)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Also ignore routes where the destination and gateway are the same,
|
||||
* which apparently get added by the kernel but return -EINVAL when
|
||||
* we try to add them via netlink.
|
||||
*/
|
||||
if (gateway && !memcmp (dest, gateway, sizeof (struct in6_addr)))
|
||||
continue;
|
||||
|
||||
ip6route = nm_ip6_route_new ();
|
||||
nm_ip6_route_set_dest (ip6route, dest);
|
||||
nm_ip6_route_set_prefix (ip6route, rtnl_route_get_dst_len (rtnlroute));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue