Skip to content

Netfilter/IPVS updates for net-next

Pablo Neira Ayuso netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest47 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/47netfilter: nf_tables: nf_tables_obj_lookup_byhandle() can be staticnet/netfilter/nf_tables_api.c+4 -40 replies
2/47netfilter: nfnetlink_acct: remove useless parameterinclude/linux/netfilter/nfnetlink_acct.h net/netfilter/nfnetlink_acct.c net/netfilter/xt_nfacct.c+3 -50 replies
3/47netfilter: xt_cluster: get rid of xt_cluster_ipv6_is_multicastnet/netfilter/xt_cluster.c+1 -90 replies
4/47netfilter: nf_conntrack_broadcast: remove useless parameterinclude/net/netfilter/nf_conntrack_helper.h net/netfilter/nf_conntrack_broadcast.c net/netfilter/nf_conntrack_netbios_ns.c +1 more+7 -70 replies
5/47netfilter: ipt_ah: return boolean instead of integernet/ipv4/netfilter/ipt_ah.c+1 -10 replies
6/47netfilter: unlock xt_table earlier in __do_replacenet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+6 -30 replies
7/47netfilter: x_tables: check standard verdicts in corenet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c +1 more+43 -210 replies
8/47netfilter: x_tables: check error target size toonet/netfilter/x_tables.c+23 -00 replies
9/47netfilter: x_tables: move hook entry checks into coreinclude/linux/netfilter/x_tables.h net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c +2 more+40 -300 replies
10/47netfilter: x_tables: enforce unique and ascending entry pointsnet/netfilter/x_tables.c+30 -10 replies
11/47netfilter: x_tables: cap allocations at 512 mbytenet/netfilter/x_tables.c+2 -10 replies
12/47netfilter: x_tables: limit allocation requests for blob rule headsnet/netfilter/x_tables.c+3 -00 replies
13/47netfilter: x_tables: add counters allocation wrapperinclude/linux/netfilter/x_tables.h net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c +2 more+19 -30 replies
14/47netfilter: compat: prepare xt_compat_init_offsets to return errorsinclude/linux/netfilter/x_tables.h net/bridge/netfilter/ebtables.c net/ipv4/netfilter/arp_tables.c +3 more+32 -120 replies
15/47netfilter: compat: reject huge allocation requestsnet/netfilter/x_tables.c+18 -80 replies
16/47netfilter: x_tables: make sure compat af mutex is heldnet/netfilter/x_tables.c+6 -00 replies
17/47netfilter: x_tables: ensure last rule in base chain matches underflow/policynet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+48 -30 replies
18/47netfilter: make xt_rateest hash table per netinclude/net/netfilter/xt_rateest.h net/netfilter/xt_RATEEST.c net/netfilter/xt_rateest.c+72 -330 replies
19/47netfilter: xt_limit: Spelling s/maxmum/maximum/net/netfilter/xt_limit.c+1 -10 replies
20/47netfilter: x_tables: fix build with CONFIG_COMPAT=nnet/netfilter/x_tables.c+31 -310 replies
21/47ipvs: use true and false for boolean valuesnet/netfilter/ipvs/ip_vs_lblc.c net/netfilter/ipvs/ip_vs_lblcr.c+4 -40 replies
22/47netfilter: Refactor nf_conncountinclude/net/netfilter/nf_conntrack_count.h net/netfilter/nf_conncount.c net/netfilter/xt_connlimit.c+3 -60 replies
23/47netfilter: conncount: Support count only use casenet/netfilter/nf_conncount.c+8 -20 replies
24/47netfilter: nft_ct: add NFT_CT_{SRC,DST}_{IP,IP6}include/uapi/linux/netfilter/nf_tables.h net/netfilter/nft_ct.c+48 -20 replies
25/47netfilter: cttimeout: remove VLA usagenet/netfilter/nfnetlink_cttimeout.c+17 -90 replies
26/47netfilter: nfnetlink_cthelper: Remove VLA usagenet/netfilter/nfnetlink_cthelper.c+17 -80 replies
27/47netfilter: nf_tables: remove VLA usagenet/netfilter/nf_tables_api.c+15 -80 replies
28/47netfilter: ebtables: use ADD_COUNTER macronet/bridge/netfilter/ebtables.c+6 -110 replies
29/47netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.include/uapi/linux/netfilter/xt_connmark.h net/netfilter/xt_connmark.c+70 -170 replies
30/47netfilter: Replace printk() with pr_*() and define pr_fmt()net/netfilter/nf_conntrack_acct.c net/netfilter/nf_conntrack_ecache.c net/netfilter/nf_conntrack_timestamp.c +5 more+37 -260 replies
31/47netfilter: ctnetlink: synproxy supportinclude/uapi/linux/netfilter/nf_conntrack_common.h include/uapi/linux/netfilter/nfnetlink_conntrack.h net/ipv4/netfilter/ipt_SYNPROXY.c +2 more+109 -50 replies
32/47netfilter: ebtables: add support for matching ICMP type and codeinclude/uapi/linux/netfilter_bridge/ebt_ip.h net/bridge/netfilter/ebt_ip.c+43 -130 replies
33/47netfilter: ebtables: add support for matching IGMP typeinclude/uapi/linux/netfilter_bridge/ebt_ip.h net/bridge/netfilter/ebt_ip.c+20 -30 replies
34/47netfilter: ebtables: Add support for specifying match revisioninclude/uapi/linux/netfilter_bridge/ebtables.h net/bridge/netfilter/ebtables.c+42 -210 replies
35/47netfilter: ebtables: Add string filternet/netfilter/xt_string.c+1 -00 replies
36/47netfilter: add flowtable documentationDocumentation/networking/nf_flowtable.txt+112 -00 replies
37/47netfilter: ebt_stp: Use generic functions for comparisonsnet/bridge/netfilter/ebt_stp.c+2 -40 replies
38/47netfilter: nf_tables: rename struct nf_chain_typeinclude/net/netfilter/nf_tables.h net/bridge/netfilter/nf_tables_bridge.c net/ipv4/netfilter/nf_tables_arp.c +9 more+27 -270 replies
39/47netfilter: nf_tables: nft_register_chain_type() returns voidinclude/net/netfilter/nf_tables.h net/bridge/netfilter/nf_tables_bridge.c net/ipv4/netfilter/nf_tables_arp.c +9 more+30 -300 replies
40/47netfilter: nf_tables: build-in filter chain typeinclude/net/netfilter/nf_tables.h net/bridge/netfilter/Kconfig net/bridge/netfilter/Makefile +14 more+414 -5093 replies
41/47netfilter: nf_tables: enable conntrack if NAT chain is registeredinclude/net/netfilter/nf_tables.h net/ipv4/netfilter/nft_chain_nat_ipv4.c net/ipv6/netfilter/nft_chain_nat_ipv6.c +1 more+45 -70 replies
42/47netfilter: nf_tables: rename to nft_set_lookup_global()include/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c net/netfilter/nft_dynset.c +2 more+19 -170 replies
43/47netfilter: nf_tables: use nft_set_lookup_global from nf_tables_newsetelem()net/netfilter/nf_tables_api.c+4 -110 replies
44/47netfilter: Merge assignment with returnnet/netfilter/nf_conntrack_netlink.c net/netfilter/xt_hashlimit.c+3 -50 replies
45/47netfilter: x_tables: Add note about how to free percpu countersnet/netfilter/x_tables.c+3 -10 replies
46/47Revert "netfilter: x_tables: ensure last rule in base chain matches underflow/policy"net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+3 -480 replies
47/47netfilter: ipset: Use is_zero_ether_addr instead of static and memcmpnet/netfilter/ipset/ip_set_hash_mac.c+2 -50 replies

