diff options
author | Ana Rey <anarey@gmail.com> | 2014-08-24 14:21:00 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-08-24 14:21:39 +0200 |
commit | 4410f874873887ca6ee792701d0ee9e2fe319439 (patch) | |
tree | 6fd92a34623488c6b459c247a3581978dff35f56 /src/parser.y | |
parent | 97f0ffc9efa7a0c7ecfbbfacf1fb066a2a350ad8 (diff) |
src: Add support for cpu in meta expresion
This allows you to match cpu handling with a packet.
This is an example of the syntax for this new attribute:
nft add rule ip test input meta cpu 1 counter
nft add rule ip test input meta cpu 1-3 counter
nft add rule ip test input meta cpu { 1, 3} counter
Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
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 |