diff options
author | Ana Rey <anarey@gmail.com> | 2014-08-05 20:33:39 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-08-24 14:19:18 +0200 |
commit | 97f0ffc9efa7a0c7ecfbbfacf1fb066a2a350ad8 (patch) | |
tree | 5d0ed6f3b7eac8bedf30abb7532c68474e8ccfd1 /src/parser.y | |
parent | 6f285f202d6c41db1d9071c0964b5d062a522b4e (diff) |
src: Add support for pkttype in meta expresion
If you want to match the pkttype field of the skbuff, you have to
use the following syntax:
nft add rule ip filter input meta pkttype PACKET_TYPE
where PACKET_TYPE can be: unicast, broadcast and multicast.
Joint work with Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
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 26d28793..f06a2651 100644 --- a/src/parser.y +++ b/src/parser.y @@ -325,6 +325,7 @@ static int monitor_lookup_event(const char *event) %token RTCLASSID "rtclassid" %token IBRIPORT "ibriport" %token OBRIPORT "obriport" +%token PKTTYPE "pkttype" %token CT "ct" %token DIRECTION "direction" @@ -1838,6 +1839,7 @@ meta_key_unqualified : MARK { $$ = NFT_META_MARK; } | RTCLASSID { $$ = NFT_META_RTCLASSID; } | IBRIPORT { $$ = NFT_META_BRI_IIFNAME; } | OBRIPORT { $$ = NFT_META_BRI_OIFNAME; } + | PKTTYPE { $$ = NFT_META_PKTTYPE; } ; meta_stmt : META meta_key SET expr |