Reviews trailers per patch

8 of 47 patches have a Reviewed-by or Acked-by.

PatchEric DumazetFlorian Westphal
1/47
2/47
3/47
4/47
5/47
6/47
7/47
8/47
9/47
10/47
11/47
12/47
13/47
14/47
15/47
16/47
17/47
18/47R-b
19/47
20/47
21/47
22/47A-b
23/47A-b
24/47A-b
25/47
26/47
27/47
28/47
29/47R-b
30/47
31/47
32/47A-b
33/47A-b
34/47
35/47
36/47R-b
37/47
38/47
39/47
40/47
41/47
42/47
43/47
44/47
45/47
46/47
47/47

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/47] Netfilter/IPVS updates for net-next

Hi David,

The following patchset contains Netfilter/IPVS updates for your net-next tree. This batch comes with more input sanitization for xtables to address bug reports from fuzzers, preparation works to the flowtable infrastructure and assorted updates. In no particular order, they are:

1) Make sure userspace provides a valid standard target verdict, from Florian Westphal.

2) Sanitize error target size, also from Florian.

3) Validate that last rule in basechain matches underflow/policy since userspace assumes this when decoding the ruleset blob that comes from the kernel, from Florian.

4) Consolidate hook entry checks through xt_check_table_hooks(), patch from Florian.

