Skip to content

Commit df07a94

Browse files
Jorge Boncompte [DTI2]davem330
authored andcommitted
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>
1 parent 42ca020 commit df07a94

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎net/core/neighbour.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,10 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq,
23972397
struct net *net = seq_file_net(seq);
23982398
struct neigh_table *tbl = state->tbl;
23992399

2400-
pn = pn->next;
2400+
do {
2401+
pn = pn->next;
2402+
} while (pn && !net_eq(pneigh_net(pn), net));
2403+
24012404
while (!pn) {
24022405
if (++state->bucket > PNEIGH_HASHMASK)
24032406
break;

0 commit comments

Comments
 (0)