Sfoglia il codice sorgente

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

Fixes #42542

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
Youfu Zhang 2 anni fa
parent
commit
549d24b437
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      libnetwork/drivers/ipvlan/ipvlan_store.go

+ 2 - 0
libnetwork/drivers/ipvlan/ipvlan_store.go

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