Bug 12541 - nslookup: incorrectly returns failure with search domains
Summary: nslookup: incorrectly returns failure with search domains
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-04 11:01 UTC by Natanael Copa
Modified: 2020-02-04 14:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2020-02-04 11:01:13 UTC
nslookup (with FEATURE_NSLOOKUP_BIG) incorrectly returns EXIT_FAILURE if any of the search domains returns failure, even if one of them returns success.

To reproduce:

$ cat /etc/resolv.conf 
nameserver 1.1.1.1
search busybox.net net

$ busybox nslookup busybox; echo $?
Server:		1.1.1.1
Address:	1.1.1.1:53

** server can't find busybox.busybox.net: NXDOMAIN

Non-authoritative answer:
Name:	busybox.net
Address: 140.211.167.122

Non-authoritative answer:

** server can't find busybox.busybox.net: NXDOMAIN

1


Compare to bind's nslookup:

$ nslookup busybox; echo $?
Server:		1.1.1.1
Address:	1.1.1.1#53

Non-authoritative answer:
Name:	busybox.net
Address: 140.211.167.122

0


Downstream report:
https://github.com/gliderlabs/docker-alpine/issues/539

Related to https://bugs.busybox.net/show_bug.cgi?id=11161