mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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 <avagin@openvz.org>
This commit is contained in:
+2
-1
@@ -125,7 +125,8 @@ var namespaceMapping = map[specs.LinuxNamespaceType]int{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setEmptyNsMask(context *cli.Context, options *libcontainer.CriuOpts) error {
|
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") {
|
for _, ns := range context.StringSlice("empty-ns") {
|
||||||
f, exists := namespaceMapping[specs.LinuxNamespaceType(ns)]
|
f, exists := namespaceMapping[specs.LinuxNamespaceType(ns)]
|
||||||
|
|||||||
Reference in New Issue
Block a user