home-assistant / plugin-dns

CoreDNS implementation for Home Assistant
Apache License 2.0
19 stars 14 forks source link

Returns SERVFAIL instead of NXDOMAIN for non existent containers #85

Closed KevinCathcart closed 2 years ago

KevinCathcart commented 2 years ago

In one of the SSH addons, try running the following: nslookup fakehost. You will get back something along the lines of:

Server:         172.30.32.3
Address:        172.30.32.3#53

** server can't find fakehost.local.hass.io: SERVFAIL

This is despite NXDOMAIN being a more reasonable return status here.

The ha dns log output shows the underlying error:

[INFO] 127.0.0.1:40678 - 26164 "A IN fakehost.local.hass.io. udp 51 true 2048" NOERROR - 0 0.000103351s
[ERROR] plugin/errors: 2 fakehost.local.hass.io. A: plugin/forward: no next plugin found
[INFO] 172.30.32.1:48715 - 26164 "A IN fakehost.local.hass.io. udp 40 false 512" SERVFAIL qr,rd 40 0.002350854s