netfilter: nf_log: prepare net namespace support for loggers
This patch adds netns support to nf_log and it prepares netns support for existing loggers. It is composed of four major changes. 1) nf_log_register has been split to two functions: nf_log_register and nf_log_set. The new nf_log_register is used to globally register the nf_logger and nf_log_set is used for enabling pernet support from nf_loggers. Per netns is not yet complete after this patch, it comes in separate follow up patches. 2) Add net as a parameter of nf_log_bind_pf. Per netns is not yet complete after this patch, it only allows to bind the nf_logger to the protocol family from init_net and it skips other cases. 3) Adapt all nf_log_packet callers to pass netns as parameter. After this patch, this function only works for init_net. 4) Make the sysctl net/netfilter/nf_log pernet. Signed-off-by:Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
Showing
- include/net/netfilter/nf_log.h 10 additions, 4 deletionsinclude/net/netfilter/nf_log.h
- include/net/netns/netfilter.h 7 additions, 0 deletionsinclude/net/netns/netfilter.h
- net/bridge/netfilter/ebt_log.c 4 additions, 3 deletionsnet/bridge/netfilter/ebt_log.c
- net/bridge/netfilter/ebt_nflog.c 3 additions, 2 deletionsnet/bridge/netfilter/ebt_nflog.c
- net/ipv4/netfilter/ip_tables.c 2 additions, 1 deletionnet/ipv4/netfilter/ip_tables.c
- net/ipv4/netfilter/nf_conntrack_proto_icmp.c 4 additions, 4 deletionsnet/ipv4/netfilter/nf_conntrack_proto_icmp.c
- net/ipv6/netfilter/ip6_tables.c 2 additions, 1 deletionnet/ipv6/netfilter/ip6_tables.c
- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 4 additions, 3 deletionsnet/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
- net/netfilter/nf_conntrack_helper.c 1 addition, 1 deletionnet/netfilter/nf_conntrack_helper.c
- net/netfilter/nf_conntrack_proto_dccp.c 5 additions, 4 deletionsnet/netfilter/nf_conntrack_proto_dccp.c
- net/netfilter/nf_conntrack_proto_tcp.c 9 additions, 9 deletionsnet/netfilter/nf_conntrack_proto_tcp.c
- net/netfilter/nf_conntrack_proto_udp.c 3 additions, 3 deletionsnet/netfilter/nf_conntrack_proto_udp.c
- net/netfilter/nf_conntrack_proto_udplite.c 4 additions, 4 deletionsnet/netfilter/nf_conntrack_proto_udplite.c
- net/netfilter/nf_log.c 168 additions, 57 deletionsnet/netfilter/nf_log.c
- net/netfilter/nfnetlink_log.c 3 additions, 2 deletionsnet/netfilter/nfnetlink_log.c
- net/netfilter/xt_osf.c 4 additions, 2 deletionsnet/netfilter/xt_osf.c
Loading
Please register or sign in to comment