diff options
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r-- | pkg/spec/spec.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index ffa242675..35651f2ed 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -345,10 +345,11 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error { return nil } else if netMode.IsContainer() { logrus.Debug("Using container netmode") - } else { - return errors.Errorf("unknown network mode") + } else if netMode.IsUserDefined() { + logrus.Debug("Using user defined netmode") + return nil } - return nil + return errors.Errorf("unknown network mode") } func addUTSNS(config *CreateConfig, g *generate.Generator) error { |