netfilter: Pass net into okfn
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 16 Sep 2015 01:04:18 +0000 (20:04 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2015 00:18:37 +0000 (17:18 -0700)
commit0c4b51f0054ce85c0ec578ab818f0631834573eb
tree73e729f58fbaf6420e0f390e36aa936ddaa219ef
parent9dff2c966a0a79a4222553a851f17e679fc28a43
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>
37 files changed:
drivers/net/vrf.c
include/linux/netdevice.h
include/linux/netfilter.h
include/linux/netfilter_bridge.h
include/net/dn_neigh.h
include/net/dst.h
include/net/ipv6.h
include/net/netfilter/br_netfilter.h
net/bridge/br_forward.c
net/bridge/br_input.c
net/bridge/br_netfilter_hooks.c
net/bridge/br_netfilter_ipv6.c
net/bridge/br_private.h
net/bridge/br_stp_bpdu.c
net/core/dev.c
net/decnet/dn_neigh.c
net/decnet/dn_nsp_in.c
net/decnet/dn_route.c
net/ipv4/arp.c
net/ipv4/ip_forward.c
net/ipv4/ip_input.c
net/ipv4/ip_output.c
net/ipv4/ipmr.c
net/ipv4/raw.c
net/ipv4/xfrm4_input.c
net/ipv4/xfrm4_output.c
net/ipv6/ip6_input.c
net/ipv6/ip6_output.c
net/ipv6/ip6mr.c
net/ipv6/mcast.c
net/ipv6/ndisc.c
net/ipv6/output_core.c
net/ipv6/raw.c
net/ipv6/xfrm6_output.c
net/netfilter/ipvs/ip_vs_xmit.c
net/netfilter/nf_queue.c
net/xfrm/xfrm_output.c