Skip to contentSkip to conversation

netfilter: nft_ct: reject direction for ct id

PATCH New Pablo Neira Ayuso 1 participant 1 message Feb 5, 2024

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nft_ct: reject direction for ct id

Direction attribute is ignored, reject it in case this ever needs to be supported

Fixes 3087c3f7c23b ("netfilter: nft_ct: Add ct id support")
---
 net/netfilter/nft_ct.c | 3 +++
 1 file changed, 3 insertions(+)
net/netfilter/nft_ct.c +3 -0
index aac98a3c966e..bfd3e5a14dab 100644
@@ -476,6 +476,9 @@ static int nft_ct_get_init(const struct nft_ctx *ctx,
 		break;
 #endif
 	case NFT_CT_ID:
+		if (tb[NFTA_CT_DIRECTION])
+			return -EINVAL;
+
 		len = sizeof(u32);
 		break;
 	default:
Signature · 1 line
2.30.2