summaryrefslogtreecommitdiff
path: root/lib/dns/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/request.c')
-rw-r--r--lib/dns/request.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/dns/request.c b/lib/dns/request.c
index 1316e6994110..59e166eb0257 100644
--- a/lib/dns/request.c
+++ b/lib/dns/request.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -686,6 +686,7 @@ dns_request_createraw3(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
dns_messageid_t id;
isc_boolean_t tcp = ISC_FALSE;
isc_region_t r;
+ unsigned int dispopt = 0;
REQUIRE(VALID_REQUESTMGR(requestmgr));
REQUIRE(msgbuf != NULL);
@@ -751,9 +752,14 @@ dns_request_createraw3(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
if (result != ISC_R_SUCCESS)
goto cleanup;
- result = dns_dispatch_addresponse2(request->dispatch, destaddr, task,
- req_response, request, &id,
- &request->dispentry,
+ if ((options & DNS_REQUESTOPT_FIXEDID) != 0) {
+ id = (r.base[0] << 8) | r.base[1];
+ dispopt |= DNS_DISPATCHOPT_FIXEDID;
+ }
+
+ result = dns_dispatch_addresponse3(request->dispatch, dispopt,
+ destaddr, task, req_response,
+ request, &id, &request->dispentry,
requestmgr->socketmgr);
if (result != ISC_R_SUCCESS)
goto cleanup;