mirage / ocaml-dns

OCaml implementation of the DNS protocol
BSD 2-Clause "Simplified" License
105 stars 43 forks source link

wildcard support (RFC 4592) for the dns_trie, including test cases from RFC 4592 #248

Closed hannesm closed 3 years ago

hannesm commented 3 years ago

turns out the semantics of wildcards in DNS is conveniently defined for servers. It is not very intuitive for an operator, consider the following entries in a zone: *.example A 127.0.0.1 host.example A 127.0.0.2

now, the following questions and answers are valid: foo.example -> 127.0.0.1 foo.bar.example -> 127.0.0.1 bar.foo.baz.example -> 127.0.0.1 host.example -> 127.0.0.2 foo.host.example -> not found ( since host.example shadows the wildcard ) foo..example -> not found ( since .example hides itself ) example -> not found ( since does not match the non-existing label *)

fixes #162