mirror of
https://github.com/containers/podman.git
synced 2025-08-03 01:37:51 +08:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user