summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/neighbour.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index be8b264b29bf..31b6567f0b6a 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1284,9 +1284,7 @@ static inline struct neigh_parms *lookup_neigh_params(struct neigh_table *tbl,
struct neigh_parms *p;
for (p = &tbl->parms; p; p = p->next) {
- if (p->net != net)
- continue;
- if ((p->dev && p->dev->ifindex == ifindex) ||
+ if ((p->dev && p->dev->ifindex == ifindex && p->net == net) ||
(!p->dev && !ifindex))
return p;
}