https://issues.apache.org/bugzilla/show_bug.cgi?id=51953

--- Comment #6 from Francis Galiegue <fgalie...@gmail.com> 2011-10-04 21:05:25 
UTC ---
(In reply to comment #5)
> I might make this filter/valve a bit more generic: there's no reason to go
> through all the trouble of doing an InetAddress lookup, creating a BigInteger,
> shifting it, and then comparing it if there is no CIDR spec in the IP 
> specified
> by the configuration.
> 

Well, the remote host is always an IP address in string form, so there is no
lookup performed  at all. When supplied with an IP address in string form,
InetAddress.getByName() only validates the validity of the IP address (whether
it be IPv4 and IPv6).

Also, the current implementation also does simple IP matching, since if there
is no CIDR the right shift is 0, thus an exact match is required.

More to the point, I don't see how I could make this generic? It would mean
dispatching at some point, but how?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to