Browse Source

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>
Jorge Boncompte [DTI2] 13 years ago
parent
commit
df07a94cf5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      net/core/neighbour.c

+ 4 - 1
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 net *net = seq_file_net(seq);
 	struct neigh_table *tbl = state->tbl;
 	struct neigh_table *tbl = state->tbl;
 
 
-	pn = pn->next;
+	do {
+		pn = pn->next;
+	} while (pn && !net_eq(pneigh_net(pn), net));
+
 	while (!pn) {
 	while (!pn) {
 		if (++state->bucket > PNEIGH_HASHMASK)
 		if (++state->bucket > PNEIGH_HASHMASK)
 			break;
 			break;