Hi,
I wrote a patch to allow Squid to handle single-component names with the
internal resolver (without this patch, only the external resolver is
able to do that).
I don't have so much experience with C programming, so maybe this patch
has some bugs. But "it works for me", with squid-2.4STABLE2, compiled
with these options:
./configure \
--enable-gnuregex \
--enable-carp \
--enable-storeio="diskd,ufs" \
--enable-delay-pools \
--enable-useragent-log \
--enable-referer-log \
--enable-htcp \
--enable-forw-via-db \
--enable-cache-digests \
--enable-underscores
The file that's mostly modified is dns_internal.c
I added several functions to it, and also modified struct _idns_query
and some other stuff.
There are some things i'm not sure about:
- in idnsALookup() i'm using the parameter *name without any length
check (strcpy); i assume it is checked before this function is called,
but this might not be true
- i'm not sure if it's ok to use strtok in idnsGrokReply (it's not
thread-safe?)
- i don't know yet what's the impact of these changes on the IP cache;
it looks ok though...
There are several other small things, but they are contained in the
comments in my patch.
If you will commit this patch to the CVS, and you will make any changes
to it, please tell me what you changed.
I understand 2.4 in in feature-freeze, so maybe this will go to 2.5?
-- Florin Andrei
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:17 MST