Skip to content

: Netfilter update

Patrick McHardy netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest64 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/64: ip_tables: kill useless wrappernet/ipv4/netfilter/ip_tables.c+1 -70 replies
2/64: ip_tables: reformat compat codenet/ipv4/netfilter/ip_tables.c+92 -890 replies
3/64: x_tables: make xt_compat_match_from_user usable in iterator macrosinclude/linux/netfilter/x_tables.h net/ipv4/netfilter/ip_tables.c net/netfilter/x_tables.c+6 -160 replies
4/64: {ip,ip6,arp}_tables: consolidate iterator macrosinclude/linux/netfilter/x_tables.h include/linux/netfilter_arp/arp_tables.h include/linux/netfilter_ipv4/ip_tables.h +1 more+55 -960 replies
5/64: ip_tables: account for struct ipt_entry/struct compat_ipt_entry size diffnet/ipv4/netfilter/ip_tables.c+6 -20 replies
6/64: ip_tables: fix compat typesinclude/linux/netfilter_ipv4/ip_tables.h net/ipv4/netfilter/ip_tables.c+47 -290 replies
7/64: ip_tables: move compat offset calculation to x_tablesinclude/linux/netfilter/x_tables.h net/ipv4/netfilter/ip_tables.c net/netfilter/x_tables.c+70 -590 replies
8/64: ip6_tables: kill a few useless defines/forward declarationsnet/ipv6/netfilter/ip6_tables.c+2 -140 replies
9/64: ip6_tables: move entry, match and target checks to seperate functionsnet/ipv6/netfilter/ip6_tables.c+82 -470 replies
10/64: ip6_tables: use vmalloc_node()net/ipv6/netfilter/ip6_tables.c+4 -30 replies
11/64: ip6_tables: move counter allocation to seperate functionnet/ipv6/netfilter/ip6_tables.c+22 -90 replies
12/64: ip6_tables: move IP6T_SO_GET_INFO handling to seperate functionnet/ipv6/netfilter/ip6_tables.c+47 -420 replies
13/64: ip6_tables: resync get_entries() with ip_tablesnet/ipv6/netfilter/ip6_tables.c+18 -190 replies
14/64: ip6_tables: add compat supportinclude/linux/netfilter_ipv6/ip6_tables.h net/compat.c net/ipv6/netfilter/ip6_tables.c+802 -1620 replies
15/64: x_tables: enable compat translation for IPv6 matches/targetsnet/netfilter/xt_CONNMARK.c net/netfilter/xt_connmark.c net/netfilter/xt_limit.c +1 more+20 -00 replies
16/64: xt_MARK: support revision 1 for IPv6net/netfilter/xt_MARK.c+15 -00 replies
17/64: xt_MARK: add compat support for revision 0net/netfilter/xt_MARK.c+38 -60 replies
18/64: {ip,ip6}_tables: reformat to eliminate differencesnet/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+53 -590 replies
19/64: {ip,ip6}_tables: fix format stringsnet/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+15 -210 replies
20/64: ip6_tables: fix stack leagagenet/ipv6/netfilter/ip6_tables.c+1 -10 replies
21/64: ip6_tables: use raw_smp_processor_id() in do_add_counters()net/ipv6/netfilter/ip6_tables.c+1 -10 replies
22/64: ip_tables: remove ipchains compatibility hacknet/ipv4/netfilter/ip_tables.c+0 -80 replies
23/64: ip6_tables: use XT_ALIGNinclude/linux/netfilter_ipv6/ip6_tables.h+1 -10 replies
24/64: arp_tables: remove obsolete standard_check functionnet/ipv4/netfilter/arp_tables.c+3 -250 replies
25/64: arp_tables: use XT_ALIGNinclude/linux/netfilter_arp/arp_tables.h+1 -10 replies
26/64: arp_tables: use vmalloc_node()net/ipv4/netfilter/arp_tables.c+3 -20 replies
27/64: arp_tables: remove ipchains compat hacknet/ipv4/netfilter/arp_tables.c+0 -40 replies
28/64: arp_tables: move entry and target checks to seperate functionsnet/ipv4/netfilter/arp_tables.c+41 -170 replies
29/64: arp_tables: move counter allocation to seperate functionnet/ipv4/netfilter/arp_tables.c+21 -80 replies
30/64: arp_tables: move ARPT_SO_GET_INFO handling to seperate functionnet/ipv4/netfilter/arp_tables.c+46 -420 replies
31/64: arp_tables: resync get_entries() with ip_tablesnet/ipv4/netfilter/arp_tables.c+19 -200 replies
32/64: arp_tables: add compat supportinclude/linux/netfilter_arp/arp_tables.h net/ipv4/netfilter/arp_tables.c+721 -580 replies
33/64: xt_TCPMSS: don't allow netfilter --setmss to increase mssnet/netfilter/xt_TCPMSS.c+5 -20 replies
34/64: ctnetlink: add support for NAT sequence adjustmentsinclude/linux/netfilter/nf_conntrack_common.h include/linux/netfilter/nfnetlink_conntrack.h net/ipv4/netfilter/nf_nat_helper.c +1 more+140 -10 replies
35/64: ctnetlink: add support for master tuple event notification and dumpingnet/netfilter/nf_conntrack_netlink.c+28 -00 replies
36/64: ctnetlink: add support for secmarkinclude/linux/netfilter/nf_conntrack_common.h include/linux/netfilter/nfnetlink_conntrack.h net/netfilter/nf_conntrack_netlink.c +1 more+31 -10 replies
37/64: nf_conntrack_sctp: add ctnetlink supportnet/netfilter/nf_conntrack_proto_sctp.c+10 -00 replies
38/64: Add NLA_PUT_BE16/nla_get_be16()include/net/netlink.h+12 -00 replies
39/64: ctnetlink: use netlink attribute helpersnet/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c net/ipv4/netfilter/nf_conntrack_proto_icmp.c net/ipv4/netfilter/nf_nat_core.c +4 more+70 -1070 replies
40/64: ctnetlink: fix expectation timeout dumpingnet/netfilter/nf_conntrack_netlink.c+5 -20 replies
41/64: nf_nat_proto_gre: add missing module referencenet/ipv4/netfilter/nf_nat_proto_gre.c+1 -00 replies
42/64: nf_nat: mark NAT protocols constinclude/net/netfilter/nf_nat_protocol.h net/ipv4/netfilter/nf_nat_core.c net/ipv4/netfilter/nf_nat_proto_gre.c +5 more+25 -250 replies
43/64: nf_nat: sprinkle a few __read_mostlysnet/ipv4/netfilter/nf_nat_core.c+5 -40 replies
44/64: nf_nat: pass manip type instead of hook to nf_nat_setup_infoinclude/net/netfilter/nf_nat.h net/ipv4/netfilter/ipt_MASQUERADE.c net/ipv4/netfilter/ipt_NETMAP.c +8 more+25 -440 replies
45/64: nf_log: move logging stuff to seperate headerinclude/linux/netfilter.h include/net/netfilter/nf_log.h net/bridge/netfilter/ebt_log.c +14 more+74 -550 replies
46/64: nf_log: constify struct nf_logger and nf_log_packet loginfo arginclude/net/netfilter/nf_log.h net/bridge/netfilter/ebt_log.c net/bridge/netfilter/ebt_ulog.c +4 more+13 -130 replies
47/64: nf_log: remove incomprehensible commentnet/netfilter/nf_log.c+0 -10 replies
48/64: nfnetlink_log: fix checks in nfulnl_recv_confignet/netfilter/nfnetlink_log.c+27 -220 replies
49/64: nfnetlink_{queue,log}: return ENOTSUPP for unknown cfg commandsnet/netfilter/nfnetlink_log.c net/netfilter/nfnetlink_queue.c+2 -20 replies
50/64: nfnetlink_log: remove excessive debuggingnet/netfilter/nfnetlink_log.c+0 -450 replies
51/64: nfnetlink_{queue,log}: return proper error codes in instance_createnet/netfilter/nfnetlink_log.c net/netfilter/nfnetlink_queue.c+23 -120 replies
52/64: nfnetlink_log: use endianness-aware attribute functionsnet/netfilter/nfnetlink_log.c+35 -520 replies
53/64: nfnetlink_log: include GID in netlink messageinclude/linux/netfilter/nfnetlink_log.h net/netfilter/nfnetlink_log.c+4 -00 replies
54/64: Kill function prototype for non-existing functioninclude/linux/netfilter.h+0 -30 replies
55/64: constify nf_afinfoinclude/linux/netfilter.h net/ipv4/netfilter.c net/ipv6/netfilter.c +3 more+13 -130 replies
56/64: nf_nat: properly use RCU for ip_nat_decode_sessioninclude/linux/netfilter.h net/ipv4/netfilter/nf_nat_standalone.c+11 -60 replies
57/64: x_tables: use %u format specifiersnet/ipv4/netfilter/ipt_CLUSTERIP.c net/netfilter/xt_CONNMARK.c net/netfilter/xt_CONNSECMARK.c +5 more+8 -80 replies
58/64: Introduce nf_inet_addressinclude/linux/netfilter.h include/linux/netfilter/nf_conntrack_h323.h include/net/netfilter/nf_conntrack_expect.h +7 more+55 -560 replies
59/64: Parenthesize macro parametersnet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv4/netfilter/nf_nat_snmp_basic.c +7 more+19 -160 replies
60/64: xt_connlimit: use the new union nf_inet_addrinclude/linux/netfilter/xt_connlimit.h net/netfilter/xt_connlimit.c+10 -60 replies
61/64: xt_hashlimit: speedup hash_dst()net/netfilter/xt_hashlimit.c+10 -10 replies
62/64: xt_hashlimit: reduce overhead without IPv6net/netfilter/xt_hashlimit.c+17 -30 replies
63/64: non-power-of-two jhash optimizationsnet/ipv4/netfilter/ipt_CLUSTERIP.c net/ipv4/netfilter/nf_nat_core.c net/netfilter/nf_conntrack_core.c +1 more+14 -80 replies
64/64: Add CONFIG_NETFILTER_ADVANCED optionnet/Kconfig net/bridge/netfilter/Kconfig net/decnet/netfilter/Kconfig +3 more+124 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [NETFILTER 00/64]: Netfilter update

