summaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2011-11-25 13:24:49 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-25 13:24:49 -0500
commitdf07a94cf50eb73d09bf2350c3fe2598e4cbeee1 (patch)
treed6d53ef2e0c4b7e1a9ae02ae6f14207963d4f134 /net/core/neighbour.c
parent42ca0203fd59aa9be7b241be1fbc3bef1f903f9c (diff)
downloadop-kernel-dev-df07a94cf50eb73d09bf2350c3fe2598e4cbeee1.zip
op-kernel-dev-df07a94cf50eb73d09bf2350c3fe2598e4cbeee1.tar.gz
netns: fix proxy ARP entries listing on a netns
Skip entries from foreign network namespaces. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 039d51e..5ac07d3 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,
struct net *net = seq_file_net(seq);
struct neigh_table *tbl = state->tbl;
- pn = pn->next;
+ do {
+ pn = pn->next;
+ } while (pn && !net_eq(pneigh_net(pn), net));
+
while (!pn) {
if (++state->bucket > PNEIGH_HASHMASK)
break;
OpenPOWER on IntegriCloud