platform: fix route addition ordering

This commit is contained in:
Lubomir Rintel 2015-01-25 18:35:42 +01:00
parent 643291bea5
commit 47167cab4f

View file

@ -2142,7 +2142,7 @@ nm_platform_ip4_route_sync (int ifindex, const GArray *known_routes)
if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (known_route))
continue;
if ((known_route->gateway == 0) ^ (i_type != 0)) {
if ((known_route->gateway == 0) ^ (i_type == 0)) {
/* Make two runs over the list of routes. On the first, only add
* device routes, on the second the others (gateway routes). */
continue;
@ -2216,7 +2216,7 @@ nm_platform_ip6_route_sync (int ifindex, const GArray *known_routes)
if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (known_route))
continue;
if (IN6_IS_ADDR_UNSPECIFIED (&known_route->gateway) ^ (i_type != 0)) {
if (IN6_IS_ADDR_UNSPECIFIED (&known_route->gateway) ^ (i_type == 0)) {
/* Make two runs over the list of routes. On the first, only add
* device routes, on the second the others (gateway routes). */
continue;