patch-2.1.20 linux/net/core/neighbour.c

Next file: linux/net/core/net_alias.c
Previous file: linux/net/core/firewall.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.19/linux/net/core/neighbour.c linux/net/core/neighbour.c
@@ -137,17 +137,17 @@
 	if (neigh)
 	{
 		do {
-			if (memcmp(&neigh->primary_key, pkey, key_len) == 0)
+			if (memcmp(neigh->primary_key, pkey, key_len) == 0)
 			{
 				if (!dev || dev == neigh->dev)
-					break;
+					return neigh;
 			}
 			neigh = neigh->next;
 			
 		} while (neigh != head);
 	}
 
-	return neigh;
+	return NULL;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov