openwrt/package/network/utils
Rodrigo B. de Sousa Martins 44b1993f76 iptables: backport "nft: track each register individually" from 1.9
From the upstream repo:

Instead of assuming only one register is used, track all 16 regs
individually.

This avoids need for the 'PREV_PAYLOAD' hack and also avoids the need to
clear out old flags:

When we see that register 'x' will be written to, that register state is
reset automatically.

Existing dissector decodes
ip saddr 1.2.3.4 meta l4proto tcp
... as
-s 6.0.0.0 -p tcp

iptables-nft -s 1.2.3.4 -p tcp is decoded correctly because the expressions
are ordered like:

meta l4proto tcp ip saddr 1.2.3.4
                                                                                                                                                                                                                   |
... and 'meta l4proto' did clear the PAYLOAD flag.

The simpler fix is:
		ctx->flags &= ~NFT_XT_CTX_PAYLOAD;

in nft_parse_cmp(), but that breaks dissection of '1-42', because
the second compare ('cmp lte 42') will not find the
payload expression anymore.

This commit fixes #11169 and openwrt/packages#22727, and potentially anyone that uses iptables-nft legacy support.

Signed-off-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16504
[Added patch header]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-19 19:42:37 +02:00
..
adb-enablemodem Move enablemodem from ramips to new package adb-enablemodem and make it used also by TL-MR6400 2017-05-27 07:54:40 +02:00
arptables build: prefer HTTPS if available (for packages) 2022-10-05 17:37:07 +02:00
bpftool bpftool: add host build 2024-09-04 00:06:34 +02:00
comgt comgt: directip: add delegate option support 2024-09-22 23:43:08 +02:00
ebtables ebtables: fix compilation with GCC14 2024-05-28 10:41:45 +02:00
ethtool ethtool: update to 6.10 2024-10-05 12:37:10 +02:00
iproute2 iproute2: fix tc-tiny build failure 2024-10-06 03:43:14 +02:00
ipset ipset: update to 7.21 2024-04-17 12:14:20 +08:00
iptables iptables: backport "nft: track each register individually" from 1.9 2024-10-19 19:42:37 +02:00
iw iw: update to version 6.9 2024-06-21 11:52:25 +02:00
iwcap iwcap: fix handling kill signal during dump 2017-03-14 13:29:03 +01:00
iwinfo iwinfo: update to latest HEAD 2024-10-02 15:12:18 +02:00
layerscape/restool restool: bump to lf-6.6.23-2.0.0 2024-09-22 16:21:02 +02:00
linux-atm linux-atm: fix build with GCC 14 2024-05-24 00:09:47 +02:00
ltq-dsl-base ltq-dsl-base: enable for ipq40xx 2023-01-16 23:41:41 +00:00
nftables nftables: update to 1.0.9 2023-10-20 14:42:31 +02:00
resolveip network/utils/resolveip: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
rssileds rssileds: bump PKG_RELEASE due to libiwinfo ABI change 2023-01-23 13:55:42 +01:00
tcpdump tcpdump: update to 4.99.5 2024-09-22 17:53:13 +02:00
umbim mbim: add delegate option support 2024-09-22 23:43:08 +02:00
uqmi qmi: add delegate option support 2024-09-22 23:43:08 +02:00
wireguard-tools wireguard-tools: accept iproute2 as dependency 2024-09-06 23:35:02 +02:00
wireless-tools wireless-tools: add package CPE ID 2022-10-19 21:40:23 +02:00
wpan-tools wpan-tools: update to 0.9 2022-07-10 18:16:34 +02:00
wwan treewide: use APK compatible version schema 2024-03-22 22:14:22 +01:00
xdp-tools xdp-tools: bump to 1.4.3 2024-10-13 22:29:51 +03:00