feat: use github.com/wlynxg/anet instead of net
See https://github.com/golang/go/issues/40569
This commit is contained in:
@ -39,6 +39,7 @@ import (
|
||||
"github.com/lestrrat-go/jwx/v2/jwk"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/wlynxg/anet"
|
||||
|
||||
_ "embed"
|
||||
|
||||
@ -360,13 +361,13 @@ func findMatchingDeviceAddress(ctx context.Context, from string, defaultAddr str
|
||||
return defaultAddr, nil
|
||||
}
|
||||
|
||||
ifaces, err := net.Interfaces()
|
||||
ifaces, err := anet.Interfaces()
|
||||
if err != nil {
|
||||
return "", errors.WithStack(err)
|
||||
}
|
||||
|
||||
for _, ifa := range ifaces {
|
||||
addrs, err := ifa.Addrs()
|
||||
addrs, err := anet.InterfaceAddrsByInterface(&ifa)
|
||||
if err != nil {
|
||||
logger.Error(
|
||||
ctx, "could not retrieve iface adresses",
|
||||
|
Reference in New Issue
Block a user