Describe the bug
unbound 1.18.0 configured as forwarder : when upstream server replies with rcode NOERROR and zero answers, the forwarder replies to the client with rcode SERVFAIL.
To reproduce
- an unbound server configured as recursive resolver on interface 127.0.0.1@8053, configured with
local-zone: "example.com" always_nodata
- an unbound server configured as forwarder on interface 127.0.0.1@7053, config:
server:
username: ""
chroot: ""
directory: "/var/lib"
do-daemonize: no
do-not-query-localhost: no
module-config: "iterator"
interface: 127.0.0.1@7053
interface-action: 127.0.0.1@7053 allow
use-syslog: no
forward-zone:
name: "."
forward-addr: 127.0.0.1@8053
- query the forwarder : status SERVFAIL
$ dig @127.0.0.1 -p 7053 example.com
; DiG 9.16.42-Debian @127.0.0.1 -p 7053 example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: SERVFAIL, id: 28215
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;example.com. IN A
- query the recursive resolver : status NOERROR
$ dig @127.0.0.1 -p 8053 example.com
; DiG 9.16.42-Debian @127.0.0.1 -p 8053 example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 53473
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;example.com. IN A
Expected behavior
return rcode NOERROR with zero answers to the client as did unbound 1.17.1.
System:
- OS: Debian 11
unbound -V output:
Version 1.18.0
Configure line:
Linked libs: mini-event internal (it uses select), OpenSSL 1.1.1n 15 Mar 2022
Linked modules: dns64 respip validator iterator
Additional information
log for unbound forwarder 1.18.0
[1696431803] unbound[112655:0] info: iterator operate: query example.com. A IN
[1696431803] unbound[112655:0] info: response for example.com. A IN
[1696431803] unbound[112655:0] info: reply from <.> 127.0.0.1#8053
[1696431803] unbound[112655:0] info: query response was THROWAWAY
log for unbound forwarder 1.17.1
[1696431738] unbound[112637:0] info: iterator operate: query example.com. A IN
[1696431738] unbound[112637:0] info: response for example.com. A IN
[1696431738] unbound[112637:0] info: reply from <.> 127.0.0.1#8053
[1696431738] unbound[112637:0] info: query response was nodata ANSWER
Describe the bug
unbound 1.18.0 configured as forwarder : when upstream server replies with rcode NOERROR and zero answers, the forwarder replies to the client with rcode SERVFAIL.
To reproduce
local-zone: "example.com" always_nodataExpected behavior
return rcode NOERROR with zero answers to the client as did unbound 1.17.1.
System:
unbound -Voutput:Additional information
log for unbound forwarder 1.18.0
log for unbound forwarder 1.17.1