summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 3799b463f..44364100e 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -192,6 +192,11 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
}
// Reset the log path to point to the default
ctr.config.LogPath = ""
+ // Later in validate() the check is for nil. JSONDeepCopy sets it to an empty
+ // object. Resetting it to nil if it was nil before.
+ if config.StaticMAC == nil {
+ ctr.config.StaticMAC = nil
+ }
}
ctr.config.Spec = rSpec