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(),