Bug 12541

Summary: nslookup: incorrectly returns failure with search domains
Product: Busybox Reporter: Natanael Copa <ncopa>
Component: NetworkingAssignee: unassigned
Status: NEW ---    
Severity: normal CC: admwiggin+busyboxbugs, busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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