OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Karol Babioch - 10.10.2016
Last edited by Jo-Philipp Wich - 10.10.2016

FS#217 - nslookup behaving weirdly

Having built LEDE from source (a69e19d18ac0ebb3a715def18fed37026cae15af) I realized that nslookup (which is built into BusyBox) is behaving weirdly. Invoking it from command line via SSH I get an error message, although the name resolution is still working:

root@rtr1:~# nslookup google.com
nslookup: can’t resolve ‘(null)’: Name does not resolve

Name: google.com
Address 1: 172.217.22.14 fra16s14-in-f14.1e100.net
Address 2: 2a00:1450:4001:817::200e fra16s08-in-x0e.1e100.net

Notice the error message: nslookup: can’t resolve ‘(null)’: Name does not resolve

This in itself is not too much of a problem, since the addresses returned are still ok. However, according to the “-h” parameter nslookup also has a second parameter:

root@rtr1:~# nslookup -h
BusyBox v1.25.0 () multi-call binary.

Usage: nslookup [HOST] [SERVER]

Query the nameserver for the IP address of the given HOST
optionally using a specified DNS server

The [SERVER] parameter can be used to query a specific name server. This does _NOT_ work. Regardless of what I put there, it is always the default resolver that is being queried. I am not able to query a specific nameserver, which in my case makes a difference (split horizon DNS).

For instance this query shouldn’t return anything since my nameserver (ns1.babioch.de) is not configured to answer recursively:

root@rtr1:~# nslookup google.com ns1.babioch.de
Server: 10.24.0.10
Address 1: 10.24.0.10

Name: google.com
Address 1: 2a00:1450:4001:817::200e fra16s08-in-x0e.1e100.net
Address 2: 172.217.16.206 fra16s08-in-f206.1e100.net

When doing this query with dig I get the proper result:

[kbabioch@antares ~]$ dig @ns1.babioch.de google.com

; «» DiG 9.10.4-P3 «» @ns1.babioch.de google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; →>HEADER«- opcode: QUERY, status: REFUSED, id: 42493
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN A

;; Query time: 27 msec
;; SERVER: 10.24.0.10#53(10.24.0.10)
;; WHEN: Mo Okt 10 21:29:40 CEST 2016
;; MSG SIZE rcvd: 39

Closed by  Jo-Philipp Wich
10.10.2016 21:13
Reason for closing:  Duplicate
Hannu Nyman commented on 10.10.2016 21:07

Sounds like the known incompatibility between musl and Busybox nslookup (that ignores the server setting).

See e.g.

Admin
Jo-Philipp Wich commented on 10.10.2016 21:13

Dupe of  FS#155 

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing