dns.helpers.validate_response

dns.helpers

validate_response(resp, id, qname, qtype, sent_0x20_name) -> ok, err

Validate a decoded DNS response against the original query

Checks that the response matches the query we sent: ID match, a question section with matching qtype and name. If sent_0x20_name is non-nil, the response name is verified against the 0x20-encoded original (case-preserving); otherwise a case-insensitive name comparison is used.