[squid-users] IPcache and mixed case domain names

Alex Rousskov rousskov at measurement-factory.com
Wed Dec 15 18:08:14 UTC 2021


On 12/15/21 11:56 AM, Binoy Fernandez wrote:

> Assuming the IPcache at all times contains lower case domain names
> then I think a change might be needed to the ipcache_get function to
> lower case

It sounds like you found a bug. The fix you suggest may work, but it is

* rather fragile (sooner or later we will forget to lower the name
before looking it up inside ipcache_get() or another function) and

* possibly more expensive that the alternative below (most names do not
need any case conversion but all names need hash computation).

I suspect a better fix would be to replace the legacy C hash used by the
IP cache code with a modern case-insensitive unordered set or map. At
that replacement time, the developer should investigate whether our
ClpMap should be enhanced to be reusable in this context.


Thank you,

Alex.


More information about the squid-users mailing list