Skip to content

Commit

Permalink
remove check for loopback address
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSom3body committed Jan 7, 2025
1 parent 53127d7 commit 426af78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func GetIpAddress(ifaceName string) string {
}

for _, addr := range addrs {
if ipNet, ok := addr.(*net.IPNet); ok && !ipNet.IP.IsLoopback() {
if ipNet, ok := addr.(*net.IPNet); ok {
if ip := ipNet.IP.To4(); ip != nil {
return ip.String()
}
Expand Down

0 comments on commit 426af78

Please sign in to comment.