feat: use github.com/wlynxg/anet instead of net

See https://github.com/golang/go/issues/40569
This commit is contained in:
2024-05-02 09:40:55 +02:00
parent 2fbc7186c0
commit 6aec6da078
3 changed files with 8 additions and 25 deletions

View File

@ -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",