summaryrefslogtreecommitdiff
path: root/libpod/network/cni/run.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/network/cni/run.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/network/cni/run.go')
-rw-r--r--libpod/network/cni/run.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/network/cni/run.go b/libpod/network/cni/run.go
index 99b2adce5..7795dfeeb 100644
--- a/libpod/network/cni/run.go
+++ b/libpod/network/cni/run.go
@@ -160,7 +160,7 @@ func CNIResultToStatus(res cnitypes.Result) (types.StatusBlock, error) {
return result, err
}
interfaces[cniInt.Name] = types.NetInterface{
- MacAddress: mac,
+ MacAddress: types.HardwareAddr(mac),
Networks: []types.NetAddress{{
Subnet: types.IPNet{IPNet: ip.Address},
Gateway: ip.Gateway,