Skip to content

Commit b229392

Browse files
Fix broken logic in IPv4 detection
1 parent bbec5f6 commit b229392

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func FindIP(iface net.Interface) (string, error) {
132132
}
133133
// Use IPv6 only if an IPv4 hasn't been found yet.
134134
// This is eventually overwritten with an IPv4, if found (see above)
135-
if ip != "" {
135+
if ip == "" {
136136
ip = "[" + ipnet.IP.String() + "]"
137137
}
138138
}

0 commit comments

Comments
 (0)