summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/default.go')
-rw-r--r--config/default.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/default.go b/config/default.go
index 81ffe00f..d0be6d6b 100644
--- a/config/default.go
+++ b/config/default.go
@@ -75,9 +75,8 @@ func getIPv6LinkLocalAddress(ifname string) (string, error) {
return "", err
}
for _, addr := range addrs {
- if ip, _, err := net.ParseCIDR(addr.String()); err != nil {
- return "", err
- } else if ip.To4() == nil && ip.IsLinkLocalUnicast() {
+ ip := addr.(*net.IPNet).IP
+ if ip.To4() == nil && ip.IsLinkLocalUnicast() {
return fmt.Sprintf("%s%%%s", ip.String(), ifname), nil
}
}