[GH-ISSUE #510] Server should support wildcards #508

Closed
opened 2026-03-15 22:52:49 +03:00 by kerem · 4 comments
Owner

Originally created by @rushmorem on GitHub (Jun 12, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/510

Originally created by @rushmorem on GitHub (Jun 12, 2018). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/510
kerem 2026-03-15 22:52:49 +03:00
Author
Owner

@bluejekyll commented on GitHub (Jun 12, 2018):

I completely forgot I hadn't gone back and fixed this.

I think this should look similar to this lookup path: https://github.com/bluejekyll/trust-dns/blob/master/server/src/authority/authority.rs#L1022-L1039

Which may need a separate variant for the Iterator: https://github.com/bluejekyll/trust-dns/blob/master/server/src/authority/authority.rs#L1381

<!-- gh-comment-id:396622812 --> @bluejekyll commented on GitHub (Jun 12, 2018): I completely forgot I hadn't gone back and fixed this. I think this should look similar to this lookup path: https://github.com/bluejekyll/trust-dns/blob/master/server/src/authority/authority.rs#L1022-L1039 Which may need a separate variant for the Iterator: https://github.com/bluejekyll/trust-dns/blob/master/server/src/authority/authority.rs#L1381
Author
Owner

@rushmorem commented on GitHub (Jun 12, 2018):

I think the fix for this is even simpler than that. The problem is we are calling get(&rr_key) which does exact matches. We simply need to replace that with Authority::find which does something similar to what Catalog::find does. If a get fails to find any results, we need to replace the first label with * and see if we can find any results, taking provisions of RFC 1034 into account.

<!-- gh-comment-id:396628437 --> @rushmorem commented on GitHub (Jun 12, 2018): I think the fix for this is even simpler than that. The problem is we are calling `get(&rr_key)` which does exact matches. We simply need to replace that with `Authority::find` which does something similar to what `Catalog::find` does. If a `get` fails to find any results, we need to replace the first label with `*` and see if we can find any results, taking provisions of RFC 1034 into account.
Author
Owner

@bluejekyll commented on GitHub (Jun 12, 2018):

I haven't read that part of the RFC in a while. I pointed to that custom iterator, mostly because that Iterator is efficient for a full scan of the records in the zone, which *.example.com might need. But if you think it would be efficient and easy to do this differently, then I'm definitely open to that.

Edit: I just realized I was thinking of this in the wrong context. “*.example.com” is the target of the lookup, not the query. You can disregard my comments. I think your comment is closer to the needed solution.

<!-- gh-comment-id:396630379 --> @bluejekyll commented on GitHub (Jun 12, 2018): I haven't read that part of the RFC in a while. I pointed to that custom iterator, mostly because that Iterator is efficient for a full scan of the records in the zone, which `*.example.com` might need. But if you think it would be efficient and easy to do this differently, then I'm definitely open to that. Edit: I just realized I was thinking of this in the wrong context. “*.example.com” is the target of the lookup, not the query. You can disregard my comments. I think your comment is closer to the needed solution.
Author
Owner

@bluejekyll commented on GitHub (Apr 13, 2019):

Fixed in github.com/bluejekyll/trust-dns@a43aff634b

<!-- gh-comment-id:482899771 --> @bluejekyll commented on GitHub (Apr 13, 2019): Fixed in https://github.com/bluejekyll/trust-dns/commit/a43aff634b7f7883c74cffb3a5c776583df84217
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#508
No description provided.