Re: Patch for fixing the slow DNS lookup issue

2015-01-05 Thread Lei Shi
The patched code have been running in our production environment for half
year. I consider it is ok personally. This patch didn't be merged due to
lack of test case. I hope some can help to finish this job.

On Thu, Nov 6, 2014 at 5:26 PM, Jakub Hrozek  wrote:

> On Tue, Nov 04, 2014 at 01:27:38PM -0500, Brad House wrote:
> > On 5/22/14, 1:43 AM, Lei Shi wrote:
> > >Hello, everyone
> > >
> > >This patch include two major change groups. one is fixing the dns
> lookup issue due to dummy dns information of a
> > >disconnected adapter(in my case is a bluetooth adapter). I changed the
> dns lookup policy to try GetNetworkParams first
> > >because the GetNetworkParams provides the most reliable dns
> information(lots of checks were done by system).
> > >I also filter out inoperable adapter in DNS_AdaptersAddresses in case
> GetNetworkParams fail.
> > >the other is explicit invoke ANSI version Win32 API in case compile
> c-ares in unicode environment.
> > >
> > >Best Wishes
> > >Lei Shi.
> > >
> >
> > I just had a report of a similar issue from a customer complaining that
> DNS lookups were slow across multiple
> > machines running c-ares 1.10.0, but not from machines running much older
> versions of c-ares 1.5.3.  I haven't
> > fully investigated since I don't have access to their machines, but it
> is very likely in their environment that
> > they could have some disabled interfaces with bogus server addresses
> which this patch appears to address.   I
> > know c-ares completely changed the way windows DNS servers are looked up
> between those versions.
> >
> > I checked the Git repo and it doesn't appear a patch similar to this
> ever made it upstream.  Did this get
> > dropped?  Has anyone else tested this patch and found it to be improper,
> or if there was a better way
> > to handle it?
>
> (Speaking only for myself now..)
>
> The patch touches Windows code which is something I have personally no
> means of testing. I can help with general code review, but I'm not able
> to test the patch.
>


Patch for fixing the slow DNS lookup issue

2014-05-21 Thread Lei Shi
Hello, everyone

This patch include two major change groups. one is fixing the dns lookup
issue due to dummy dns information of a disconnected adapter(in my case is
a bluetooth adapter). I changed the dns lookup policy to try
GetNetworkParams first because the GetNetworkParams provides the most
reliable dns information(lots of checks were done by system).
I also filter out inoperable adapter in DNS_AdaptersAddresses in case
GetNetworkParams fail.
the other is explicit invoke ANSI version Win32 API in case compile c-ares
in unicode environment.

Best Wishes
Lei Shi.


dns.patch
Description: Binary data