Some kind of PCRE
Joey Parrish
jparrish at layerxtech.com
Fri May 21 14:55:16 EDT 2010
On May 21, 2010, at 20:05 , Sam Trenholme wrote:
>> Anyone knows if something like that would be against RFC(or something
>> alike)?
>
> It’s not against the RFCs, but it is against the goal of making a
> high-performance DNS server.
Sebastian,
Though it would be a cool idea, it would kill performance. If your entries are static, you can perform a very quick lookup for each query in more-or-less constant time. If you have a series of regex, you can't know which of them will definitely match without evaluating each one against your query. The time to do this grows larger with more regular expressions, and that doesn't even account for the fact that different regular expressions can take very different amounts of time to execute. You can even write a regex that takes quadratic time with respect to the length of the string you are testing. I wouldn't be surprised if you could do even worse than that if you tried.
For the examples you give, most of them (alternations) could be easily pre-expanded before loading the config into maradns. I would strongly consider writing a simple script that takes some more compact description of your zone and expands it into a full maradns config file. When you make edits, you re-run your script, then reload maradns. I used to use a system much like that years ago with a bind server, and it worked quite well.
--Joey
More information about the list
mailing list