5) Cap ruleset allocations at 512 mbytes, 134217728 rules and reject very large compat offset arrays, so we have a reasonable upper limit and fuzzers don't exercise the oom-killer. Patches from Florian.

6) Several WARN_ON checks on xtables mutex helper, from Florian.

7) xt_rateest now has a hashtable per net, from Cong Wang.

8) Consolidate counter allocation in xt_counters_alloc(), from Florian.

9) Earlier xt_table_unlock() call in {ip,ip6,arp,eb}tables, patch from Xin Long.

10) Set FLOW_OFFLOAD_DIR_* to IP_CT_DIR_* definitions, patch from Felix Fietkau.

11) Consolidate code through flow_offload_fill_dir(), also from Felix.

12) Inline ip6_dst_mtu_forward() just like ip_dst_mtu_maybe_forward() to remove a dependency with flowtable and ipv6.ko, from Felix.

13) Cache mtu size in flow_offload_tuple object, this is safe for forwarding as f87c10a8aa1e describes, from Felix.

14) Rename nf_flow_table.c to nf_flow_table_core.o, to simplify too modular infrastructure, from Felix.

15) Add rt0, rt2 and rt4 IPv6 routing extension support, patch from Ahmed Abdelsalam.

16) Remove unused parameter in nf_conncount_count(), from Yi-Hung Wei.

17) Support for counting only to nf_conncount infrastructure, patch from Yi-Hung Wei.

18) Add strict NFT_CT_{SRC_IP,DST_IP,SRC_IP6,DST_IP6} key datatypes to nft_ct.

19) Use boolean as return value from ipt_ah and from IPVS too, patch from Gustavo A. R. Silva.

20) Remove useless parameters in nfnl_acct_overquota() and nf_conntrack_broadcast_help(), from Taehee Yoo.

21) Use ipv6_addr_is_multicast() from xt_cluster, also from Taehee Yoo.

22) Statify nf_tables_obj_lookup_byhandle, patch from Fengguang Wu.

23) Fix typo in xt_limit, from Geert Uytterhoeven.

24) Do no use VLAs in Netfilter code, again from Gustavo.

25) Use ADD_COUNTER from ebtables, from Taehee Yoo.

26) Bitshift support for CONNMARK and MARK targets, from Jack Ma.

27) Use pr_*() and add pr_fmt(), from Arushi Singhal.

28) Add synproxy support to ctnetlink.

29) ICMP type and IGMP matching support for ebtables, patches from Matthias Schiffer.

30) Support for the revision infrastructure to ebtables, from Bernie Harris.

31) String match support for ebtables, also from Bernie.

32) Documentation for the new flowtable infrastructure.

33) Use generic comparison functions in ebt_stp, from Joe Perches.

34) Demodularize filter chains in nftables.

35) Register conntrack hooks in case nftables NAT chain is added.

36) Merge assignments with return in a couple of spots in the Netfilter codebase, also from Arushi.

37) Document that xtables percpu counters are stored in the same memory area, from Ben Hutchings.

38) Revert mark_source_chains() sanity checks that break existing rulesets, from Florian Westphal.

39) Use is_zero_ether_addr() in the ipset codebase, from Joe Perches.

You can pull these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git

Thanks!

----------------------------------------------------------------

The following changes since commit ef3f6c256f0b4711a3ef1489797b95820be5ab01:

Merge branch 'mvpp2-jumbo-frames-support' (2018-03-05 12:55:55 -0500)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git HEAD

for you to fetch changes up to 26c97c5d8dac6bc56d4360561a286f52543ac07e:

netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp (2018-03-30 12:20:44 +0200)

----------------------------------------------------------------
Arushi Singhal (2):
netfilter: Replace printk() with pr_*() and define pr_fmt()
netfilter: Merge assignment with return

Ben Hutchings (1):
netfilter: x_tables: Add note about how to free percpu counters

Bernie Harris (2):
netfilter: ebtables: Add support for specifying match revision
netfilter: ebtables: Add string filter

Cong Wang (1):
netfilter: make xt_rateest hash table per net

