From 87787ee86ec95a8a5494615268a03a756f48433f Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Wed, 8 Jan 2014 13:02:16 +0000 Subject: 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 --- src/parser.y | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser.y') 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; } -- cgit v1.2.3