From f44f8ef6e4d594bd74c041e25261bf275e52621b Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 29 Nov 2018 09:24:01 +0000 Subject: [PATCH] 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: Andrei Vagin Signed-off-by: Adrian Reber Signed-off-by: Andrei Vagin --- criu/cr-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/cr-restore.c b/criu/cr-restore.c index 6086d65238..d8fe352a63 100644 --- a/criu/cr-restore.c +++ b/criu/cr-restore.c @@ -2135,7 +2135,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