openwrt/package/network/utils
Rodrigo B. de Sousa Martins 088bb1e12e 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>
(cherry picked from commit 44b1993f76)
2024-10-24 00:51:01 +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 bpftools: update, split off bpftool and libbpf packages 2023-05-25 09:33:59 +01:00
comgt comgt-ncm: add support for UNISOC SL8563 based TOZED TL70-C 2023-05-18 14:44:07 +02:00
ebtables packages: assign PKG_CPE_ID for all missing packages 2023-09-27 22:37:01 +02:00
ethtool ethtool: update to 6.3 2023-05-15 15:24:45 +02:00
iproute2 iproute2: update to 6.3.0 2023-05-07 14:31:58 +02:00
ipset packages: assign PKG_CPE_ID for all missing packages 2023-09-27 22:37:01 +02:00
iptables iptables: backport "nft: track each register individually" from 1.9 2024-10-24 00:51:01 +02:00
iw iw: sync nl80211.h 2024-07-07 18:30:37 +02:00
iwcap iwcap: fix handling kill signal during dump 2017-03-14 13:29:03 +01:00
iwinfo iwinfo: opt-out of lto usage 2023-10-31 00:44:03 +01:00
layerscape/restool restool: update source.codeaurora.org repository link 2023-06-11 18:57:01 +02:00
linux-atm linux-atm: Include linux/sockios.h for SIOCGSTAMP 2020-04-09 00:12:46 +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.8 2023-07-20 08:04:11 +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.4 2023-04-17 15:32:48 +08:00
umbim treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uqmi uqmi: update to latest HEAD 2023-10-27 05:03:00 +02:00
wireguard-tools treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +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 wwan: add Medion S4222 usb lte stick 2023-05-18 14:32:04 +02:00
xdp-tools treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00