diff options
author | Florian Westphal <fw@strlen.de> | 2021-12-18 21:14:15 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-12-23 14:39:43 +0100 |
commit | 49aa44ba9e09e5f62f3dccbe14b845e20cfc7b20 (patch) | |
tree | a13264327413f0a7ef28f2416b5c9de8e3322509 /iptables/nft-shared.c | |
parent | b129b1cfcdbc82430cbbb90e83c344a14e77a808 (diff) |
nft-shared: set correct register value
NFTNL_EXPR_META_DREG equals NFTNL_EXPR_PAYLOAD_BASE, so we set
dreg to the payload base instead.
It "works" because the simple nft rules currently generated via
ipables-nft have base == register-number but this is a
coincidence.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index b281ba29..4394e8b7 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -443,7 +443,7 @@ static void nft_parse_payload(struct nft_xt_ctx *ctx, struct nftnl_expr *e) ctx->flags |= NFT_XT_CTX_PREV_PAYLOAD; } - ctx->reg = nftnl_expr_get_u32(e, NFTNL_EXPR_META_DREG); + ctx->reg = nftnl_expr_get_u32(e, NFTNL_EXPR_PAYLOAD_DREG); ctx->payload.base = nftnl_expr_get_u32(e, NFTNL_EXPR_PAYLOAD_BASE); ctx->payload.offset = nftnl_expr_get_u32(e, NFTNL_EXPR_PAYLOAD_OFFSET); ctx->payload.len = nftnl_expr_get_u32(e, NFTNL_EXPR_PAYLOAD_LEN); |