On Thu, 12 Mar 2009, Erik Kline wrote:
> However, looking at ares_init.c in init_by_resolv_conf(), lines 819 and 823
> show that whichever line is encountered first wins.
I'd say that sounds wrong then comparing with the docs you quoted.
> I believe the change to bring the behaviour closer to parity would be to
> simply delete the "&& channel->ndomains == -1" check. I verified that
> set_search() frees any domains already set and config_domain() proxies
> through to set_search() and believe this change would be safe.
We should also add something to our docs about the importance of order and how
it is used when both are found.
> But I'm not sure what the ramifications of this change would be to other
> systems' behaviour, nor am I sure what the "standard" for this is/should be,
> nor who sets such a standard.
In general I think we need to mimic how other resolvers work as far as
possible to get happy users of our softwares, so I think you're clearly on the
right path here.
Can you write up a proper patch and submit it here?
-- / daniel.haxx.seReceived on 2009-03-17