Closed mzpqnxow closed 2 years ago
9f37f3bc0bc3d5add215e67a983fabed80bd8c22 implements this. For now, I chose to use the intermediate string representation, simply because it was the fastest and most readable way to implement it. As long as there are no dynamic memory allocations, I am not overly pedantic when it comes to these small tradeoffs.
Implementing it by directly converting it to the DNS label is left as an exercise to the reader ;)
Direct conversion is implemented by 0639b8cecca2a91134b65563f9c729de8d7e79eb.
oh dang, that was quick, thanks. I figured you would ask me to send a PR but this works even better :)
Thanks again!
I'm curious what your thoughts are on implicitly (or explicitly, via a flag) performing a run-time transform on dotted quad inputs when the question type is PTR. You probably know exactly what I'm describing, but the example:
... would be converted at run-time to:
Currently if you want to do PTR lookups from a list of dotted quads, you're responsible for doing the translation before the inputs get to
massdns
. This is easy enough to do by piping inputs through a simple script but I was curious what your thoughts on it were. It's not a difficult thing to do, nor does it have a big footprint depending on how you do it- it's more a question of whether you think it's the role ofmassdns
to do this sort of thingThanks for reviewing this and thanks for your work on the project
EDIT: I realize this would probably be implemented as translating the dotted quad directly into the DNS label, rather than going to the intermediate format instead- but you get what I mean I'm sure :)