openwrt-mirror/package
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
..
base-files base-files: add ucidef_set_network_device_path_port function 2024-10-19 19:10:56 +02:00
boot uboot-ath79: refresh patches 2024-10-19 17:56:46 +02:00
devel gdb: Remove MIPS NSIG patch 2024-10-12 21:51:25 +02:00
firmware linux-firmware: add firmware for Realtek RTL8192DU 2024-10-19 17:36:51 +02:00
kernel kernel: modules: add boot flag to igc, mlx4, and mlx5 drivers 2024-10-19 19:10:56 +02:00
libs libbpf: bump to 1.4.6 2024-10-13 22:29:11 +03:00
network iptables: backport "nft: track each register individually" from 1.9 2024-10-19 19:42:37 +02:00
system opkg: update to Git HEAD (2024-10-16) 2024-10-16 13:56:27 +02:00
utils package: busybox: update download link 2024-10-17 18:19:22 +02:00
Makefile sdk: fix APK key creation 2024-08-09 01:47:05 +02:00