diff mbox

[v2] netns: fix proxy ARP entries listing on a netns

Message ID 1322232089-31902-1-git-send-email-jorge@dti2.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jorge Boncompte [DTI2] Nov. 25, 2011, 2:41 p.m. UTC
From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>

Skip entries from foreign network namespaces.

V2:
    Fixed as suggested by David Miller to avoid a goto.

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

Comments

David Miller Nov. 25, 2011, 6:24 p.m. UTC | #1
From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
Date: Fri, 25 Nov 2011 15:41:29 +0100

> From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
> 
> Skip entries from foreign network namespaces.
> 
> V2:
>     Fixed as suggested by David Miller to avoid a goto.
> 
> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 2684794..27d3fef 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2414,7 +2414,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;