Florian Westphal (13):
netfilter: x_tables: check standard verdicts in core
netfilter: x_tables: check error target size too
netfilter: x_tables: move hook entry checks into core
netfilter: x_tables: enforce unique and ascending entry points
netfilter: x_tables: cap allocations at 512 mbyte
netfilter: x_tables: limit allocation requests for blob rule heads
netfilter: x_tables: add counters allocation wrapper
netfilter: compat: prepare xt_compat_init_offsets to return errors
netfilter: compat: reject huge allocation requests
netfilter: x_tables: make sure compat af mutex is held
netfilter: x_tables: ensure last rule in base chain matches underflow/policy
netfilter: x_tables: fix build with CONFIG_COMPAT=n
Revert "netfilter: x_tables: ensure last rule in base chain matches underflow/policy"

Geert Uytterhoeven (1):
netfilter: xt_limit: Spelling s/maxmum/maximum/

Gustavo A. R. Silva (5):
netfilter: ipt_ah: return boolean instead of integer
ipvs: use true and false for boolean values
netfilter: cttimeout: remove VLA usage
netfilter: nfnetlink_cthelper: Remove VLA usage
netfilter: nf_tables: remove VLA usage

Jack Ma (1):
netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.

Joe Perches (2):
netfilter: ebt_stp: Use generic functions for comparisons
netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp

Matthias Schiffer (2):
netfilter: ebtables: add support for matching ICMP type and code
netfilter: ebtables: add support for matching IGMP type

Pablo Neira Ayuso (9):
netfilter: nft_ct: add NFT_CT_{SRC,DST}_{IP,IP6}
netfilter: ctnetlink: synproxy support
netfilter: add flowtable documentation
netfilter: nf_tables: rename struct nf_chain_type
netfilter: nf_tables: nft_register_chain_type() returns void
netfilter: nf_tables: build-in filter chain type
netfilter: nf_tables: enable conntrack if NAT chain is registered
netfilter: nf_tables: rename to nft_set_lookup_global()
netfilter: nf_tables: use nft_set_lookup_global from nf_tables_newsetelem()

Taehee Yoo (4):
netfilter: nfnetlink_acct: remove useless parameter
netfilter: xt_cluster: get rid of xt_cluster_ipv6_is_multicast
netfilter: nf_conntrack_broadcast: remove useless parameter
netfilter: ebtables: use ADD_COUNTER macro

Xin Long (1):
netfilter: unlock xt_table earlier in __do_replace

Yi-Hung Wei (2):
netfilter: Refactor nf_conncount
netfilter: conncount: Support count only use case

