1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

libnetwork/drivers/ipvlan: fix missing IpvlanFlag field in config JSON

Fixes #42542

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
This commit is contained in:
Youfu Zhang 2022-08-24 16:05:55 +08:00
parent ab37723fa2
commit 549d24b437

View file

@ -154,6 +154,7 @@ func (config *configuration) MarshalJSON() ([]byte, error) {
nMap["Mtu"] = config.Mtu
nMap["Parent"] = config.Parent
nMap["IpvlanMode"] = config.IpvlanMode
nMap["IpvlanFlag"] = config.IpvlanFlag
nMap["Internal"] = config.Internal
nMap["CreatedSubIface"] = config.CreatedSlaveLink
if len(config.Ipv4Subnets) > 0 {
@ -187,6 +188,7 @@ func (config *configuration) UnmarshalJSON(b []byte) error {
config.Mtu = int(nMap["Mtu"].(float64))
config.Parent = nMap["Parent"].(string)
config.IpvlanMode = nMap["IpvlanMode"].(string)
config.IpvlanFlag = nMap["IpvlanFlag"].(string)
config.Internal = nMap["Internal"].(bool)
config.CreatedSlaveLink = nMap["CreatedSubIface"].(bool)
if v, ok := nMap["Ipv4Subnets"]; ok {