summaryrefslogtreecommitdiffstats
path: root/src/parser.y
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-01-08 13:02:16 +0000
committerPatrick McHardy <kaber@trash.net>2014-01-08 13:03:19 +0000
commit87787ee86ec95a8a5494615268a03a756f48433f (patch)
treee650af949a46f09b94f404c02bd9e5db8e9dc48d /src/parser.y
parent4180fba3821d13f06fde2d662d7000e99d140693 (diff)
meta: add l4proto support
Add support for the meta l4proto type. This is used in the inet table to match on the transport layer protocol without requiring the network layer protocol to be known, allowing to use transport header matches that apply to both IPv4 and IPv6. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y
index aed00c7f..7c18875d 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -282,6 +282,7 @@ static void location_update(struct location *loc, struct location *rhs, int n)
%token META "meta"
%token NFPROTO "nfproto"
+%token L4PROTO "l4proto"
%token MARK "mark"
%token IIF "iif"
%token IIFNAME "iifname"
@@ -1378,6 +1379,7 @@ meta_expr : META meta_key
meta_key : LENGTH { $$ = NFT_META_LEN; }
| NFPROTO { $$ = NFT_META_NFPROTO; }
+ | L4PROTO { $$ = NFT_META_L4PROTO; }
| PROTOCOL { $$ = NFT_META_PROTOCOL; }
| PRIORITY { $$ = NFT_META_PRIORITY; }
| MARK { $$ = NFT_META_MARK; }