Bug 843 - nslookup slow to respond
Summary: nslookup slow to respond
Status: RESOLVED WORKSFORME
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.15.x
Hardware: PC Windows
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 11:57 UTC by Chris Miller
Modified: 2014-08-10 03:55 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build: v1.11.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).