]> git.ipfire.org Git - thirdparty/nftables.git/commit
payload: don't kill dependency for proto_th
authorFlorian Westphal <fw@strlen.de>
Thu, 27 Feb 2025 10:47:02 +0000 (11:47 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 6 Mar 2025 03:53:30 +0000 (04:53 +0100)
commitc0843dec745433ac36aafb5726c580449e522d1d
treebd00791c08e1f50756f4ef0df28c7d83dcc32267
parentcd754211e1954581b388099e3e98bc26522c7065
payload: don't kill dependency for proto_th

proto_th carries no information about the proto number, we need to
preserve the L4 protocol expression unless we can be sure that

For example, if "meta l4proto 91 @th,0,16 0" is simplified to
"th sport 0", the information of protocol number is lost.

Based on initial patch from Xiao Liang.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/netlink_delinearize.c
src/payload.c
tests/py/any/rawpayload.t
tests/py/any/rawpayload.t.json
tests/py/any/rawpayload.t.payload