Skip to contentSkip to conversation

expr: update EXPR_MAX and add missing comments

PATCH New Florian Westphal 1 participant 1 message Aug 23, 2022 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 expr: update EXPR_MAX and add missing comments

WHen flagcmp and catchall expressions got added the EXPR_MAX definition wasn't changed.

Should have no impact in practice however, this value is only checked to prevent crash when old nft release is used to list a ruleset generated by a newer nft release and a unknown 'typeof' expression.

---
 include/expression.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/expression.h +5 -1
index cf7319b65e0e..547073836833 100644
@@ -41,6 +41,10 @@
  * @EXPR_NUMGEN:	number generation expression
  * @EXPR_HASH:		hash expression
  * @EXPR_RT:		routing expression
+ * @EXPR_FIB		forward information base expression
+ * @EXPR_XFRM		XFRM (ipsec) expression
+ * @EXPR_SET_ELEM_CATCHALL catchall element expression
+ * @EXPR_FLAGCMP	flagcmp expression
  */
 enum expr_types {
 	EXPR_INVALID,
@@ -74,7 +78,7 @@ enum expr_types {
 	EXPR_SET_ELEM_CATCHALL,
 	EXPR_FLAGCMP,
 };
-#define EXPR_MAX EXPR_XFRM
+#define EXPR_MAX EXPR_FLAGCMP
 
 enum ops {
 	OP_INVALID,
Signature · 1 line
2.35.1