summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface-ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 6ccc03e..4a3e2c0 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -204,7 +204,7 @@ __find_ip_route_target(struct interface_ip_settings *ip, union if_addr *a,
if (route->flags & DEVROUTE_TABLE)
continue;
- if (!*res || route->mask < (*res)->mask)
+ if (!*res || route->mask > (*res)->mask)
*res = route;
}
}