* [PATCH 1/1] iptables_lib.sh: Fix for iptables-translate >= v1.8.9
@ 2023-02-06 17:03 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2023-02-06 17:03 UTC (permalink / raw)
To: ltp; +Cc: Petr Vorel, netfilter-devel
iptables-translate <= v1.8.8 didn't use quotes:
$ iptables-translate -A INPUT -s 127.0.0.1 -p icmp -j DROP
nft add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop
iptables-translate since v1.8.9 started to add quotes:
$ iptables-translate -A INPUT -s 127.0.0.1 -p icmp -j DROP
nft 'add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop'
That broke nft01.sh test:
Error: syntax error, unexpected junk
'add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop'
^
nft01 1 TFAIL: nft command failed to append new rule
Therefore filter out also quotes (to existing backslash).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/iptables/iptables_lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/network/iptables/iptables_lib.sh b/testcases/network/iptables/iptables_lib.sh
index ab76cbd416..7e138ea33b 100755
--- a/testcases/network/iptables/iptables_lib.sh
+++ b/testcases/network/iptables/iptables_lib.sh
@@ -22,7 +22,7 @@ NFRUN()
if [ "$use_iptables" = 1 ]; then
ip${TST_IPV6}tables $@
else
- $(ip${TST_IPV6}tables-translate $@ | sed 's,\\,,g')
+ $(ip${TST_IPV6}tables-translate $@ | sed "s/[\']//g")
fi
}
--
2.39.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/1] iptables_lib.sh: Fix for iptables-translate >= v1.8.9
@ 2023-02-06 17:03 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2023-02-06 17:03 UTC (permalink / raw)
To: ltp; +Cc: netfilter-devel
iptables-translate <= v1.8.8 didn't use quotes:
$ iptables-translate -A INPUT -s 127.0.0.1 -p icmp -j DROP
nft add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop
iptables-translate since v1.8.9 started to add quotes:
$ iptables-translate -A INPUT -s 127.0.0.1 -p icmp -j DROP
nft 'add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop'
That broke nft01.sh test:
Error: syntax error, unexpected junk
'add rule ip filter INPUT ip protocol icmp ip saddr 127.0.0.1 counter drop'
^
nft01 1 TFAIL: nft command failed to append new rule
Therefore filter out also quotes (to existing backslash).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/iptables/iptables_lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/network/iptables/iptables_lib.sh b/testcases/network/iptables/iptables_lib.sh
index ab76cbd416..7e138ea33b 100755
--- a/testcases/network/iptables/iptables_lib.sh
+++ b/testcases/network/iptables/iptables_lib.sh
@@ -22,7 +22,7 @@ NFRUN()
if [ "$use_iptables" = 1 ]; then
ip${TST_IPV6}tables $@
else
- $(ip${TST_IPV6}tables-translate $@ | sed 's,\\,,g')
+ $(ip${TST_IPV6}tables-translate $@ | sed "s/[\']//g")
fi
}
--
2.39.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] iptables_lib.sh: Fix for iptables-translate >= v1.8.9
2023-02-06 17:03 ` [LTP] " Petr Vorel
@ 2023-02-07 11:50 ` Petr Vorel
-1 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2023-02-07 11:50 UTC (permalink / raw)
To: ltp; +Cc: netfilter-devel
Hi all,
FYI merged.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 1/1] iptables_lib.sh: Fix for iptables-translate >= v1.8.9
@ 2023-02-07 11:50 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2023-02-07 11:50 UTC (permalink / raw)
To: ltp; +Cc: netfilter-devel
Hi all,
FYI merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-07 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 17:03 [PATCH 1/1] iptables_lib.sh: Fix for iptables-translate >= v1.8.9 Petr Vorel
2023-02-06 17:03 ` [LTP] " Petr Vorel
2023-02-07 11:50 ` Petr Vorel
2023-02-07 11:50 ` [LTP] " Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.