Commit b2707bab authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

net: Call ip[6]tables-restore with -w parameter

New ip[6]tables-restore utils has this parameter,
which allows to wait for xtables lock, if it's
occupied. When they don't wait, then the restore
of iptables fails.

Old versions just ignore this parameter
with error in stderr, but it does not make them
fail. So, pass it unconditionally.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f9170eff
......@@ -1548,7 +1548,7 @@ static inline int restore_iptables(int pid)
goto ipt6;
}
ret = run_iptables_tool("iptables-restore", img_raw_fd(img), -1);
ret = run_iptables_tool("iptables-restore -w", img_raw_fd(img), -1);
close_image(img);
if (ret)
return ret;
......@@ -1559,7 +1559,7 @@ ipt6:
if (empty_image(img))
goto out;
ret = run_iptables_tool("ip6tables-restore", img_raw_fd(img), -1);
ret = run_iptables_tool("ip6tables-restore -w", img_raw_fd(img), -1);
out:
close_image(img);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment