diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-18 14:33:07 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-18 22:00:22 +0200 |
commit | c7af6483b9f7f3eaba01b2e62d3d8a70cd89bdaf (patch) | |
tree | 563c22add4d06bfda2d87995c6b84d75c1a5ab31 /net/netfilter/nf_nat_core.c | |
parent | 06198b34a3e09e06d9aecaa3727e0d37206cea77 (diff) | |
download | op-kernel-dev-c7af6483b9f7f3eaba01b2e62d3d8a70cd89bdaf.zip op-kernel-dev-c7af6483b9f7f3eaba01b2e62d3d8a70cd89bdaf.tar.gz |
netfilter: Pass net into nf_xfrm_me_harder
Instead of calling dev_net on a likley looking network device
pass state->net into nf_xfrm_me_harder.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_nat_core.c')
-rw-r--r-- | net/netfilter/nf_nat_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 5113dfd..06a9f45 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -83,7 +83,7 @@ out: rcu_read_unlock(); } -int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family) +int nf_xfrm_me_harder(struct net *net, struct sk_buff *skb, unsigned int family) { struct flowi fl; unsigned int hh_len; @@ -99,7 +99,7 @@ int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family) dst = ((struct xfrm_dst *)dst)->route; dst_hold(dst); - dst = xfrm_lookup(dev_net(dst->dev), dst, &fl, skb->sk, 0); + dst = xfrm_lookup(net, dst, &fl, skb->sk, 0); if (IS_ERR(dst)) return PTR_ERR(dst); |