diff options
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 958a1455ca7f..9f267c3ffb39 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -205,6 +205,7 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
205 | struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(hash); | 205 | struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(hash); |
206 | const struct nf_conntrack_l3proto *l3proto; | 206 | const struct nf_conntrack_l3proto *l3proto; |
207 | const struct nf_conntrack_l4proto *l4proto; | 207 | const struct nf_conntrack_l4proto *l4proto; |
208 | struct net *net = seq_file_net(s); | ||
208 | int ret = 0; | 209 | int ret = 0; |
209 | 210 | ||
210 | NF_CT_ASSERT(ct); | 211 | NF_CT_ASSERT(ct); |
@@ -215,6 +216,9 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
215 | if (NF_CT_DIRECTION(hash)) | 216 | if (NF_CT_DIRECTION(hash)) |
216 | goto release; | 217 | goto release; |
217 | 218 | ||
219 | if (!net_eq(nf_ct_net(ct), net)) | ||
220 | goto release; | ||
221 | |||
218 | l3proto = __nf_ct_l3proto_find(nf_ct_l3num(ct)); | 222 | l3proto = __nf_ct_l3proto_find(nf_ct_l3num(ct)); |
219 | NF_CT_ASSERT(l3proto); | 223 | NF_CT_ASSERT(l3proto); |
220 | l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); | 224 | l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); |