From 963c450730f0dba77d21e7a1925000ce3a0138f7 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 5 May 2020 20:13:40 +0200 Subject: [PATCH] allow all IPv6 to be used --- ip_manager/throttle.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ip_manager/throttle.go b/ip_manager/throttle.go index 7ecfbbd..bf48b88 100644 --- a/ip_manager/throttle.go +++ b/ip_manager/throttle.go @@ -43,15 +43,13 @@ func GetIPPool(stopGrp *stop.Group) (*IPPool, error) { return nil, errors.Err(err) } var pool []throttledIP - ipv6Added := false for _, address := range addrs { if ipnet, ok := address.(*net.IPNet); ok && ipnet.IP.IsGlobalUnicast() { - if ipnet.IP.To16() != nil && govalidator.IsIPv6(ipnet.IP.String()) && !ipv6Added { + if ipnet.IP.To16() != nil && govalidator.IsIPv6(ipnet.IP.String()) { pool = append(pool, throttledIP{ IP: ipnet.IP.String(), LastUse: time.Now().Add(-5 * time.Minute), }) - ipv6Added = true } else if ipnet.IP.To4() != nil && govalidator.IsIPv4(ipnet.IP.String()) { pool = append(pool, throttledIP{ IP: ipnet.IP.String(),