Hi Dave,

following is a rather large netfilter update for 2.6.25. The diffstat looks a bit worse than it is, most files are only touched due to __read_mostly and const annotations. The rough overview is:

- Some type consitency improvements for ip_tables compat support, doesn't actual change or fix anything, but the current code is rather inconsistent and only works for ip_tables, not the other copy-and-paste ports.

- Compat support for ip6_tables and arp_tables

- Resyncing of ip_tables, ip6_tables and arp_tables, not entirely completed yet, but I'll do that on top since its getting more and more complicated to do in proper order with this huge stack of patches.

- More const and __read_mostly annotations

- NAT API change to stop using hook numbers to indicate mapping types, which is a relict from before rusty-nat

- Conversion of multiple files to typeful netlink attribute helpers

- nfnetlink_log resyncing with the nfnetlink_queue changes (which are in most parts copies of each other). Also not completely done yet, will be completed on top.

- Eric's hashlimit optimizations

- Similar optimizations for the other non-power-of-two netfilter hashes

- ctnetlink updates from Pablo, adding better support for helpers, SCTP and secmark

- Some cleanups by Jan, mainly converting multiple IPv4/IPv6 address types to a single unified one

- Finally, the CONFIG_NETFILTER_ADVANCED patch. Its more intrusive than I hoped and the choices weren't really clear, so Its last in the series. Please have a look whether you think its useful like this, otherwise feel free to drop it.

