]> 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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 31 Jul 2025 22:52:27 +0000 (00:52 +0200)
commit85a0f65b442c3d9264c42c29347e5b4e434a5e78
tree8d2c8aabce67de528a8a69bf06956f1e6bb7ddcd
parent2d83d6f308aab60e92eace2638592471fee239dd
payload: don't kill dependency for proto_th

commit c0843dec745433ac36aafb5726c580449e522d1d upstream.

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