diff --git a/checkpoint.go b/checkpoint.go index 788f33475ec..12b01ec9b92 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -118,7 +118,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)] diff --git a/restore.go b/restore.go index ca9e1e897f5..f00bec192c1 100644 --- a/restore.go +++ b/restore.go @@ -97,6 +97,9 @@ using the runc checkpoint command.`, return err } options := criuOptions(context) + if err := setEmptyNsMask(context, options); err != nil { + return err + } status, err := startContainer(context, spec, CT_ACT_RESTORE, options) if err != nil { return err