[PATCH] Fix typo in rtnl_neigh_get()

Maxime Bizon mbizon at freebox.fr
Thu Jan 31 09:40:11 EST 2013


From: Maxime Bizon <mbizon at freebox.fr>

Fix typo in rtnl_neigh_get()

Signed-off-by: Maxime Bizon <mbizon at freebox.fr>
---
 lib/route/neigh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/route/neigh.c b/lib/route/neigh.c
index c0f80a2..3ccb126 100644
--- a/lib/route/neigh.c
+++ b/lib/route/neigh.c
@@ -540,7 +540,7 @@ struct rtnl_neigh * rtnl_neigh_get(struct nl_cache *cache, int ifindex,
 	struct rtnl_neigh *neigh;
 
 	nl_list_for_each_entry(neigh, &cache->c_items, ce_list) {
-		if (neigh->n_family == AF_UNSPEC &&
+		if (neigh->n_family != AF_UNSPEC &&
 		    neigh->n_ifindex == ifindex &&
 		    !nl_addr_cmp(neigh->n_dst, dst)) {
 			nl_object_get((struct nl_object *) neigh);
-- 
1.7.9.5

-- 
Maxime





More information about the libnl mailing list