mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-04 21:32:05 -04:00
Extract and send server cookie with BADVERS retry
A BADVERS response can also include EDNS SERVER COOKIE. Extract
that from the OPT record and use it when resending the request.
(cherry picked from commit 44140cad3b)
This commit is contained in:
parent
71875eb25a
commit
055253998e
1 changed files with 6 additions and 0 deletions
|
|
@ -4341,6 +4341,12 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
|
|||
dighost_comments(l, "BADVERS, retrying with EDNS version %u.",
|
||||
(unsigned int)newedns);
|
||||
l->edns = newedns;
|
||||
/*
|
||||
* Extract the server cookie so it can be sent in the retry.
|
||||
*/
|
||||
if (l->cookie == NULL && l->sendcookie) {
|
||||
process_opt(l, msg);
|
||||
}
|
||||
n = requeue_lookup(l, true);
|
||||
if (l->trace && l->trace_root) {
|
||||
n->rdtype = l->qrdtype;
|
||||
|
|
|
|||
Loading…
Reference in a new issue