-
Notifications
You must be signed in to change notification settings - Fork 56
internal-dns: NXDOMAIN/SERVFAIL where appropriate #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently when the internal DNS server encounters an error, or has no records to server it will just return a DNS response with no resource records. This causes issues for resolvers that expect: - A SERVFAIL for records the DNS server cannot resolve. - An NXDOMAIN for records the DNS server asserts do not exist. This patch updates the internal DNS server to conform to those expectations. This required adding a zone configuration option to the internal DNS server that identifies what domain it's presiding over. Any records that do not fall within that domain will result in a SERVFAIL, causing resolvers to look for other DNS servers for answers. This particular failure mode falls under the SERVFAIL DNS Error Code 7 [1] "No Reachable Authority" as the internal DNS server does not take responsibility for recursive resolution. [1] https://tools.ietf.org/id/draft-ietf-dnsop-extended-error-05.html#rfc.section.4.2.7
match socket.send_to(&resp_data, &src).await { | ||
Ok(_) => {} | ||
Err(e) => { | ||
error!(log, "NXDOMAIN send: {}", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not need to nack
here? I see we're doing it on most other error paths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed it missing with the deserialize record
"error!" call below, fwiw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. There should be nack
on the deserialize error. For the socket.send_to
errors there's not much we can do as the nack
also needs to call socket.send_to
to get the nack to the client.
Propolis changes since the last update: Gripe when using non-raw block device Update zerocopy dependency nvme: Wire up GetFeatures command Make Viona more robust in the face of errors bump softnpu (#577) Modernize 16550 UART Crucible changes since the last update: Don't check ROP if the scrub is done (#1093) Allow crutest cli to be quiet on generic test (#1070) Offload write encryption (#1066) Simplify handling of BlockReq at program exit (#1085) Update Rust crate byte-unit to v5 (#1054) Remove unused fields in match statements, downstairs edition (#1084) Remove unused fields in match statements and consolidate (#1083) Add logger to Guest (#1082) Drive hash / decrypt tests from Upstairs::apply Wait to reconnect if auto_promote is false Change guest work id from u64 -> GuestWorkId remove BlockOp::Commit (#1072) Various clippy fixes (#1071) Don't panic if tasks are destroyed out of order Update Rust crate reedline to 0.27.1 (#1074) Update Rust crate async-trait to 0.1.75 (#1073) Buffer should destructure to Vec when single-referenced Don't fail to make unencrypted regions (#1067) Fix shadowing in downstairs (#1063) Single-task refactoring (#1058) Update Rust crate tokio to 1.35 (#1052) Update Rust crate openapiv3 to 2.0.0 (#1050) Update Rust crate libc to 0.2.151 (#1049) Update Rust crate rusqlite to 0.30 (#1035)
Propolis changes since the last update: Gripe when using non-raw block device Update zerocopy dependency nvme: Wire up GetFeatures command Make Viona more robust in the face of errors bump softnpu (#577) Modernize 16550 UART Crucible changes since the last update: Don't check ROP if the scrub is done (#1093) Allow crutest cli to be quiet on generic test (#1070) Offload write encryption (#1066) Simplify handling of BlockReq at program exit (#1085) Update Rust crate byte-unit to v5 (#1054) Remove unused fields in match statements, downstairs edition (#1084) Remove unused fields in match statements and consolidate (#1083) Add logger to Guest (#1082) Drive hash / decrypt tests from Upstairs::apply Wait to reconnect if auto_promote is false Change guest work id from u64 -> GuestWorkId remove BlockOp::Commit (#1072) Various clippy fixes (#1071) Don't panic if tasks are destroyed out of order Update Rust crate reedline to 0.27.1 (#1074) Update Rust crate async-trait to 0.1.75 (#1073) Buffer should destructure to Vec when single-referenced Don't fail to make unencrypted regions (#1067) Fix shadowing in downstairs (#1063) Single-task refactoring (#1058) Update Rust crate tokio to 1.35 (#1052) Update Rust crate openapiv3 to 2.0.0 (#1050) Update Rust crate libc to 0.2.151 (#1049) Update Rust crate rusqlite to 0.30 (#1035) --------- Co-authored-by: Alan Hanson <[email protected]>
Currently when the internal DNS server encounters an error, or has no
records to serve, it will just return a DNS response with no resource
records. This causes issues for resolvers that expect:
This patch updates the internal DNS server to conform to those
expectations.
This required adding a zone configuration option to the internal DNS
server that identifies what domain it's presiding over. Any records that
do not fall within that domain will result in a SERVFAIL, causing
resolvers to look for other DNS servers for answers. This particular
failure mode falls under the SERVFAIL DNS Error Code 7 [1] "No Reachable
Authority" as the internal DNS server does not take responsibility for
recursive resolution.
[1] https://tools.ietf.org/id/draft-ietf-dnsop-extended-error-05.html#rfc.section.4.2.7