summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/spec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 4b6b947d7..d9888e999 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -380,6 +380,9 @@ func addUTSNS(config *CreateConfig, g *generate.Generator) error {
func addIpcNS(config *CreateConfig, g *generate.Generator) error {
ipcMode := config.IpcMode
+ if IsNS(string(ipcMode)) {
+ return g.AddOrReplaceLinuxNamespace(string(spec.IPCNamespace), NS(string(ipcMode)))
+ }
if ipcMode.IsHost() {
return g.RemoveLinuxNamespace(spec.IPCNamespace)
}