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

3164. [func] Enable DLZ modules to retrieve client information,

so that responses can be changed depending on the
			source address of the query. [RT #25768]
This commit is contained in:
Evan Hunt
2011-10-11 00:09:03 +00:00
parent 07dc62785b
commit 793814f807
36 changed files with 794 additions and 237 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.278 2011/10/10 22:57:13 each Exp $ */
/* $Id: client.c,v 1.279 2011/10/11 00:09:01 each Exp $ */
#include <config.h>
@@ -2852,3 +2852,14 @@ ns_client_qnamereplace(ns_client_t *client, dns_name_t *name) {
client->query.qname = name;
UNLOCK(&client->query.fetchlock);
}
isc_result_t
ns_client_sourceip(dns_clientinfo_t *ci, isc_sockaddr_t **addrp) {
ns_client_t *client = (ns_client_t *) ci->data;
REQUIRE(NS_CLIENT_VALID(client));
REQUIRE(addrp != NULL);
*addrp = &client->peeraddr;
return (ISC_R_SUCCESS);
}