Skip to content
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

Request for a wildcard with ANY returns nothing #2168

Open
eirnym opened this issue Mar 7, 2024 · 2 comments
Open

Request for a wildcard with ANY returns nothing #2168

eirnym opened this issue Mar 7, 2024 · 2 comments
Labels
bug compliance Not compliant to DNS standard operations crate:server

Comments

@eirnym
Copy link

eirnym commented Mar 7, 2024

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 da41e4a

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
@djc
Copy link
Collaborator

djc commented Mar 7, 2024

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

@bluejekyll
Copy link
Member

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

@bluejekyll bluejekyll added crate:server bug compliance Not compliant to DNS standard operations labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compliance Not compliant to DNS standard operations crate:server
Projects
None yet
Development

No branches or pull requests

3 participants