diff options
author | Phil Sutter <phil@nwl.cc> | 2019-08-20 22:09:04 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-11-25 23:31:08 +0100 |
commit | b34bfe69c670d648cfc3d0c00ef1567894894df5 (patch) | |
tree | 75bfa829f63f96ecdf91021d03bd454c89fe77ca /iptables/nft-shared.h | |
parent | e104dcc80d54001a6a739a0a60f4a60a9f654d79 (diff) |
nft: Bore up nft_parse_payload()
Allow for closer inspection by storing payload expression's base and
length values. Also facilitate for two consecutive payload expressions
as LHS of a (cmp/lookup) statement as used with concatenations.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-shared.h')
-rw-r--r-- | iptables/nft-shared.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index e79323c8..4dc44b84 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -43,6 +43,7 @@ enum { NFT_XT_CTX_META = (1 << 1), NFT_XT_CTX_BITWISE = (1 << 2), NFT_XT_CTX_IMMEDIATE = (1 << 3), + NFT_XT_CTX_PREV_PAYLOAD = (1 << 4), }; struct nft_xt_ctx { @@ -53,9 +54,10 @@ struct nft_xt_ctx { uint32_t reg; struct { + uint32_t base; uint32_t offset; uint32_t len; - } payload; + } payload, prev_payload; struct { uint32_t key; } meta; |