]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
netfilter: flowtable: strictly check for maximum number of actions
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 25 Mar 2026 23:17:09 +0000 (00:17 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Apr 2026 09:50:14 +0000 (11:50 +0200)
commit76522fcdbc3a02b568f5d957f7e66fc194abb893
tree3de055ff310f2514a88d9d615f9aa62bf5410055
parentdc9e9d61e301c087bcd990dbf2fa18ad3e2e1429
netfilter: flowtable: strictly check for maximum number of actions

The maximum number of flowtable hardware offload actions in IPv6 is:

* ethernet mangling (4 payload actions, 2 for each ethernet address)
* SNAT (4 payload actions)
* DNAT (4 payload actions)
* Double VLAN (4 vlan actions, 2 for popping vlan, and 2 for pushing)
  for QinQ.
* Redirect (1 action)

Which makes 17, while the maximum is 16. But act_ct supports for tunnels
actions too. Note that payload action operates at 32-bit word level, so
mangling an IPv6 address takes 4 payload actions.

Update flow_action_entry_next() calls to check for the maximum number of
supported actions.

While at it, rise the maximum number of actions per flow from 16 to 24
so this works fine with IPv6 setups.

Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_offload.c