Please apply, thanks.

 include/linux/netfilter.h                      |   85 +--
 include/linux/netfilter/nf_conntrack_common.h  |    8 +
 include/linux/netfilter/nf_conntrack_h323.h    |    6 +-
 include/linux/netfilter/nfnetlink_conntrack.h  |   11 +
 include/linux/netfilter/nfnetlink_log.h        |    1 +
 include/linux/netfilter/x_tables.h             |   51 +-
 include/linux/netfilter/xt_connlimit.h         |    9 +-
 include/linux/netfilter_arp/arp_tables.h       |   50 +-
 include/linux/netfilter_ipv4/ip_tables.h       |   76 +--
 include/linux/netfilter_ipv6/ip6_tables.h      |   73 +-
 include/net/netfilter/nf_conntrack_expect.h    |    4 +-
 include/net/netfilter/nf_conntrack_tuple.h     |   17 +-
 include/net/netfilter/nf_log.h                 |   59 ++
 include/net/netfilter/nf_nat.h                 |    2 +-
 include/net/netfilter/nf_nat_protocol.h        |   18 +-
 include/net/netlink.h                          |   12 +
 net/Kconfig                                    |   12 +
 net/bridge/netfilter/Kconfig                   |    2 +-
 net/bridge/netfilter/ebt_log.c                 |    3 +-
 net/bridge/netfilter/ebt_ulog.c                |    3 +-
 net/compat.c                                   |  106 ---
 net/decnet/netfilter/Kconfig                   |    1 +
 net/ipv4/netfilter.c                           |    2 +-
 net/ipv4/netfilter/Kconfig                     |   26 +-
 net/ipv4/netfilter/arp_tables.c                |  984 +++++++++++++++++----
 net/ipv4/netfilter/ip_tables.c                 |  386 ++++-----
 net/ipv4/netfilter/ipt_CLUSTERIP.c             |    4 +-
 net/ipv4/netfilter/ipt_LOG.c                   |    3 +-
 net/ipv4/netfilter/ipt_MASQUERADE.c            |    2 +-
 net/ipv4/netfilter/ipt_NETMAP.c                |    2 +-
 net/ipv4/netfilter/ipt_REDIRECT.c              |    2 +-
 net/ipv4/netfilter/ipt_ULOG.c                  |    1 +
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |   10 +-
 net/ipv4/netfilter/nf_conntrack_proto_icmp.c   |   19 +-
 net/ipv4/netfilter/nf_nat_core.c               |   58 +-
 net/ipv4/netfilter/nf_nat_h323.c               |   26 +-
 net/ipv4/netfilter/nf_nat_helper.c             |    9 +-
 net/ipv4/netfilter/nf_nat_pptp.c               |    6 +-
 net/ipv4/netfilter/nf_nat_proto_gre.c          |    3 +-
 net/ipv4/netfilter/nf_nat_proto_icmp.c         |    2 +-
 net/ipv4/netfilter/nf_nat_proto_tcp.c          |    2 +-
 net/ipv4/netfilter/nf_nat_proto_udp.c          |    2 +-
 net/ipv4/netfilter/nf_nat_proto_unknown.c      |    2 +-
 net/ipv4/netfilter/nf_nat_rule.c               |    8 +-
 net/ipv4/netfilter/nf_nat_sip.c                |    6 +-
 net/ipv4/netfilter/nf_nat_snmp_basic.c         |    2 +-
 net/ipv4/netfilter/nf_nat_standalone.c         |    6 +-
 net/ipv6/netfilter.c                           |    2 +-
 net/ipv6/netfilter/Kconfig                     |   23 +-
 net/ipv6/netfilter/ip6_tables.c                | 1157 +++++++++++++++++++-----
 net/ipv6/netfilter/ip6t_LOG.c                  |    3 +-
 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c |   19 +-
 net/netfilter/Kconfig                          |   71 ++-
 net/netfilter/core.c                           |    6 +-
 net/netfilter/nf_conntrack_core.c              |   12 +-
 net/netfilter/nf_conntrack_expect.c            |   12 +-
 net/netfilter/nf_conntrack_ftp.c               |    2 +-
 net/netfilter/nf_conntrack_h323_asn1.c         |    8 +-
 net/netfilter/nf_conntrack_h323_main.c         |   36 +-
 net/netfilter/nf_conntrack_netlink.c           |  254 +++++-
 net/netfilter/nf_conntrack_proto_sctp.c        |   18 +-
 net/netfilter/nf_conntrack_proto_tcp.c         |   23 +-
 net/netfilter/nf_conntrack_proto_udp.c         |    1 +
 net/netfilter/nf_conntrack_proto_udplite.c     |    1 +
 net/netfilter/nf_conntrack_sip.c               |    8 +-
 net/netfilter/nf_log.c                         |   12 +-
 net/netfilter/nf_queue.c                       |    4 +-
 net/netfilter/nfnetlink_log.c                  |  203 ++---
 net/netfilter/nfnetlink_queue.c                |   23 +-
 net/netfilter/x_tables.c                       |   63 ++-
 net/netfilter/xt_CONNMARK.c                    |    7 +-
 net/netfilter/xt_CONNSECMARK.c                 |    7 +-
 net/netfilter/xt_MARK.c                        |   55 +-
 net/netfilter/xt_NFLOG.c                       |    1 +
 net/netfilter/xt_TCPMSS.c                      |    7 +-
 net/netfilter/xt_connbytes.c                   |    2 +-
 net/netfilter/xt_connlimit.c                   |   25 +-
 net/netfilter/xt_connmark.c                    |    7 +-
 net/netfilter/xt_conntrack.c                   |    5 +-
 net/netfilter/xt_hashlimit.c                   |   31 +-
 net/netfilter/xt_helper.c                      |    2 +-
 net/netfilter/xt_limit.c                       |    5 +
 net/netfilter/xt_mark.c                        |    5 +
 net/netfilter/xt_policy.c                      |    2 +-
 net/netfilter/xt_state.c                       |    2 +-
 net/netfilter/xt_string.c                      |    2 +-
 86 files changed, 2995 insertions(+), 1313 deletions(-)
 create mode 100644 include/net/netfilter/nf_log.h

