Re: [s6-dns] is there a particular reason skadns_packet would return NULL errno ENETUNREACH?

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Thu, 13 Oct 2022 02:34:06 +0000

>To clarify, I'm referring to the ->target member (in srv) or the ->exchange member (in mx).
>
>Are those not the same as the input format for skadns_send?

  When parsed by s6dns_message_parse_answer_srv() and
s6dns_message_parse_answer_mx(), the domains are obtained from the
packet via s6dns_message_get_domain(), which call s6dns_domain_decode().

  In other words, when you obtain a s6dns_message_rr_srv_t or a
s6dns_message_rr_mx_t, the domains in these structures are in string
format. (Because usually they're destined to be returned to the
application and displayed, not used in another packet right away.)
  So if you want to reuse these domains for another skadns_send()
query, you need to re-encode them first via s6dns_domain_encode().

  Thanks Guillermo for getting to the bottom of this! :)

--
  Laurent
Received on Thu Oct 13 2022 - 04:34:06 CEST

This archive was generated by hypermail 2.4.0 : Thu Oct 13 2022 - 04:34:35 CEST