Commit 993b1541 authored by Mark Andrews's avatar Mark Andrews
Browse files

retry w/o TSIG

parent ad35e0ae
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.128 2004/03/04 01:21:38 marka Exp $ */
/* $Id: nsupdate.c,v 1.129 2004/03/04 05:33:03 marka Exp $ */
#include <config.h>
......@@ -1647,6 +1647,27 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
check_result(result, "dns_message_create");
result = dns_request_getresponse(request, rcvmsg,
DNS_MESSAGEPARSE_PRESERVEORDER);
if (result == DNS_R_TSIGERRORSET && userserver != NULL) {
dns_message_destroy(&rcvmsg);
ddebug("Destroying request [%p]", request);
dns_request_destroy(&request);
reqinfo = isc_mem_get(mctx, sizeof(nsu_requestinfo_t));
if (reqinfo == NULL)
fatal("out of memory");
reqinfo->msg = soaquery;
reqinfo->addr = addr;
dns_message_renderreset(soaquery);
ddebug("retrying soa request without TSIG");
result = dns_request_createvia3(requestmgr, soaquery,
localaddr, addr, 0, NULL,
FIND_TIMEOUT * 20,
FIND_TIMEOUT * 20, 3,
global_task, recvsoa, reqinfo,
&request);
check_result(result, "dns_request_createvia");
requests++;
return;
}
check_result(result, "dns_request_getresponse");
section = DNS_SECTION_ANSWER;
if (debugging) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment