Skip to content

Commit

Permalink
Merge pull request #2519 from wangyumu/fix-InhibitIPv4-nil-panic
Browse files Browse the repository at this point in the history
Fix InhibitIPv4 nil panic
  • Loading branch information
arkodg authored Mar 4, 2020
2 parents 1aa3ae9 + 44534f1 commit aca52ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/bridge/bridge_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ func (ncfg *networkConfiguration) UnmarshalJSON(b []byte) error {
ncfg.EnableIPv6 = nMap["EnableIPv6"].(bool)
ncfg.EnableIPMasquerade = nMap["EnableIPMasquerade"].(bool)
ncfg.EnableICC = nMap["EnableICC"].(bool)
ncfg.InhibitIPv4 = nMap["InhibitIPv4"].(bool)
if v, ok := nMap["InhibitIPv4"]; ok {
ncfg.InhibitIPv4 = v.(bool)
}

ncfg.Mtu = int(nMap["Mtu"].(float64))
if v, ok := nMap["Internal"]; ok {
ncfg.Internal = v.(bool)
Expand Down

0 comments on commit aca52ce

Please sign in to comment.