aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-15 21:04:18 -0400
committerDavid S. Miller <davem@davemloft.net>2015-09-17 20:18:37 -0400
commit0c4b51f0054ce85c0ec578ab818f0631834573eb (patch)
tree73e729f58fbaf6420e0f390e36aa936ddaa219ef /net/ipv4/ipmr.c
parent9dff2c966a0a79a4222553a851f17e679fc28a43 (diff)
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/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index a88c0c5374ff..cfcb996ec51b 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1678,10 +1678,10 @@ static void ip_encap(struct net *net, struct sk_buff *skb,
1678 nf_reset(skb); 1678 nf_reset(skb);
1679} 1679}
1680 1680
1681static inline int ipmr_forward_finish(struct sock *sk, struct sk_buff *skb) 1681static inline int ipmr_forward_finish(struct net *net, struct sock *sk,
1682 struct sk_buff *skb)
1682{ 1683{
1683 struct ip_options *opt = &(IPCB(skb)->opt); 1684 struct ip_options *opt = &(IPCB(skb)->opt);
1684 struct net *net = dev_net(skb_dst(skb)->dev);
1685 1685
1686 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTFORWDATAGRAMS); 1686 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTFORWDATAGRAMS);
1687 IP_ADD_STATS_BH(net, IPSTATS_MIB_OUTOCTETS, skb->len); 1687 IP_ADD_STATS_BH(net, IPSTATS_MIB_OUTOCTETS, skb->len);