Skip to content

Commit

Permalink
main: Guard against devices with unset primary IPv4
Browse files Browse the repository at this point in the history
  • Loading branch information
the-maldridge committed Feb 15, 2023
1 parent 5d5d4c9 commit 414d70b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func main() {
hosts := make(map[int64]*DHCPHost, len(devices))
shoenets := []ShoelacesHost{}
for _, dev := range devices {
if dev.PrimaryIPv4.Address == "" {
continue
}
ipaddr := strings.SplitN(dev.PrimaryIPv4.Address, "/", 2)[0]

ifres, err := nb.ListInterfaces(dev.ID)
Expand Down

0 comments on commit 414d70b

Please sign in to comment.