From 8187fb740c202f5d29f1717bb933143c10dae8a1 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 10 Jul 2018 09:53:34 -0700 Subject: [PATCH] cr: don't dump network devices and their configuration RunC doesn't manage network devices and their configuration, so it is impossible to describe external dependencies to restore them back. This means that all users have to set --empty-ns network, so let's do this by default. Signed-off-by: Andrei Vagin --- checkpoint.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checkpoint.go b/checkpoint.go index 61e58351..67c767a4 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -125,7 +125,8 @@ var namespaceMapping = map[specs.LinuxNamespaceType]int{ } func setEmptyNsMask(context *cli.Context, options *libcontainer.CriuOpts) error { - var nsmask int + /* Runc doesn't manage network devices and their configuration */ + nsmask := unix.CLONE_NEWNET for _, ns := range context.StringSlice("empty-ns") { f, exists := namespaceMapping[specs.LinuxNamespaceType(ns)]