[4/5] test/socket-tcp: run iptables with -w

Submitted by Andrei Vagin on Nov. 27, 2018, 5:45 p.m.


Message ID 20181127174545.3872-5-avagin@gmail.com
State Accepted
Series "travis: switch to the Ubuntu Xenial"
Headers show

Commit Message

Andrei Vagin Nov. 27, 2018, 5:45 p.m.
Start test
Test is SUID
./socket-tcp-nfconntrack --pidfile=socket-tcp-nfconntrack.pid --outfile=socket-tcp-nfconntrack.out
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?

Signed-off-by: Andrei Vagin <avagin@gmail.com>
 test/zdtm/static/socket-tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/socket-tcp.c b/test/zdtm/static/socket-tcp.c
index 18eb3792c..5158fe348 100644
--- a/test/zdtm/static/socket-tcp.c
+++ b/test/zdtm/static/socket-tcp.c
@@ -76,7 +76,7 @@  int main(int argc, char **argv)
 		return 1;
 	if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT"))
 		return 1;
-	if (system("iptables -A INPUT -j DROP"))
+	if (system("iptables -w -A INPUT -j DROP"))
 		return 1;