added MIO_SVC_DNC_RESOLVE_FLAG_DNSSEC
This commit is contained in:
@ -884,28 +884,12 @@ static void on_dnc_resolve (mio_svc_dnc_t* dnc, mio_dns_msg_t* reqmsg, mio_errnu
|
||||
|
||||
if (resolxtn->flags & MIO_SVC_DNC_RESOLVE_FLAG_COOKIE)
|
||||
{
|
||||
/* ------------------------------------------------- */
|
||||
if (pi->edns.cookie.server_len > 0)
|
||||
{
|
||||
/* remember the server cookie received to use it with other new requests */
|
||||
/* remember the received server cookie to use it with other new requests */
|
||||
MIO_MEMCPY (dnc->cookie.data.server, pi->edns.cookie.data.server, pi->edns.cookie.server_len);
|
||||
dnc->cookie.server_len = pi->edns.cookie.server_len;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (pi->hdr.rcode == MIO_DNS_RCODE_BADCOOKIE)
|
||||
{
|
||||
/* TODO: retry it */
|
||||
#if 0
|
||||
if (mio_svc_dnc_resolve(dnc, qname, resolxtn->qtype, resolxtn->flags, on_dnc_resolve, resolxtn->xtnsize) <= -1)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
/*how to retry?*/
|
||||
}
|
||||
#endif
|
||||
/* ------------------------------------------------- */
|
||||
|
||||
}
|
||||
|
||||
if (!(resolxtn->flags & MIO_SVC_DNC_RESOLVE_FLAG_BRIEF))
|
||||
@ -1031,6 +1015,11 @@ mio_dns_msg_t* mio_svc_dnc_resolve (mio_svc_dnc_t* dnc, const mio_bch_t* qname,
|
||||
qedns.beoptr = &beopt_cookie;
|
||||
}
|
||||
|
||||
if (resolve_flags & MIO_SVC_DNC_RESOLVE_FLAG_DNSSEC)
|
||||
{
|
||||
qedns.dnssecok = 1;
|
||||
}
|
||||
|
||||
reqmsg = make_dns_msg(dnc, &qhdr, &qr, 1, MIO_NULL, 0, &qedns, on_dnc_resolve, MIO_SIZEOF(*resolxtn) + xtnsize);
|
||||
if (reqmsg)
|
||||
{
|
||||
|
@ -407,8 +407,9 @@ enum mio_svc_dnc_resolve_flag_t
|
||||
/* the following flag bits are resolver specific. it must not overlap with send flag bits */
|
||||
MIO_SVC_DNC_RESOLVE_FLAG_BRIEF = (1 << 8),
|
||||
MIO_SVC_DNC_RESOLVE_FLAG_COOKIE = (1 << 9),
|
||||
MIO_SVC_DNC_RESOLVE_FLAG_DNSSEC = (1 << 10),
|
||||
|
||||
MIO_SVC_DNC_RESOLVE_FLAG_ALL = (MIO_SVC_DNC_RESOLVE_FLAG_PREFER_TCP | MIO_SVC_DNC_RESOLVE_FLAG_TCP_IF_TC | MIO_SVC_DNC_RESOLVE_FLAG_BRIEF | MIO_SVC_DNC_RESOLVE_FLAG_COOKIE)
|
||||
MIO_SVC_DNC_RESOLVE_FLAG_ALL = (MIO_SVC_DNC_RESOLVE_FLAG_PREFER_TCP | MIO_SVC_DNC_RESOLVE_FLAG_TCP_IF_TC | MIO_SVC_DNC_RESOLVE_FLAG_BRIEF | MIO_SVC_DNC_RESOLVE_FLAG_COOKIE | MIO_SVC_DNC_RESOLVE_FLAG_DNSSEC)
|
||||
};
|
||||
typedef enum mio_svc_dnc_resolve_flag_t mio_svc_dnc_resolve_flag_t;
|
||||
|
||||
|
Reference in New Issue
Block a user