Benjamin LaHaise (1):

      [NETFILTER]: xt_TCPMSS: don't allow netfilter --setmss to increase mss

Eric Dumazet (2):
[NETFILTER]: xt_hashlimit: speedup hash_dst() [NETFILTER]: xt_hashlimit: reduce overhead without IPv6

Jan Engelhardt (4):
[NETFILTER]: x_tables: use %u format specifiers [NETFILTER]: Introduce nf_inet_address [NETFILTER]: Parenthesize macro parameters [NETFILTER]: xt_connlimit: use the new union nf_inet_addr

Pablo Neira Ayuso (4):
[NETFILTER]: ctnetlink: add support for NAT sequence adjustments [NETFILTER]: ctnetlink: add support for master tuple event notification and dumping [NETFILTER]: ctnetlink: add support for secmark
[NETFILTER]: nf_conntrack_sctp: add ctnetlink support

Patrick McHardy (53):
[NETFILTER]: ip_tables: kill useless wrapper
[NETFILTER]: ip_tables: reformat compat code
[NETFILTER]: x_tables: make xt_compat_match_from_user usable in iterator macros [NETFILTER]: {ip,ip6,arp}_tables: consolidate iterator macros [NETFILTER]: ip_tables: account for struct ipt_entry/struct compat_ipt_entry size diff [NETFILTER]: ip_tables: fix compat types
[NETFILTER]: ip_tables: move compat offset calculation to x_tables [NETFILTER]: ip6_tables: kill a few useless defines/forward declarations [NETFILTER]: ip6_tables: move entry, match and target checks to seperate functions [NETFILTER]: ip6_tables: use vmalloc_node()
[NETFILTER]: ip6_tables: move counter allocation to seperate function [NETFILTER]: ip6_tables: move IP6T_SO_GET_INFO handling to seperate function [NETFILTER]: ip6_tables: resync get_entries() with ip_tables [NETFILTER]: ip6_tables: add compat support
[NETFILTER]: x_tables: enable compat translation for IPv6 matches/targets [NETFILTER]: xt_MARK: support revision 1 for IPv6
[NETFILTER]: xt_MARK: add compat support for revision 0
[NETFILTER]: {ip,ip6}_tables: reformat to eliminate differences [NETFILTER]: {ip,ip6}_tables: fix format strings
[NETFILTER]: ip6_tables: fix stack leagage
[NETFILTER]: ip6_tables: use raw_smp_processor_id() in do_add_counters() [NETFILTER]: ip_tables: remove ipchains compatibility hack
[NETFILTER]: ip6_tables: use XT_ALIGN
[NETFILTER]: arp_tables: remove obsolete standard_check function [NETFILTER]: arp_tables: use XT_ALIGN
[NETFILTER]: arp_tables: use vmalloc_node()
[NETFILTER]: arp_tables: remove ipchains compat hack
[NETFILTER]: arp_tables: move entry and target checks to seperate functions [NETFILTER]: arp_tables: move counter allocation to seperate function [NETFILTER]: arp_tables: move ARPT_SO_GET_INFO handling to seperate function [NETFILTER]: arp_tables: resync get_entries() with ip_tables [NETFILTER]: arp_tables: add compat support
[NETLINK]: Add NLA_PUT_BE16/nla_get_be16()
[NETFILTER]: ctnetlink: use netlink attribute helpers
[NETFILTER]: ctnetlink: fix expectation timeout dumping
[NETFILTER]: nf_nat_proto_gre: add missing module reference [NETFILTER]: nf_nat: mark NAT protocols const
[NETFILTER]: nf_nat: sprinkle a few __read_mostlys
[NETFILTER]: nf_nat: pass manip type instead of hook to nf_nat_setup_info [NETFILTER]: nf_log: move logging stuff to seperate header
[NETFILTER]: nf_log: constify struct nf_logger and nf_log_packet loginfo arg [NETFILTER]: nf_log: remove incomprehensible comment
[NETFILTER]: nfnetlink_log: fix checks in nfulnl_recv_config [NETFILTER]: nfnetlink_{queue,log}: return ENOTSUPP for unknown cfg commands [NETFILTER]: nfnetlink_log: remove excessive debugging
[NETFILTER]: nfnetlink_{queue,log}: return proper error codes in instance_create [NETFILTER]: nfnetlink_log: use endianness-aware attribute functions [NETFILTER]: nfnetlink_log: include GID in netlink message
[NETFILTER]: Kill function prototype for non-existing function [NETFILTER]: constify nf_afinfo
[NETFILTER]: nf_nat: properly use RCU for ip_nat_decode_session [NETFILTER]: non-power-of-two jhash optimizations
[NETFILTER]: Add CONFIG_NETFILTER_ADVANCED option