netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netns: fix proxy ARP entries listing on a netns
@ 2011-11-21 19:46 Jorge Boncompte [DTI2]
  2011-11-23 22:36 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge Boncompte [DTI2] @ 2011-11-21 19:46 UTC (permalink / raw)
  To: netdev; +Cc: Jorge Boncompte [DTI2]

From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>

Skip entries from foreign network namespaces.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
---
 net/core/neighbour.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 039d51e..2adcbeb 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2397,6 +2397,7 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq,
 	struct net *net = seq_file_net(seq);
 	struct neigh_table *tbl = state->tbl;
 
+restart:
 	pn = pn->next;
 	while (!pn) {
 		if (++state->bucket > PNEIGH_HASHMASK)
@@ -2408,6 +2409,9 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq,
 			break;
 	}
 
+	if (pn && !net_eq(pneigh_net(pn), net))
+		goto restart;
+
 	if (pn && pos)
 		--(*pos);
 
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-25 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 19:46 [PATCH] netns: fix proxy ARP entries listing on a netns Jorge Boncompte [DTI2]
2011-11-23 22:36 ` David Miller
2011-11-25 14:41   ` [PATCH v2] " Jorge Boncompte [DTI2]
2011-11-25 18:24     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).