summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/meta.c3
-rw-r--r--src/parser.y2
-rw-r--r--src/scanner.l1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/meta.c b/src/meta.c
index 7b75caf7..1f7217f0 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -393,6 +393,9 @@ static const struct meta_template meta_templates[] = {
[NFT_META_PKTTYPE] = META_TEMPLATE("pkttype", &pkttype_type,
BITS_PER_BYTE,
BYTEORDER_HOST_ENDIAN),
+ [NFT_META_CPU] = META_TEMPLATE("cpu", &integer_type,
+ BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
};
static void meta_expr_print(const struct expr *expr)
diff --git a/src/parser.y b/src/parser.y
index f06a2651..d7bc287f 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -326,6 +326,7 @@ static int monitor_lookup_event(const char *event)
%token IBRIPORT "ibriport"
%token OBRIPORT "obriport"
%token PKTTYPE "pkttype"
+%token CPU "cpu"
%token CT "ct"
%token DIRECTION "direction"
@@ -1840,6 +1841,7 @@ meta_key_unqualified : MARK { $$ = NFT_META_MARK; }
| IBRIPORT { $$ = NFT_META_BRI_IIFNAME; }
| OBRIPORT { $$ = NFT_META_BRI_OIFNAME; }
| PKTTYPE { $$ = NFT_META_PKTTYPE; }
+ | CPU { $$ = NFT_META_CPU; }
;
meta_stmt : META meta_key SET expr
diff --git a/src/scanner.l b/src/scanner.l
index ca6db6e1..b7a00b4f 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -416,6 +416,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"ibriport" { return IBRIPORT; }
"obriport" { return OBRIPORT; }
"pkttype" { return PKTTYPE; }
+"cpu" { return CPU; }
"ct" { return CT; }
"direction" { return DIRECTION; }