Skip to content

Netfilter 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 Latest15 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15netfilter: flowtable: do not hw offload flows in teardown statenet/netfilter/nf_flow_table_offload.c+6 -02 replies
2/15netfilter: flowtable: fix pmtu discovery in nf_flow_tunnel_ip6ip6_push()net/netfilter/nf_flow_table_ip.c+1 -11 reply
3/15netfilter: flowtable: retrieve stats on flow deletionnet/netfilter/nf_flow_table_offload.c+33 -211 reply
4/15net: ethernet: mtk_ppe: update stats on flow deletiondrivers/net/ethernet/mediatek/mtk_ppe_offload.c+21 -111 reply
5/15net: airoha: update stats on flow deletiondrivers/net/ethernet/airoha/airoha_ppe.c+19 -121 reply
6/15netfilter: xt_time: fix monthday computation for dates past 2039net/netfilter/xt_time.c+6 -760 replies
7/15netfilter: nft_flow_offload: do not offload multicastnet/netfilter/nft_flow_offload.c+5 -00 replies
8/15netfilter: lwtunnel: expose read-only sysctl nf_hooks_lwtunnel for non init-netnsnet/netfilter/nf_hooks_lwtunnel.c+8 -41 reply
9/15netfilter: flowtable: purge entries immediately when destroying the flowtableinclude/net/netfilter/nf_flow_table.h net/netfilter/nf_flow_table_core.c net/netfilter/nf_flow_table_offload.c+42 -130 replies
10/15selftests: netfilter: nf_queue: drop the no-op loop initializertools/testing/selftests/net/netfilter/nf_queue.c+1 -10 replies
11/15netfilter: flowtable: do not scrub as crossing netnsnet/netfilter/nf_flow_table_ip.c+2 -21 reply
12/15netfilter: flowtable: tunnel device poisons h_source of fast-path framesnet/netfilter/nf_flow_table_path.c+6 -10 replies
13/15netfilter: flowtable: do not clear the offload bit twicenet/netfilter/nf_flow_table_core.c+4 -20 replies
14/15netfilter: nfnetlink_queue: make skb writable before writing NFQA_L2HDRnet/netfilter/nfnetlink_queue.c+6 -10 replies
15/15selftests: netfilter: add UDP flowtable offload testtools/testing/selftests/net/netfilter/Makefile tools/testing/selftests/net/netfilter/nft_flowtable_udp.sh+239 -00 replies

Reviews trailers per patch

6 of 15 patches have a Reviewed-by or Acked-by.

PatchLorenzo BianconiFernando Fernandez ManceraHangbin Liu
1/15
2/15
3/15A-b
4/15A-b
5/15
6/15
7/15R-b
8/15
9/15
10/15R-b R-b
11/15A-b
12/15R-b
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

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

Hi,

The following patchset contains Netfilter updates for net-next, mostly including flowtable fixes and improvements:

1) Do not offload flows to hardware from the packet path if they are already being torn down.

2) Fix PMTU discovery in nf_flow_tunnel_ip6ip6_push(): update the PMTU before skb_scrub_packet() drops the dst, otherwise the update is silently lost. From Lorenzo Bianconi.

3) Fetch hardware stats when a flow is deleted, so the last stats sync with the conntrack entry is no longer missed. Update the mtk_ppe and airoha drivers to use this. From Lorenzo Bianconi and me.

4) Fix xt_time monthday computation for dates from 2040 on by using time64_to_tm() instead of the days_since_epoch[] table. This also shrinks the xt_time object by about 23%. From Fernando F. Mancera.

5) Do not offload multicast flows from nft_flow_offload, from Koral Ilgun.

6) Make the nf_hooks_lwtunnel sysctl read-only in non-init netns so unprivileged users cannot toggle the global static branch. From Pablo Neira Ayuso.

7) Purge the remaining flowtable entries directly when the flowtable is destroyed instead of going through the hardware offload workqueue, which may fail to allocate work.

8) Remove a no-op loop initializer in the nf_queue selftest to silence a clang -Wunused-value warning. From Sasha Levin.

