2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[master] fix dns_request_createvia assert

3474.	[bug]		nsupdate could assert when the local and remote
			address families didn't match. [RT #22897]
This commit is contained in:
Evan Hunt
2013-01-23 15:39:05 -08:00
parent 627d4113a0
commit ffff5d6792
3 changed files with 18 additions and 2 deletions

View File

@@ -894,13 +894,15 @@ dns_request_createvia3(dns_requestmgr_t *requestmgr, dns_message_t *message,
REQUIRE(action != NULL);
REQUIRE(requestp != NULL && *requestp == NULL);
REQUIRE(timeout > 0);
if (srcaddr != NULL)
REQUIRE(isc_sockaddr_pf(srcaddr) == isc_sockaddr_pf(destaddr));
mctx = requestmgr->mctx;
req_log(ISC_LOG_DEBUG(3), "dns_request_createvia");
if (srcaddr != NULL &&
isc_sockaddr_pf(srcaddr) != isc_sockaddr_pf(destaddr))
return (ISC_R_FAMILYMISMATCH);
if (isblackholed(requestmgr->dispatchmgr, destaddr))
return (DNS_R_BLACKHOLED);