[GH-ISSUE #1221] queries for SOA improperly identify as empty responses even when the SOA is present #631

Open
opened 2026-03-15 23:32:36 +03:00 by kerem · 1 comment
Owner

Originally created by @bluejekyll on GitHub (Sep 28, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1221

This is most likely due to the DnsResponse::contains_answer, though the logic looks correct

https://github.com/bluejekyll/trust-dns/blob/main/crates/proto/src/xfer/dns_response.rs#L127-L132

Originally created by @bluejekyll on GitHub (Sep 28, 2020). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1221 This is most likely due to the `DnsResponse::contains_answer`, though the logic looks correct https://github.com/bluejekyll/trust-dns/blob/main/crates/proto/src/xfer/dns_response.rs#L127-L132
Author
Owner

@bluejekyll commented on GitHub (Oct 22, 2020):

A little more investigation on this, the SOA is being properly detected. The issue is that the response isn't going to properly pass the SOA up to the lookup function, since we're dropping the labels on storage in the Lookup set.

To properly fix this, we want to pass the label for the record back to the Lookup. For SOA this label might be different than the query label, for example a query for the SOA of www.example.com. will return a label of example.com. and the SOA record. We should support this, but it will require preserving the record labels back to the Lookup object.

<!-- gh-comment-id:714761000 --> @bluejekyll commented on GitHub (Oct 22, 2020): A little more investigation on this, the SOA is being properly detected. The issue is that the response isn't going to properly pass the SOA up to the lookup function, since we're dropping the `labels` on storage in the Lookup set. To properly fix this, we want to pass the label for the record back to the `Lookup`. For SOA this label might be different than the query label, for example a query for the SOA of `www.example.com.` will return a label of `example.com.` and the SOA record. We should support this, but it will require preserving the record labels back to the `Lookup` object.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#631
No description provided.