Commit df107d63 authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin

Do not lock network if running in the host network namespace

Related: https://github.com/checkpoint-restore/criu/issues/577

Restoring a runc container which is running in the host's network
namespace locked the network (iptables-restore) without unlocking it.

This disables network logging if running in the host's network
namespace.
Suggested-by: 's avatarAndrei Vagin <avagin@gmail.com>
Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@gmail.com>
parent b71727bc
......@@ -2134,7 +2134,7 @@ static int restore_root_task(struct pstree_item *init)
goto out_kill;
}
if (opts.empty_ns & CLONE_NEWNET) {
if (root_ns_mask & opts.empty_ns & CLONE_NEWNET) {
/*
* Local TCP connections were locked by network_lock_internal()
* on dump and normally should have been C/R-ed by respectively
......
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