2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

1158. [func] Report the client's address when logging notify

messages.
This commit is contained in:
Mark Andrews
2001-12-10 23:09:24 +00:00
parent 23924b681e
commit 8e40433e34
4 changed files with 19 additions and 17 deletions

View File

@@ -1,3 +1,6 @@
1158. [func] Report the client's address when logging notify
messages.
1157. [func] match-clients and match-destinations now accept
keys. [RT #2045]

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.201 2001/12/07 01:34:08 bwelling Exp $ */
/* $Id: client.c,v 1.202 2001/12/10 23:09:21 marka Exp $ */
#include <config.h>
@@ -2144,12 +2144,7 @@ ns_client_name(ns_client_t *client, char *peerbuf, size_t len) {
snprintf(peerbuf, len, "@%p", client);
}
static void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
ISC_FORMAT_PRINTF(5, 0);
static void
void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
{

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.h,v 1.63 2001/11/14 22:00:22 gson Exp $ */
/* $Id: client.h,v 1.64 2001/12/10 23:09:24 marka Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -303,6 +303,10 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level,
const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap) ISC_FORMAT_PRINTF(5, 0);
void
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdataclass_t rdclass,
char *buf, size_t len);

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: notify.c,v 1.25 2001/12/06 18:55:52 gson Exp $ */
/* $Id: notify.c,v 1.26 2001/12/10 23:09:23 marka Exp $ */
#include <config.h>
@@ -36,11 +36,11 @@
*/
static void
notify_log(int level, const char *fmt, ...) {
notify_log(ns_client_t *client, int level, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
isc_log_vwrite(ns_g_lctx, DNS_LOGCATEGORY_NOTIFY, NS_LOGMODULE_NOTIFY,
ns_client_logv(client, DNS_LOGCATEGORY_NOTIFY, NS_LOGMODULE_NOTIFY,
level, fmt, ap);
va_end(ap);
}
@@ -83,7 +83,7 @@ ns_notify_start(ns_client_t *client) {
*/
result = dns_message_firstname(request, DNS_SECTION_QUESTION);
if (result != ISC_R_SUCCESS) {
notify_log(ISC_LOG_INFO, "notify question section empty");
notify_log(client, ISC_LOG_INFO, "notify question section empty");
goto failure;
}
@@ -94,7 +94,7 @@ ns_notify_start(ns_client_t *client) {
dns_message_currentname(request, DNS_SECTION_QUESTION, &zonename);
zone_rdataset = ISC_LIST_HEAD(zonename->list);
if (ISC_LIST_NEXT(zone_rdataset, link) != NULL) {
notify_log(ISC_LOG_INFO,
notify_log(client, ISC_LOG_INFO,
"notify question section contains multiple RRs");
goto failure;
}
@@ -102,14 +102,14 @@ ns_notify_start(ns_client_t *client) {
/* The zone section must have exactly one name. */
result = dns_message_nextname(request, DNS_SECTION_ZONE);
if (result != ISC_R_NOMORE) {
notify_log(ISC_LOG_INFO,
notify_log(client, ISC_LOG_INFO,
"notify question section contains multiple RRs");
goto failure;
}
/* The one rdataset must be an SOA. */
if (zone_rdataset->type != dns_rdatatype_soa) {
notify_log(ISC_LOG_INFO,
notify_log(client, ISC_LOG_INFO,
"notify question section contains no SOA");
goto failure;
}
@@ -118,7 +118,7 @@ ns_notify_start(ns_client_t *client) {
&zone);
if (result != ISC_R_SUCCESS) {
dns_name_format(zonename, str, sizeof(str));
notify_log(ISC_LOG_INFO,
notify_log(client, ISC_LOG_INFO,
"received notify for zone '%s': not authoritative",
str);
goto failure;
@@ -133,7 +133,7 @@ ns_notify_start(ns_client_t *client) {
break;
default:
dns_name_format(zonename, str, sizeof(str));
notify_log(ISC_LOG_INFO,
notify_log(client, ISC_LOG_INFO,
"received notify for zone '%s': not authoritative",
str);
goto failure;