mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
1575. [func] Log TSIG name on TSIG verify failure. [RT #4404]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,4 +1,4 @@
|
|||||||
1575. [placeholder] rt4404
|
1575. [func] Log TSIG name on TSIG verify failure. [RT #4404]
|
||||||
|
|
||||||
1574. [placeholder] rt9091
|
1574. [placeholder] rt9091
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: client.c,v 1.217 2003/10/25 00:09:13 jinmei Exp $ */
|
/* $Id: client.c,v 1.218 2004/02/09 23:25:22 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -1456,17 +1456,27 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
|||||||
} else {
|
} else {
|
||||||
char tsigrcode[64];
|
char tsigrcode[64];
|
||||||
isc_buffer_t b;
|
isc_buffer_t b;
|
||||||
|
dns_name_t *name = NULL;
|
||||||
|
|
||||||
isc_buffer_init(&b, tsigrcode, sizeof(tsigrcode) - 1);
|
isc_buffer_init(&b, tsigrcode, sizeof(tsigrcode) - 1);
|
||||||
RUNTIME_CHECK(dns_tsigrcode_totext(client->message->tsigstatus,
|
RUNTIME_CHECK(dns_tsigrcode_totext(client->message->tsigstatus,
|
||||||
&b) == ISC_R_SUCCESS);
|
&b) == ISC_R_SUCCESS);
|
||||||
tsigrcode[isc_buffer_usedlength(&b)] = '\0';
|
tsigrcode[isc_buffer_usedlength(&b)] = '\0';
|
||||||
/* There is a signature, but it is bad. */
|
/* There is a signature, but it is bad. */
|
||||||
|
if (dns_message_gettsig(client->message, &name) != NULL) {
|
||||||
|
char namebuf[DNS_NAME_FORMATSIZE];
|
||||||
|
dns_name_format(name, namebuf, sizeof(namebuf));
|
||||||
|
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||||
|
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
|
||||||
|
"request has invalid signature: "
|
||||||
|
"TSIG %s: %s (%s)", namebuf,
|
||||||
|
isc_result_totext(result), tsigrcode);
|
||||||
|
} else {
|
||||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||||
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
|
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
|
||||||
"request has invalid signature: %s (%s)",
|
"request has invalid signature: %s (%s)",
|
||||||
isc_result_totext(result),
|
isc_result_totext(result), tsigrcode);
|
||||||
tsigrcode);
|
}
|
||||||
/*
|
/*
|
||||||
* Accept update messages signed by unknown keys so that
|
* Accept update messages signed by unknown keys so that
|
||||||
* update forwarding works transparently through slaves
|
* update forwarding works transparently through slaves
|
||||||
|
Reference in New Issue
Block a user