Skip to content

Commit 8187fb7

Browse files
committed
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 <[email protected]>
1 parent 21ac086 commit 8187fb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

checkpoint.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ var namespaceMapping = map[specs.LinuxNamespaceType]int{
125125
}
126126

127127
func setEmptyNsMask(context *cli.Context, options *libcontainer.CriuOpts) error {
128-
var nsmask int
128+
/* Runc doesn't manage network devices and their configuration */
129+
nsmask := unix.CLONE_NEWNET
129130

130131
for _, ns := range context.StringSlice("empty-ns") {
131132
f, exists := namespaceMapping[specs.LinuxNamespaceType(ns)]

0 commit comments

Comments
 (0)