netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
To: Linux Network Development list <netdev@vger.kernel.org>,
	stable@kernel.org
Subject: [PATCH] netns: fix proxy ARP entries listing
Date: Thu, 02 Sep 2010 20:35:01 +0200	[thread overview]
Message-ID: <4C7FEE55.8060002@dti2.net> (raw)

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 a4e0a74..4c36fa9 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2323,6 +2323,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)
@@ -2334,6 +2335,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.1


             reply	other threads:[~2010-09-02 18:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 18:35 Jorge Boncompte [DTI2] [this message]
2010-09-06 20:30 ` [PATCH] netns: fix proxy ARP entries listing 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=4C7FEE55.8060002@dti2.net \
    --to=jorge@dti2.net \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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).