Skip to content

Commit

Permalink
Fix checking private address (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanchangyong authored Apr 27, 2022
1 parent db26d91 commit 7dc9bcd
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,7 @@ func GetIPFromInterface(configuration *settings.Settings) (string, error) {
continue
}

if !(ip.IsGlobalUnicast() &&
!(ip.IsUnspecified() ||
ip.IsMulticast() ||
ip.IsLoopback() ||
ip.IsLinkLocalUnicast() ||
ip.IsLinkLocalMulticast() ||
ip.IsInterfaceLocalMulticast())) {
if (ip.IsPrivate()) {
continue
}

Expand Down

0 comments on commit 7dc9bcd

Please sign in to comment.