misleading output from busybox nslookup applet (lede variant) where no query type is provided
Username: Val Kulkov
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1067
LEDE_BOARD=”bcm53xx/generic” LEDE_ARCH=”arm_cortex-a9” LEDE_TAINTS=”no-all busybox” LEDE_RELEASE=”LEDE Reboot SNAPSHOT r5032-9e9696af”
Description: where no query type is provided to nslookup busybox applet, nslookup assumes A + AAAA queries (if the domain argument cannot be converted into a ptr). Then, if the A query succeeds but AAAA fails (for example, no record for an IPv6 address for the given hostname), nslookup returns “Can’t find hostname: No answer”. The “no answer” response looks puzzling. One has to review the the nslookup applet’s source code to understand that there is nothing wrong with the
DNS
server.
For example:
root@LEDE:~# nslookup cam1 localhost Server: localhost Address: ::1#53
Name: cam1 Address 1: 192.168.21.14 *** Can't find cam1: No answer
Suggested fix: either add type information in the response, like “type A: X.X.X.X, type AAAA: can’t find hostname: no answer”, or omit the AAAA response if only A record is found.