mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
netfilter: nf_conntrack_expect: skip expectations in other netns via proc
Skip expectations that do not reside in this netns. Similar toe77e6ff502("netfilter: conntrack: do not dump other netns's conntrack entries via proc"). Fixes:9b03f38d04("netfilter: netns nf_conntrack: per-netns expectations") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
@@ -652,11 +652,15 @@ static int exp_seq_show(struct seq_file *s, void *v)
|
||||
{
|
||||
struct nf_conntrack_expect *expect;
|
||||
struct nf_conntrack_helper *helper;
|
||||
struct net *net = seq_file_net(s);
|
||||
struct hlist_node *n = v;
|
||||
char *delim = "";
|
||||
|
||||
expect = hlist_entry(n, struct nf_conntrack_expect, hnode);
|
||||
|
||||
if (!net_eq(nf_ct_exp_net(expect), net))
|
||||
return 0;
|
||||
|
||||
if (expect->timeout.function)
|
||||
seq_printf(s, "%ld ", timer_pending(&expect->timeout)
|
||||
? (long)(expect->timeout.expires - jiffies)/HZ : 0);
|
||||
|
||||
Reference in New Issue
Block a user