]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser: fix common_block usage in chain and table blocks
authorPatrick McHardy <kaber@trash.net>
Fri, 20 Mar 2009 05:18:44 +0000 (06:18 +0100)
committerPatrick McHardy <kaber@trash.net>
Fri, 20 Mar 2009 05:18:44 +0000 (06:18 +0100)
Signed-off-by: Patrick McHardy <kaber@trash.net>
src/parser.y

index cc7e467cc54c1a32a78dd4658e44564cceaa0a9f..35a9dc841a03ee54623cb826e84d9d35cc2a5324 100644 (file)
@@ -534,7 +534,7 @@ table_block_alloc   :       /* empty */     { $$ = table_alloc(); }
                        ;
 
 table_block            :       /* empty */     { $$ = $<table>-1; }
-                       |       common_block    { $$ = $<table>-1; }
+                       |       table_block     common_block
                        |       table_block     stmt_seperator
                        |       table_block     table_line      stmt_seperator
                        {
@@ -555,7 +555,7 @@ chain_block_alloc   :       /* empty */     { $$ = chain_alloc(NULL); }
                        ;
 
 chain_block            :       /* empty */     { $$ = $<chain>-1; }
-                       |       common_block    { $$ = $<chain>-1; }
+                       |       chain_block     common_block
                        |       chain_block     stmt_seperator
                        |       chain_block     hook_spec       stmt_seperator
                        |       chain_block     rule            stmt_seperator