From d7aeda5ed45ac7ca959f12180690caa371b5b14b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 8 Jul 2013 19:34:12 +0200 Subject: ip{6}tables-restore: fix breakage due to new locking approach Since (93587a0 ip[6]tables: Add locking to prevent concurrent instances), ip{6}tables-restore does not work anymore: iptables-restore < x Another app is currently holding the xtables lock. Perhaps you want to use the -w option? do_command{6}(...) is called from ip{6}tables-restore for every iptables command contained in the rule-set file. Thus, hitting the lock error after the second command. Fix it by bypassing the locking in the ip{6}tables-restore path. Signed-off-by: Pablo Neira Ayuso --- iptables/iptables-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/iptables-restore.c') diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c index 08225139..8c942ff6 100644 --- a/iptables/iptables-restore.c +++ b/iptables/iptables-restore.c @@ -438,7 +438,7 @@ iptables_restore_main(int argc, char *argv[]) DEBUGP("argv[%u]: %s\n", a, newargv[a]); ret = do_command4(newargc, newargv, - &newargv[2], &handle); + &newargv[2], &handle, true); free_argv(); fflush(stdout); -- cgit v1.2.3