summaryrefslogtreecommitdiff
path: root/libpod/container_config.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-11-03 14:54:48 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-11-03 15:30:16 +0100
commit001d48929dcbe4f3a8eeb3db2a7bfdce5a90f81a (patch)
treec44bf5a4f6956f1d3900761079f452a9499f8af6 /libpod/container_config.go
parent82dba9754745f7598619050af4212a20b21821ad (diff)
downloadpodman-001d48929dcbe4f3a8eeb3db2a7bfdce5a90f81a.tar.gz
podman-001d48929dcbe4f3a8eeb3db2a7bfdce5a90f81a.tar.bz2
podman-001d48929dcbe4f3a8eeb3db2a7bfdce5a90f81a.zip
MAC address json unmarshal should allow strings
Create a new mac address type which supports json marshal/unmarshal from and to string. This change is backwards compatible with the previous versions as the unmarshal method still accepts the old byte array or base64 encoded string. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/container_config.go')
-rw-r--r--libpod/container_config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_config.go b/libpod/container_config.go
index 33ea731fd..8f803d744 100644
--- a/libpod/container_config.go
+++ b/libpod/container_config.go
@@ -228,7 +228,7 @@ type ContainerNetworkConfig struct {
// StaticMAC is a static MAC to request for the container.
// This cannot be set unless CreateNetNS is set.
// If not set, the container will be dynamically assigned a MAC by CNI.
- StaticMAC net.HardwareAddr `json:"staticMAC"`
+ StaticMAC types.HardwareAddr `json:"staticMAC"`
// PortMappings are the ports forwarded to the container's network
// namespace
// These are not used unless CreateNetNS is true