fix: revert back to parsing IPv4 address blocks in net.FindInterface

This commit is contained in:
☸️ 2021-09-20 17:12:12 +10:00 committed by GitHub
parent e255eba69f
commit aba29e03f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -264,7 +264,7 @@ func FindInterface(name string) (*Endpoint, error) {
for _, address := range addrs { for _, address := range addrs {
ip := address.String() ip := address.String()
if ip != "127.0.0.1" && IPv4Validator.MatchString(ip) { if !strings.HasPrefix(ip, "127.0.0.1") && IPv4BlockValidator.MatchString(ip) {
return buildEndpointFromInterface(iface) return buildEndpointFromInterface(iface)
} }
} }