kbuild test robot (1):
netfilter: nf_tables: nf_tables_obj_lookup_byhandle() can be static

 Documentation/networking/nf_flowtable.txt          | 112 ++++++
 include/linux/netfilter/nfnetlink_acct.h           |   3 +-
 include/linux/netfilter/x_tables.h                 |   5 +-
 include/net/netfilter/nf_conntrack_count.h         |   1 -
 include/net/netfilter/nf_conntrack_helper.h        |   3 +-
 include/net/netfilter/nf_tables.h                  |  33 +-
 include/net/netfilter/xt_rateest.h                 |   4 +-
 include/uapi/linux/netfilter/nf_conntrack_common.h |   1 +
 include/uapi/linux/netfilter/nf_tables.h           |  12 +-
 include/uapi/linux/netfilter/nfnetlink_conntrack.h |  10 +
 include/uapi/linux/netfilter/xt_connmark.h         |  10 +
 include/uapi/linux/netfilter_bridge/ebt_ip.h       |  15 +-
 include/uapi/linux/netfilter_bridge/ebtables.h     |  16 +-
 net/bridge/netfilter/Kconfig                       |   2 +-
 net/bridge/netfilter/Makefile                      |   1 -
 net/bridge/netfilter/ebt_ip.c                      |  58 ++-
 net/bridge/netfilter/ebt_stp.c                     |   6 +-
 net/bridge/netfilter/ebtables.c                    |  74 ++--
 net/bridge/netfilter/nf_tables_bridge.c            |  79 ----
 net/ipv4/netfilter/Kconfig                         |   4 +-
 net/ipv4/netfilter/Makefile                        |   2 -
 net/ipv4/netfilter/arp_tables.c                    |  33 +-
 net/ipv4/netfilter/ip_tables.c                     |  31 +-
 net/ipv4/netfilter/ipt_SYNPROXY.c                  |   8 +-
 net/ipv4/netfilter/ipt_ah.c                        |   2 +-
 net/ipv4/netfilter/nf_tables_arp.c                 |  58 ---
 net/ipv4/netfilter/nf_tables_ipv4.c                |  67 ----
 net/ipv4/netfilter/nft_chain_nat_ipv4.c            |  20 +-
 net/ipv4/netfilter/nft_chain_route_ipv4.c          |   6 +-
 net/ipv6/netfilter/Kconfig                         |   2 +-
 net/ipv6/netfilter/Makefile                        |   1 -
 net/ipv6/netfilter/ip6_tables.c                    |  33 +-
 net/ipv6/netfilter/ip6t_SYNPROXY.c                 |   8 +-
 net/ipv6/netfilter/nf_tables_ipv6.c                |  65 ----
 net/ipv6/netfilter/nft_chain_nat_ipv6.c            |  20 +-
 net/ipv6/netfilter/nft_chain_route_ipv6.c          |   6 +-
 net/netfilter/Kconfig                              |   4 +-
 net/netfilter/Makefile                             |   9 +-
 net/netfilter/ipset/ip_set_hash_mac.c              |   7 +-
 net/netfilter/ipvs/ip_vs_lblc.c                    |   4 +-
 net/netfilter/ipvs/ip_vs_lblcr.c                   |   4 +-
 net/netfilter/nf_conncount.c                       |  14 +-
 net/netfilter/nf_conntrack_acct.c                  |   6 +-
 net/netfilter/nf_conntrack_broadcast.c             |   1 -
 net/netfilter/nf_conntrack_ecache.c                |   6 +-
 net/netfilter/nf_conntrack_netbios_ns.c            |   5 +-
 net/netfilter/nf_conntrack_netlink.c               |  92 ++++-
 net/netfilter/nf_conntrack_snmp.c                  |   5 +-
 net/netfilter/nf_conntrack_timestamp.c             |   6 +-
 net/netfilter/nf_nat_core.c                        |   4 +-
 net/netfilter/nf_nat_ftp.c                         |   7 +-
 net/netfilter/nf_nat_irc.c                         |   7 +-
 net/netfilter/nf_tables_api.c                      | 115 +++---
 net/netfilter/nf_tables_inet.c                     |  75 ----
 net/netfilter/nf_tables_netdev.c                   | 142 --------
 net/netfilter/nfnetlink_acct.c                     |   3 +-
 net/netfilter/nfnetlink_cthelper.c                 |  25 +-
 net/netfilter/nfnetlink_cttimeout.c                |  26 +-
 net/netfilter/nfnetlink_queue.c                    |  14 +-
 net/netfilter/nft_chain_filter.c                   | 398 +++++++++++++++++++++
 net/netfilter/nft_ct.c                             |  38 ++
 net/netfilter/nft_dynset.c                         |   5 +-
 net/netfilter/nft_lookup.c                         |   4 +-
 net/netfilter/nft_objref.c                         |   5 +-
 net/netfilter/x_tables.c                           | 191 +++++++++-
 net/netfilter/xt_RATEEST.c                         |  91 +++--
 net/netfilter/xt_cluster.c                         |  10 +-
 net/netfilter/xt_connlimit.c                       |   4 +-
 net/netfilter/xt_connmark.c                        |  77 +++-
 net/netfilter/xt_hashlimit.c                       |   3 +-
 net/netfilter/xt_limit.c                           |   2 +-
 net/netfilter/xt_nfacct.c                          |   2 +-
 net/netfilter/xt_rateest.c                         |  10 +-
 net/netfilter/xt_string.c                          |   1 +
 net/netfilter/xt_time.c                            |  13 +-
 75 files changed, 1384 insertions(+), 862 deletions(-)
 create mode 100644 Documentation/networking/nf_flowtable.txt
 delete mode 100644 net/bridge/netfilter/nf_tables_bridge.c
 delete mode 100644 net/ipv4/netfilter/nf_tables_arp.c
 delete mode 100644 net/ipv4/netfilter/nf_tables_ipv4.c
 delete mode 100644 net/ipv6/netfilter/nf_tables_ipv6.c
 delete mode 100644 net/netfilter/nf_tables_inet.c
 delete mode 100644 net/netfilter/nf_tables_netdev.c
 create mode 100644 net/netfilter/nft_chain_filter.c