[GH-ISSUE #2168] Request for a wildcard with ANY returns nothing #910

Open
opened 2026-03-16 00:50:34 +03:00 by kerem · 3 comments
Owner

Originally created by @eirnym on GitHub (Mar 7, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2168

Describe the bug

For wildcard subdomain server returns nothing if ANY type has been requested

To Reproduce

Use zone definition as shown below. Only relevant parts of cdig output has been shown.

$ dig @127.0.0.1 -p 8053 ANY example.com 
;; QUESTION SECTION:
;example.com.			IN	ANY

;; ANSWER SECTION:
example.com.		86400	IN	A	127.0.0.1
example.com.		86400	IN	NS	ns.example.com.
example.com.		604800	IN	SOA	ns.example.com. root.example.com. 199609203 28800 7200 604800 86400
example.com.		86400	IN	AAAA	::1

$ dig @127.0.0.1 -p 8053 ANY www.example.com 
;; QUESTION SECTION:
;www.example.com.		IN	ANY

;; ANSWER SECTION:
www.example.com.	86400	IN	A	127.0.0.1
www.example.com.	86400	IN	AAAA	::1

$ dig @127.0.0.1 -p 8053 ANY test.example.com 
;; QUESTION SECTION:
;test.example.com.		IN	ANY

Expected behavior

AAAA and A records have been returned for wildcard domain as well.

System:

  • OS: macOS
  • Architecture: aarch64
  • Version Monterey
  • rustc version: 1.75.0

Version:
Crate: hickory-dns binary
Version: git revision da41e4ad

Additional context

zone definition:

$TTL 86400

@       IN      SOA     ns.example.com.      root.example.com. (
                                199609203 ; Serial
                                8h        ; Refresh
                                120m      ; Retry
                                7d        ; Expire
                                24h)      ; Minimum TTL


@                NS      ns.example.com.

@               A       127.0.0.1
@               AAAA    ::1
www             A       127.0.0.1
www             AAAA    ::1
*               A       127.0.0.1
*               AAAA    ::1
Originally created by @eirnym on GitHub (Mar 7, 2024). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2168 **Describe the bug** For wildcard subdomain server returns nothing if `ANY` type has been requested **To Reproduce** Use zone definition as shown below. Only relevant parts of c`dig` output has been shown. ```zsh $ dig @127.0.0.1 -p 8053 ANY example.com ;; QUESTION SECTION: ;example.com. IN ANY ;; ANSWER SECTION: example.com. 86400 IN A 127.0.0.1 example.com. 86400 IN NS ns.example.com. example.com. 604800 IN SOA ns.example.com. root.example.com. 199609203 28800 7200 604800 86400 example.com. 86400 IN AAAA ::1 $ dig @127.0.0.1 -p 8053 ANY www.example.com ;; QUESTION SECTION: ;www.example.com. IN ANY ;; ANSWER SECTION: www.example.com. 86400 IN A 127.0.0.1 www.example.com. 86400 IN AAAA ::1 $ dig @127.0.0.1 -p 8053 ANY test.example.com ;; QUESTION SECTION: ;test.example.com. IN ANY ``` **Expected behavior** `AAAA` and `A` records have been returned for wildcard domain as well. **System:** - OS: macOS - Architecture: aarch64 - Version Monterey - rustc version: 1.75.0 **Version:** Crate: hickory-dns binary Version: git revision da41e4ad **Additional context** zone definition: ```zone $TTL 86400 @ IN SOA ns.example.com. root.example.com. ( 199609203 ; Serial 8h ; Refresh 120m ; Retry 7d ; Expire 24h) ; Minimum TTL @ NS ns.example.com. @ A 127.0.0.1 @ AAAA ::1 www A 127.0.0.1 www AAAA ::1 * A 127.0.0.1 * AAAA ::1 ```
Author
Owner

@djc commented on GitHub (Mar 7, 2024):

I agree that this is surprising. Would you be able to contribute a PR toward fixing this?

<!-- gh-comment-id:1983349801 --> @djc commented on GitHub (Mar 7, 2024): I agree that this is surprising. Would you be able to contribute a PR toward fixing this?
Author
Owner

@bluejekyll commented on GitHub (Apr 10, 2024):

This is probably a gap in the wildcard processing code: https://github.com/hickory-dns/hickory-dns/blob/main/crates/server/src/store/in_memory/authority.rs#L429

<!-- gh-comment-id:2047819116 --> @bluejekyll commented on GitHub (Apr 10, 2024): This is probably a gap in the wildcard processing code: https://github.com/hickory-dns/hickory-dns/blob/main/crates/server/src/store/in_memory/authority.rs#L429
Author
Owner

@eirnym commented on GitHub (Feb 16, 2025):

Any news on this one?

<!-- gh-comment-id:2661465626 --> @eirnym commented on GitHub (Feb 16, 2025): Any news on this one?
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#910
No description provided.