remarkable-linux/net/decnet
Eric W. Biederman 29a26a5680 netfilter: Pass struct net into the netfilter hooks
Pass a network namespace parameter into the netfilter hooks.  At the
call site of the netfilter hooks the path a packet is taking through
the network stack is well known which allows the network namespace to
be easily and reliabily.

This allows the replacement of magic code like
"dev_net(state->in?:state->out)" that appears at the start of most
netfilter hooks with "state->net".

In almost all cases the network namespace passed in is derived
from the first network device passed in, guaranteeing those
paths will not see any changes in practice.

The exceptions are:
xfrm/xfrm_output.c:xfrm_output_resume()         xs_net(skb_dst(skb)->xfrm)
ipvs/ip_vs_xmit.c:ip_vs_nat_send_or_cont()      ip_vs_conn_net(cp)
ipvs/ip_vs_xmit.c:ip_vs_send_or_cont()          ip_vs_conn_net(cp)
ipv4/raw.c:raw_send_hdrinc()                    sock_net(sk)
ipv6/ip6_output.c:ip6_xmit()			sock_net(sk)
ipv6/ndisc.c:ndisc_send_skb()                   dev_net(skb->dev) not dev_net(dst->dev)
ipv6/raw.c:raw6_send_hdrinc()                   sock_net(sk)
br_netfilter_hooks.c:br_nf_pre_routing_finish() dev_net(skb->dev) before skb->dev is set to nf_bridge->physindev

In all cases these exceptions seem to be a better expression for the
network namespace the packet is being processed in then the historic
"dev_net(in?in:out)".  I am documenting them in case something odd
pops up and someone starts trying to track down what happened.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-17 17:18:37 -07:00
..
netfilter netfilter: Make nf_hookfn use nf_hook_state. 2015-04-04 12:31:38 -04:00
af_decnet.c net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
dn_dev.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
dn_fib.c net: tcp: add RTAX_CC_ALGO fib handling 2015-01-05 22:55:24 -05:00
dn_neigh.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
dn_nsp_in.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
dn_nsp_out.c net: Merge dst_output and dst_output_sk 2015-09-17 17:18:32 -07:00
dn_route.c netfilter: Pass struct net into the netfilter hooks 2015-09-17 17:18:37 -07:00
dn_rules.c net: ipv6: use common fib_default_rule_pref 2015-09-09 14:19:50 -07:00
dn_table.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
dn_timer.c decnet: Use time_after_eq 2014-08-22 12:23:11 -07:00
Kconfig net/decnet: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:34 -08:00
Makefile
README
sysctl_net_decnet.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
TODO

                       Linux DECnet Project
                      ======================

The documentation for this kernel subsystem is available in the
Documentation/networking subdirectory of this distribution and also
on line at http://www.chygwyn.com/DECnet/

Steve Whitehouse <SteveW@ACM.org>