summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-01-31 16:12:54 +0100
committerFlorian Westphal <fw@strlen.de>2019-01-31 22:53:51 +0100
commit2c3f7a2cd6fd8325b3a84e280cce945c6c20b87f (patch)
tree3499067ea045ba9e7ac6c2d219a98d3401162379 /iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
parent9421327926a529ec8300d37f3be8a6cfab701786 (diff)
arptables-nft-save: Fix position of -j option
Legacy arptables-save (just like arptables itself) prints verdict as first option, then matches and finally any target options. To achieve this without introducing double/trailing spaces everywhere, integrate target ('-j') option printing into nft_arp_print_rule_details() and make it print separating whitespace before each option. In nft_arp_save_rule(), replace the call to save_matches_and_target() by by a direct call to cs->target->save() since the former prints '-j' option itself. Since there are no match extensions in arptables, any other code from that function is not needed. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0')
-rwxr-xr-xiptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_06
1 files changed, 3 insertions, 3 deletions
diff --git a/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 b/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
index ee17da00..d742c3d5 100755
--- a/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
+++ b/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
@@ -11,7 +11,7 @@ set -e
DUMP='*filter
:OUTPUT ACCEPT
-A OUTPUT -j mangle --mangle-ip-s 10.0.0.1
--A OUTPUT --h-length 6 --h-type 1 -j mangle --mangle-ip-d 10.0.0.2
+-A OUTPUT -j mangle --h-length 6 --h-type 1 --mangle-ip-d 10.0.0.2
'
# note how mangle-ip-s is unset in second rule
@@ -19,8 +19,8 @@ DUMP='*filter
EXPECT='*filter
:INPUT ACCEPT
:OUTPUT ACCEPT
--A OUTPUT --h-length 6 --h-type 1 -j mangle --mangle-ip-s 10.0.0.1
--A OUTPUT --h-length 6 --h-type 1 -j mangle --mangle-ip-d 10.0.0.2
+-A OUTPUT -j mangle --h-length 6 --h-type 1 --mangle-ip-s 10.0.0.1
+-A OUTPUT -j mangle --h-length 6 --h-type 1 --mangle-ip-d 10.0.0.2
'
$XT_MULTI arptables -F