diff options
-rw-r--r-- | net/core/neighbour.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 039d51e6c284..5ac07d31fbc9 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2397,7 +2397,10 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, | |||
2397 | struct net *net = seq_file_net(seq); | 2397 | struct net *net = seq_file_net(seq); |
2398 | struct neigh_table *tbl = state->tbl; | 2398 | struct neigh_table *tbl = state->tbl; |
2399 | 2399 | ||
2400 | pn = pn->next; | 2400 | do { |
2401 | pn = pn->next; | ||
2402 | } while (pn && !net_eq(pneigh_net(pn), net)); | ||
2403 | |||
2401 | while (!pn) { | 2404 | while (!pn) { |
2402 | if (++state->bucket > PNEIGH_HASHMASK) | 2405 | if (++state->bucket > PNEIGH_HASHMASK) |
2403 | break; | 2406 | break; |