From 22fab8681a50014174cdd02ace90f74b9e9eefe9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Oct 2023 18:40:04 +0200 Subject: 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 --- tests/shell/testcases/sets/elem_opts_compat_0 | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 tests/shell/testcases/sets/elem_opts_compat_0 (limited to 'tests/shell/testcases/sets/elem_opts_compat_0') diff --git a/tests/shell/testcases/sets/elem_opts_compat_0 b/tests/shell/testcases/sets/elem_opts_compat_0 new file mode 100755 index 00000000..e0129536 --- /dev/null +++ b/tests/shell/testcases/sets/elem_opts_compat_0 @@ -0,0 +1,29 @@ +#!/bin/sh + +# ordering of element options and expressions has changed, make sure parser +# accepts both ways + +set -e + +$NFT -f - <