Bug 843

Summary: nslookup slow to respond
Product: Busybox Reporter: Chris Miller <chris>
Component: NetworkingAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: bkuhn, busybox-cvs
Priority: P5    
Version: 1.15.x   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Host: Target:
Build: v1.11.2

Description Chris Miller 2010-01-07 11:57:48 UTC
nslookup takes a long time to respond with answers under some circumstances.
Looking at a tcpdump, it seems that this is when (for example) a broadband router acting as a DNS proxy, merely forwards the query response as from the real, external DNS server as opposed to from itself.
Busybox/nslookup ignores the response from the external server and repeats the request.
By contrast, requests made to the busybox as a proxy itself seem to be answered almost immediately.
See the attached .cap file for details
Comment 1 万新明 2011-10-18 04:51:54 UTC
I also have this problem. In the networking/nslookup.c file, find the revhost = xmalloc_sockaddr2hostonly_noport (cur-> ai_addr);
Comment it, recompile, re-use nslookup, much faster.
Comment 2 Mike Frysinger 2014-08-10 03:55:42 UTC
pretty sure you're describing C library behavior, not busybox.  busybox merely uses the resolver as configured by the system (e.g. /etc/resolv.conf).