9) Do not scrub the skb as crossing netns in the IPIP flowtable tx path, so the skb mark is preserved.

10) Do not let the DEV_PATH_TUN entry set h_source from the tunnel device's dev_addr. Before this patch, fast-path frames went out with part of the tunnel's local IP address as the Ethernet source MAC. This broke offloaded flows on DS-Lite over PPPoE. From Marek Majkowski.

11) Clear IPS_OFFLOAD_BIT only once, as part of the one-time teardown transition. Before this patch, a repeated teardown of an expired hardware flow could clear the bit owned by a replacement flow for the same conntrack entry. From João Silva.

12) Call skb_ensure_writable() in nfnetlink_queue before writing NFQA_L2HDR over the mac header. Before this patch, the write could corrupt cloned frames that bridge flooding sends to other ports. From Tamaki Yanagawa.

13) Add a UDP flowtable offload selftest for IPv4 and IPv6, with and without masquerade. From Jiri Peska.

Please, pull these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git nf-next-26-11-13

Thanks.

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

The following changes since commit 573af801552999954caa8347e4490b04cf4763f0:

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2026-11-12 14:54:47 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git nf-next-26-11-13

for you to fetch changes up to 4810f60b9f0e9111cd0dcbfd2ca7a7c591a57464:

selftests: netfilter: add UDP flowtable offload test (2026-11-13 04:06:51 +0100)

----------------------------------------------------------------
netfilter pull request 26-11-13

----------------------------------------------------------------
Fernando Fernandez Mancera (1):
netfilter: xt_time: fix monthday computation for dates past 2039

Jiri Peska (1):
selftests: netfilter: add UDP flowtable offload test

João Silva (1):
netfilter: flowtable: do not clear the offload bit twice

Koral Ilgun (1):
netfilter: nft_flow_offload: do not offload multicast

Lorenzo Bianconi (2):
netfilter: flowtable: fix pmtu discovery in nf_flow_tunnel_ip6ip6_push()
net: airoha: update stats on flow deletion

Marek Majkowski (1):
netfilter: flowtable: tunnel device poisons h_source of fast-path frames

Pablo Neira Ayuso (6):
netfilter: flowtable: do not hw offload flows in teardown state
netfilter: flowtable: retrieve stats on flow deletion
net: ethernet: mtk_ppe: update stats on flow deletion
netfilter: lwtunnel: expose read-only sysctl nf_hooks_lwtunnel for non init-netns
netfilter: flowtable: purge entries immediately when destroying the flowtable
netfilter: flowtable: do not scrub as crossing netns

Sasha Levin (1):
selftests: netfilter: nf_queue: drop the no-op loop initializer

Tamaki Yanagawa (1):
netfilter: nfnetlink_queue: make skb writable before writing NFQA_L2HDR

 drivers/net/ethernet/airoha/airoha_ppe.c           |  31 +--
 drivers/net/ethernet/mediatek/mtk_ppe_offload.c    |  32 ++-
 include/net/netfilter/nf_flow_table.h              |   3 +-
 net/netfilter/nf_flow_table_core.c                 |  35 ++-
 net/netfilter/nf_flow_table_ip.c                   |   4 +-
 net/netfilter/nf_flow_table_offload.c              |  83 ++++---
 net/netfilter/nf_flow_table_path.c                 |   7 +-
 net/netfilter/nf_hooks_lwtunnel.c                  |  12 +-
 net/netfilter/nfnetlink_queue.c                    |   7 +-
 net/netfilter/nft_flow_offload.c                   |   5 +
 net/netfilter/xt_time.c                            |  82 +------
 tools/testing/selftests/net/netfilter/Makefile     |   1 +
 tools/testing/selftests/net/netfilter/nf_queue.c   |   2 +-
 .../selftests/net/netfilter/nft_flowtable_udp.sh   | 238 +++++++++++++++++++++
 14 files changed, 398 insertions(+), 144 deletions(-)
 create mode 100755 tools/testing/selftests/net/netfilter/nft_flowtable_udp.sh