From 001d48929dcbe4f3a8eeb3db2a7bfdce5a90f81a Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 3 Nov 2021 14:54:48 +0100 Subject: 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 --- libpod/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index 135b2f363..f1cf015f8 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1104,7 +1104,7 @@ func WithNetworkOptions(options map[string][]string) CtrCreateOption { // It cannot be set unless WithNetNS has already been passed. // Further, it cannot be set if additional CNI networks to join have been // specified. -func WithStaticMAC(mac net.HardwareAddr) CtrCreateOption { +func WithStaticMAC(mac nettypes.HardwareAddr) CtrCreateOption { return func(ctr *Container) error { if ctr.valid { return define.ErrCtrFinalized -- cgit v1.2.3-54-g00ecf