CAA support in AnyEvent::DNS

Marc Lehmann schmorp at schmorp.de
Tue Aug 22 03:35:13 CEST 2017


On Wed, Aug 16, 2017 at 08:42:13PM -0700, Steve Atkins <steve at blighty.com> wrote:
> It's dns_unpack that's the issue. Passing 257 rather than 'caa' in would
> be easy enough, but dealing with the response being raw
> bytes rather than a decoded structure would make for pretty ugly client code.

I haven't looked at the CAA spec - if it requires decoding compressed labels
then it would be hard/impossible to decode afterwards, but if not, it
shouldn't be that bad.

> 
> Pushing a clean enhancement upstream seemed a better thing to do than monkey
> patching or maintaining a local fork, which were the other two things
> I considered.

Sure, it would be nice to support all records, but it's always a balance
bewteen breaking things improving things.

> > So at the moment, I am inclined to officially not accept further such
> > patches on the ground of backwards compatibility, at leats in less obsucre
> > cases.
> 
> I wonder how painful it'd be to distinguish between the request passing in
> a string ('caa') rather than an integer (257) and decide whether to decode the
> response or not based on that?

Hmm, that's an interesting idea, but we don't always have a specific query
type in the request, and the decoding API should work without having that
info. But it is an interetsing idea...

> It's not like new RRs turn up terribly often, though, so meh.

True, but there are lots of record types that AnyEvent::DNS doesn't have a
specific decoder for. Hopefully they can all be decoded without the packet at
hand. Maybe stuffing the packet data into the decoded structure somewhere
might be the right way.

Or a documented way to extend record types. Hmm, I will explore this and
put this on my (too long) todo list.

Thanks for your input (and patch :).

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list