]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Rationalise test order.
authorRoy Marples <roy@marples.name>
Tue, 15 Sep 2015 11:01:26 +0000 (11:01 +0000)
committerRoy Marples <roy@marples.name>
Tue, 15 Sep 2015 11:01:26 +0000 (11:01 +0000)
ipv4.c

diff --git a/ipv4.c b/ipv4.c
index 021d51efa47758b7ba42e8234ec99cbcfb21b933..7b9fa1a1d496ff17535fdebbc2b27bf62b411739 100644 (file)
--- a/ipv4.c
+++ b/ipv4.c
@@ -752,11 +752,11 @@ ipv4_doroute(struct rt *rt, struct rt_head *nrs)
                if (or->state & STATE_FAKE ||
                    or->iface != rt->iface ||
 #ifdef HAVE_ROUTE_METRIC
-                   rt->metric != or->metric ||
+                   or->metric != rt->metric ||
 #endif
-                   rt->src.s_addr != or->src.s_addr ||
-                   rt->gate.s_addr != or->gate.s_addr ||
-                   rt->mtu != or->mtu)
+                   or->src.s_addr != rt->src.s_addr ||
+                   or->gate.s_addr != rt->gate.s_addr ||
+                   or->mtu != rt->mtu)
                {
                        if (c_route(or, rt) != 0)
                                return 0;