diff options
author | Phil Sutter <phil@nwl.cc> | 2023-10-19 18:40:04 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-10-20 01:37:49 +0200 |
commit | 22fab8681a50014174cdd02ace90f74b9e9eefe9 (patch) | |
tree | b48d12f9c2a1d0c160232f25c782a685c52265d8 /src/parser_bison.y | |
parent | 49151cd0709acbfb7c6c7f35c44fc12060b695d1 (diff) |
parser_bison: Fix for broken compatibility with older dumps
Commit e6d1d0d611958 ("src: add set element multi-statement
support") changed the order of expressions and other state attached to set
elements are expected in input. This broke parsing of ruleset dumps
created by nft commands prior to that commit.
Restore compatibility by also accepting the old ordering.
Fixes: e6d1d0d611958 ("src: add set element multi-statement support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index c517dc38..f0652ba6 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -4523,6 +4523,12 @@ meter_key_expr_alloc : concat_expr set_elem_expr : set_elem_expr_alloc | set_elem_expr_alloc set_elem_expr_options + | set_elem_expr_alloc set_elem_expr_options set_elem_stmt_list + { + $$ = $1; + list_splice_tail($3, &$$->stmt_list); + xfree($3); + } ; set_elem_key_expr : set_lhs_expr { $$ = $1; } |