Skip to content

Commit

Permalink
Fix broken logic in IPv4 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodangelis committed Apr 24, 2021
1 parent bbec5f6 commit b229392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func FindIP(iface net.Interface) (string, error) {
}
// Use IPv6 only if an IPv4 hasn't been found yet.
// This is eventually overwritten with an IPv4, if found (see above)
if ip != "" {
if ip == "" {
ip = "[" + ipnet.IP.String() + "]"
}
}
Expand Down

0 comments on commit b229392

Please sign in to comment.