]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser: rename VERSION token to HDRVERSION
authorSteven Barth <cyrus@openwrt.org>
Tue, 6 Jan 2015 22:40:22 +0000 (23:40 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Jan 2015 12:08:39 +0000 (13:08 +0100)
A token name of VERSION results in a macro being defined
with the same name. This prevents inclusion of config.h
in commonly used headers.

Signed-off-by: Steven Barth <cyrus@openwrt.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y
src/scanner.l

index 3059d59add848cea2a625a02111588c3e8ac0106..b20f4debdbbf2dda6642bdc45c70605828712bdf 100644 (file)
@@ -238,7 +238,7 @@ static void location_update(struct location *loc, struct location *rhs, int n)
 %token OPERATION               "operation"
 
 %token IP                      "ip"
-%token VERSION                 "version"
+%token HDRVERSION              "version"
 %token HDRLENGTH               "hdrlength"
 %token TOS                     "tos"
 %token LENGTH                  "length"
@@ -1966,7 +1966,7 @@ ip_hdr_expr               :       IP      ip_hdr_field
                        }
                        ;
 
-ip_hdr_field           :       VERSION         { $$ = IPHDR_VERSION; }
+ip_hdr_field           :       HDRVERSION      { $$ = IPHDR_VERSION; }
                        |       HDRLENGTH       { $$ = IPHDR_HDRLENGTH; }
                        |       TOS             { $$ = IPHDR_TOS; }
                        |       LENGTH          { $$ = IPHDR_LENGTH; }
@@ -2013,7 +2013,7 @@ ip6_hdr_expr              :       IP6     ip6_hdr_field
                        }
                        ;
 
-ip6_hdr_field          :       VERSION         { $$ = IP6HDR_VERSION; }
+ip6_hdr_field          :       HDRVERSION      { $$ = IP6HDR_VERSION; }
                        |       PRIORITY        { $$ = IP6HDR_PRIORITY; }
                        |       FLOWLABEL       { $$ = IP6HDR_FLOWLABEL; }
                        |       LENGTH          { $$ = IP6HDR_LENGTH; }
index ed87da61ba36bd2e056cd0ecf886efbb2eed9e5a..52b0078311d6cd2291be4a6d9d968b8e3f2187e3 100644 (file)
@@ -349,7 +349,7 @@ addrstring  ({macaddr}|{ip4addr}|{ip6addr})
 "operation"            { return OPERATION; }
 
 "ip"                   { return IP; }
-"version"              { return VERSION; }
+"version"              { return HDRVERSION; }
 "hdrlength"            { return HDRLENGTH; }
 "tos"                  { return TOS; }
 "length"               { return LENGTH; }