Commit 857b409a authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Patrick McHardy

netfilter: nf_conntrack: elegantly simplify nf_ct_exp_net()

Remove #ifdef at nf_ct_exp_net() by using nf_ct_net().
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent b2907e50
...@@ -56,11 +56,7 @@ struct nf_conntrack_expect { ...@@ -56,11 +56,7 @@ struct nf_conntrack_expect {
static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp) static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp)
{ {
#ifdef CONFIG_NET_NS return nf_ct_net(exp->master);
return exp->master->ct_net; /* by definition */
#else
return &init_net;
#endif
} }
struct nf_conntrack_expect_policy { struct nf_conntrack_expect_policy {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment