platform: ignore kernel-generated routes

This is necessary to avoid tinkering with IPv4 prefix routes
automatically inserted by the kernel for each IPv4 address.

https://bugzilla.gnome.org/show_bug.cgi?id=705102
This commit is contained in:
Pavel Šimerda
2013-07-30 00:24:58 +02:00
parent 68c3e1153c
commit b502b6cd58

View File

@@ -2078,6 +2078,8 @@ ip_route_mark_all (NMPlatform *platform, int family, int ifindex)
continue; continue;
if (rtnl_route_get_table (rtnlroute) != RT_TABLE_MAIN) if (rtnl_route_get_table (rtnlroute) != RT_TABLE_MAIN)
continue; continue;
if (rtnl_route_get_protocol (rtnlroute) == RTPROT_KERNEL)
continue;
if (rtnl_route_get_family (rtnlroute) != family) if (rtnl_route_get_family (rtnlroute) != family)
continue; continue;
if (rtnl_route_get_nnexthops (rtnlroute) != 1) if (rtnl_route_get_nnexthops (rtnlroute) != 1)