dumb nil panic

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-25 15:56:40 -05:00
parent b6dd67b73d
commit cf79357bba
1 changed files with 12 additions and 11 deletions

View File

@ -263,7 +263,7 @@ func updateNetwork(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error)
return nil, errors.New("bridge is nil and no mac address")
}
brname = ""
}
} else {
if iface.Source.Bridge.Bridge == "" {
if hwaddr == "" {
fmt.Printf("non-standard network: %+v\n", iface)
@ -276,6 +276,7 @@ func updateNetwork(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error)
}
brname = iface.Source.Bridge.Bridge
}
}
// log.Info("network has bridge:", iface.Source.Bridge.Bridge)
if hwaddr == "" {
hwaddr = "generate " + domcfg.Name