2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 08:05:21 +00:00

A couple minor bugs relating to TCP TSIG verification

This commit is contained in:
Brian Wellington
2000-04-08 04:40:21 +00:00
parent 8571e5ca37
commit dc3fc5830a
2 changed files with 8 additions and 5 deletions

View File

@@ -1375,7 +1375,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
if (r.length != 0)
return (DNS_R_FORMERR);
if (msg->tsigset != NULL || msg->sig0 != NULL) {
if (msg->tsigset != NULL || msg->tsigkey != NULL || msg->sig0 != NULL) {
msg->saved = isc_mem_get(msg->mctx, sizeof(isc_region_t));
if (msg->saved == NULL)
return (ISC_R_NOMEMORY);

View File

@@ -16,7 +16,7 @@
*/
/*
* $Id: tsig.c,v 1.50 2000/04/06 22:02:27 explorer Exp $
* $Id: tsig.c,v 1.51 2000/04/08 04:40:21 bwelling Exp $
* Principal Author: Brian Wellington
*/
@@ -887,9 +887,12 @@ dns_tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg) {
memcpy(&header[DNS_MESSAGE_HEADERLEN - 2], &addcount, 2);
}
/* Put in the original id */
/* Put in the original id. */
/* XXX Can TCP transfers be forwarded? How would that work? */
if (tsig != NULL) {
id = htons(tsig->originalid);
memcpy(&header[0], &id, 2);
}
/* Digest the modified header */
header_r.base = (unsigned char *) header;