diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-16 03:04:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-18 02:18:37 +0200 |
commit | 0c4b51f0054ce85c0ec578ab818f0631834573eb (patch) | |
tree | 73e729f58fbaf6420e0f390e36aa936ddaa219ef /net/ipv6/ip6mr.c | |
parent | netfilter: Use nf_hook_state.net (diff) | |
download | linux-0c4b51f0054ce85c0ec578ab818f0631834573eb.tar.xz linux-0c4b51f0054ce85c0ec578ab818f0631834573eb.zip |
netfilter: Pass net into okfn
This is immediately motivated by the bridge code that chains functions that
call into netfilter. Without passing net into the okfns the bridge code would
need to guess about the best expression for the network namespace to process
packets in.
As net is frequently one of the first things computed in continuation functions
after netfilter has done it's job passing in the desired network namespace is in
many cases a code simplification.
To support this change the function dst_output_okfn is introduced to
simplify passing dst_output as an okfn. For the moment dst_output_okfn
just silently drops the struct net.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r-- | net/ipv6/ip6mr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index e830942b2090..5e5d16e7ce85 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1985,9 +1985,8 @@ int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg) } #endif -static inline int ip6mr_forward2_finish(struct sock *sk, struct sk_buff *skb) +static inline int ip6mr_forward2_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { - struct net *net = dev_net(skb_dst(skb)->dev); IP6_INC_STATS_BH(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_OUTFORWDATAGRAMS); IP6_ADD_STATS_BH(net, ip6_dst_idev(skb_dst(skb)), |