Cloudflare's DOH misinterprets numeric record types

Hi there!

Accourding to the documentation for JSON DOH queries, record type can be “either a numeric value or text”. However, for example, when using record type 28 (per RFC 3596) instead of “AAAA” I’m getting back A-record anyway. In this example taken from the documentation the first query returns ipv6 address as expected, but the second one returns ipv4:

Other DOH resolvers I tested don’t have this issue. This is also reproducible with other record types (such as 15 for MX).

Thank you for looking into this.

~Egor

Hi, the application/dns-json accepts the standard generic record type format (e.g .TYPE28). I’ve added support for just the numeric type number as well, so either should work now.

Thank you, @mvavrusa ! It works as expected now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.