private function expandIPv6InFilters(&$ip) {
        if ($this->isIPv6($ip)) {
            if (($pos = strpos($ip, '/')) !== false) {
                // The IPv6 has a routing prefix attached to it
                $mask = substr($ip, $pos);
                $ip = $this->expandIPv6(substr($ip, 0, $pos)) . $mask;
            } else {
                // Regular IPv6 address
                $ip = $this->expandIPv6($ip);
            }
        }
    }