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
-  Lines: 21
-  Date:
Thu Jan  2 14:07:39 1997
-  Orig file: 
v2.1.19/linux/net/core/neighbour.c
-  Orig date: 
Thu Dec 12 19:37:24 1996
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