aboutsummaryrefslogtreecommitdiff
path: root/bin/named/client.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2008-12-23 18:35:21 +0000
committerDoug Barton <dougb@FreeBSD.org>2008-12-23 18:35:21 +0000
commit2fabdf5789e562f51310270bef3cb863c0dc920b (patch)
treed25d756be8550df073eb3ed4e5b39831380291b5 /bin/named/client.c
parente086bf114fd88cb7f882d66afe4492fe5659bcf2 (diff)
downloadsrc-2fabdf5789e562f51310270bef3cb863c0dc920b.tar.gz
src-2fabdf5789e562f51310270bef3cb863c0dc920b.zip
Vendor import of BIND 9.4.3vendor/bind9/9.4.3
Notes
Notes: svn path=/vendor/bind9/dist/; revision=186448 svn path=/vendor/bind9/9.4.3/; revision=186449; tag=vendor/bind9/9.4.3
Diffstat (limited to 'bin/named/client.c')
-rw-r--r--bin/named/client.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/bin/named/client.c b/bin/named/client.c
index 3b87d2648c0e..03cfdb6a714e 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.c,v 1.219.18.28.10.2 2008/07/23 07:28:54 tbox Exp $ */
+/* $Id: client.c,v 1.219.18.31 2008/05/22 23:46:03 tbox Exp $ */
#include <config.h>
@@ -132,7 +132,7 @@ struct ns_clientmgr {
#define MANAGER_MAGIC ISC_MAGIC('N', 'S', 'C', 'm')
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, MANAGER_MAGIC)
-/*!
+/*!
* Client object states. Ordering is significant: higher-numbered
* states are generally "more active", meaning that the client can
* have more dynamically allocated data, outstanding events, etc.
@@ -286,7 +286,7 @@ exit_check(ns_client_t *client) {
*
* Keep the view attached until any outstanding updates complete.
*/
- if (client->nupdates == 0 &&
+ if (client->nupdates == 0 &&
client->newstate == NS_CLIENTSTATE_FREED && client->view != NULL)
dns_view_detach(&client->view);
@@ -817,7 +817,7 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
if (ns_g_server->blackholeacl != NULL &&
dns_acl_match(&netaddr, NULL,
- ns_g_server->blackholeacl,
+ ns_g_server->blackholeacl,
&ns_g_server->aclenv,
&match, NULL) == ISC_R_SUCCESS &&
match > 0)
@@ -834,7 +834,7 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
isc_buffer_usedregion(buffer, &r);
CTRACE("sendto");
-
+
result = isc_socket_sendto2(socket, &r, client->task,
address, pktinfo,
client->sendevent, sockflags);
@@ -1108,8 +1108,8 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
/*
* FORMERR loop avoidance: If we sent a FORMERR message
* with the same ID to the same client less than two
- * seconds ago, assume that we are in an infinite error
- * packet dialog with a server for some protocol whose
+ * seconds ago, assume that we are in an infinite error
+ * packet dialog with a server for some protocol whose
* error responses look enough like DNS queries to
* elicit a FORMERR response. Drop a packet to break
* the loop.
@@ -1534,7 +1534,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
* For IPv6 UDP queries, we get this from the pktinfo structure (if
* supported).
* If all the attempts fail (this can happen due to memory shortage,
- * etc), we regard this as an error for safety.
+ * etc), we regard this as an error for safety.
*/
if ((client->interface->flags & NS_INTERFACEFLAG_ANYADDR) == 0)
isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr);
@@ -1595,7 +1595,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
view);
if (sigresult == ISC_R_SUCCESS)
tsig = client->message->tsigname;
-
+
if (allowed(&netaddr, tsig, view->matchclients) &&
allowed(&destaddr, tsig, view->matchdestinations) &&
!((client->message->flags & DNS_MESSAGEFLAG_RD)
@@ -1726,7 +1726,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT,
ISC_LOG_DEBUG(3), ra ? "recursion available" :
- "recursion not available");
+ "recursion not available");
/*
* Adjust maximum UDP response size for this client.
@@ -1820,10 +1820,10 @@ get_clientmctx(ns_clientmgr_t *manager, isc_mem_t **mctxp) {
return (result);
manager->mctxpool[manager->nextmctx] = clientmctx;
- manager->nextmctx++;
- if (manager->nextmctx == NMCTXS)
- manager->nextmctx = 0;
}
+ manager->nextmctx++;
+ if (manager->nextmctx == NMCTXS)
+ manager->nextmctx = 0;
#else
clientmctx = manager->mctx;
#endif
@@ -2093,7 +2093,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
if (ns_g_server->blackholeacl != NULL &&
dns_acl_match(&netaddr, NULL,
- ns_g_server->blackholeacl,
+ ns_g_server->blackholeacl,
&ns_g_server->aclenv,
&match, NULL) == ISC_R_SUCCESS &&
match > 0)
@@ -2482,7 +2482,7 @@ ns_client_checkacl(ns_client_t *client,
isc_result_t result =
ns_client_checkaclsilent(client, acl, default_allow);
- if (result == ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS)
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"%s approved", opname);
@@ -2538,16 +2538,16 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
void
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdatatype_t type,
- dns_rdataclass_t rdclass, char *buf, size_t len)
+ dns_rdataclass_t rdclass, char *buf, size_t len)
{
- char namebuf[DNS_NAME_FORMATSIZE];
- char typebuf[DNS_RDATATYPE_FORMATSIZE];
- char classbuf[DNS_RDATACLASS_FORMATSIZE];
-
- dns_name_format(name, namebuf, sizeof(namebuf));
- dns_rdatatype_format(type, typebuf, sizeof(typebuf));
- dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
- (void)snprintf(buf, len, "%s '%s/%s/%s'", msg, namebuf, typebuf,
+ char namebuf[DNS_NAME_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
+
+ dns_name_format(name, namebuf, sizeof(namebuf));
+ dns_rdatatype_format(type, typebuf, sizeof(typebuf));
+ dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
+ (void)snprintf(buf, len, "%s '%s/%s/%s'", msg, namebuf, typebuf,
classbuf);
}
@@ -2575,7 +2575,7 @@ ns_client_dumpmessage(ns_client_t *client, const char *reason) {
isc_mem_put(client->mctx, buf, len);
len += 1024;
} else if (result == ISC_R_SUCCESS)
- ns_client_log(client, NS_LOGCATEGORY_UNMATCHED,
+ ns_client_log(client, NS_LOGCATEGORY_UNMATCHED,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
"%s\n%.*s", reason,
(int)isc_buffer_usedlength(&buffer),
@@ -2595,7 +2595,7 @@ ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager) {
const char *sep;
REQUIRE(VALID_MANAGER(manager));
-
+
LOCK(&manager->lock);
client = ISC_LIST_HEAD(manager->recursing);
while (client != NULL) {