mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 15:30:00 -04:00
4313. [bug] Handle ns_client_replace failures in test mode.
[RT #41190]
(cherry picked from commit d88ba93712)
This commit is contained in:
parent
6442633cc2
commit
04e34494ea
2 changed files with 16 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4313. [bug] Handle ns_client_replace failures in test mode.
|
||||
[RT #41190]
|
||||
|
||||
4312. [bug] dig's unknown dns and edns flags (MBZ value) logging
|
||||
was not consistent. [RT #41600]
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,9 @@
|
|||
/*% Want Recursion? */
|
||||
#define WANTRECURSION(c) (((c)->query.attributes & \
|
||||
NS_QUERYATTR_WANTRECURSION) != 0)
|
||||
/*% Is TCP? */
|
||||
#define TCP(c) (((c)->attributes & NS_CLIENTATTR_TCP) != 0)
|
||||
|
||||
/*% Want DNSSEC? */
|
||||
#define WANTDNSSEC(c) (((c)->attributes & \
|
||||
NS_CLIENTATTR_WANTDNSSEC) != 0)
|
||||
|
|
@ -7819,8 +7822,16 @@ ns_query_start(ns_client_t *client) {
|
|||
/*
|
||||
* Test only.
|
||||
*/
|
||||
if (ns_g_clienttest && (client->attributes & NS_CLIENTATTR_TCP) == 0)
|
||||
RUNTIME_CHECK(ns_client_replace(client) == ISC_R_SUCCESS);
|
||||
if (ns_g_clienttest && !TCP(client)) {
|
||||
result = ns_client_replace(client);
|
||||
if (result == ISC_R_SHUTTINGDOWN) {
|
||||
ns_client_next(client, result);
|
||||
return;
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
query_error(client, result, __LINE__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that appropriate cleanups occur.
|
||||
|
|
|
|||
Loading…
Reference in a new issue