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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dns/request.c b/lib/dns/request.c
index 58c0103f4c7e..1316e6994110 100644
--- a/lib/dns/request.c
+++ b/lib/dns/request.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -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);