summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_payload.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-10-28 21:47:55 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-11-01 09:30:20 +0100
commitb5bdc6f9c24db9a0adf8bd00c0e935b184654f00 (patch)
treebcdd60d50967115fb4dbce2ea7d1dc62da7da199 /net/netfilter/nft_payload.c
parent56fa95014a0447f798444e626091cbeb3176af24 (diff)
downloadlinux-stable-b5bdc6f9c24db9a0adf8bd00c0e935b184654f00.tar.gz
linux-stable-b5bdc6f9c24db9a0adf8bd00c0e935b184654f00.tar.bz2
linux-stable-b5bdc6f9c24db9a0adf8bd00c0e935b184654f00.zip
netfilter: nf_tables: convert pktinfo->tprot_set to flags field
Generalize boolean field to store more flags on the pktinfo structure. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_payload.c')
-rw-r--r--net/netfilter/nft_payload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c
index a44b14f6c0dc..d1cd6583ee00 100644
--- a/net/netfilter/nft_payload.c
+++ b/net/netfilter/nft_payload.c
@@ -108,7 +108,7 @@ void nft_payload_eval(const struct nft_expr *expr,
offset = skb_network_offset(skb);
break;
case NFT_PAYLOAD_TRANSPORT_HEADER:
- if (!pkt->tprot_set)
+ if (!(pkt->flags & NFT_PKTINFO_L4PROTO))
goto err;
offset = nft_thoff(pkt);
break;
@@ -610,7 +610,7 @@ static void nft_payload_set_eval(const struct nft_expr *expr,
offset = skb_network_offset(skb);
break;
case NFT_PAYLOAD_TRANSPORT_HEADER:
- if (!pkt->tprot_set)
+ if (!(pkt->flags & NFT_PKTINFO_L4PROTO))
goto err;
offset = nft_thoff(pkt);
break;