summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-05-09 16:03:40 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-09 18:29:21 +0200
commiteffb881c9cef28aca47adeec5014e0457507539e (patch)
tree2287a62e27aabd91966758de61425dbf375e8346 /src
parent2efbdf7b8fcf79f3fa8a6471d2eca00df0c91108 (diff)
Deprecate add/insert rule 'position' argument
Instead, use 'handle' keyword for the same effect since that is more consistent with respect to replace/delete commands. The old keyword is still supported for backwards compatibility and also listed in man page along with a hint that it shouldn't be used anymore. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/parser_bison.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 24210b2b..174150aa 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1970,6 +1970,14 @@ rule_position : chain_spec
handle_merge(&$1, &$2);
$$ = $1;
}
+ | chain_spec handle_spec
+ {
+ $2.position.location = $2.handle.location;
+ $2.position.id = $2.handle.id;
+ $2.handle.id = 0;
+ handle_merge(&$1, &$2);
+ $$ = $1;
+ }
;
ruleid_spec : chain_spec handle_spec