From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
To: netdev@vger.kernel.org
Cc: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
Subject: [PATCH v2] netns: fix proxy ARP entries listing on a netns
Date: Fri, 25 Nov 2011 15:41:29 +0100 [thread overview]
Message-ID: <1322232089-31902-1-git-send-email-jorge@dti2.net> (raw)
In-Reply-To: <20111123.173613.1360696422325749253.davem@davemloft.net>
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(-)
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;
--
1.7.7.1
next prev parent reply other threads:[~2011-11-25 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jorge Boncompte [DTI2] [this message]
2011-11-25 18:24 ` [PATCH v2] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322232089-31902-1-git-send-email-jorge@dti2.net \
--to=jorge@dti2.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).