]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
scanner: rename address selector from 'eth' to 'ether'
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Jan 2014 11:07:44 +0000 (12:07 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Jan 2014 14:53:45 +0000 (15:53 +0100)
eth may easily occur when using ifname masks. This could be also
fixed by interpreting 'eth' as a simple string in the parser but
I think this selector also looks more similar to what we use in
tcpdump.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser.y
src/scanner.l

index 26e71e37669b6885c5e1ae8d61f6476ff617c261..461eb3f9636047e001753bcb1d1296f16dbd17c9 100644 (file)
@@ -193,7 +193,7 @@ static void location_update(struct location *loc, struct location *rhs, int n)
 
 %token BRIDGE                  "bridge"
 
-%token ETH                     "eth"
+%token ETHER                   "ether"
 %token SADDR                   "saddr"
 %token DADDR                   "daddr"
 %token TYPE                    "type"
@@ -1392,7 +1392,7 @@ payload_base_spec :       LL_HDR          { $$ = PAYLOAD_BASE_LL_HDR; }
                        |       TRANSPORT_HDR   { $$ = PAYLOAD_BASE_TRANSPORT_HDR; }
                        ;
 
-eth_hdr_expr           :       ETH     eth_hdr_field
+eth_hdr_expr           :       ETHER   eth_hdr_field
                        {
                                $$ = payload_expr_alloc(&@$, &payload_eth, $2);
                        }
index cee6aa6ee7553cc7840d81c968cab65b55492b8c..ee71492345acaadd72aa0c2c340457b8050fb652 100644 (file)
@@ -278,7 +278,7 @@ addrstring  ({macaddr}|{ip4addr}|{ip6addr})
 
 "bridge"               { return BRIDGE; }
 
-"eth"                  { return ETH; }
+"ether"                        { return ETHER; }
 "saddr"                        { return SADDR; }
 "daddr"                        { return DADDR; }
 "type"                 { return TYPE; }