Commit 5a680f41 authored by Mark Andrews's avatar Mark Andrews
Browse files

1587. [bug] dns_message_settsigkey() failed to clear existing key.

                        [RT #10590]
parent d38cad0a
1588. [bug] win32: TCP sockets could become blocked. [RT #10115]
1587. [placeholder] rt10590
1587. [bug] dns_message_settsigkey() failed to clear existing key.
[RT #10590]
1586. [func] "check-names" is now implemented.
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.221 2004/03/05 05:09:21 marka Exp $ */
/* $Id: message.c,v 1.222 2004/03/10 00:47:40 marka Exp $ */
/***
*** Imports
......@@ -2481,6 +2481,13 @@ dns_message_settsigkey(dns_message_t *msg, dns_tsigkey_t *key) {
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(msg->state == DNS_SECTION_ANY);
if (key == NULL && msg->tsigkey != NULL) {
if (msg->sig_reserved != 0) {
dns_message_renderrelease(msg, msg->sig_reserved);
msg->sig_reserved = 0;
}
dns_tsigkey_detach(&msg->tsigkey);
}
if (key != NULL) {
REQUIRE(msg->tsigkey == NULL && msg->sig0key == NULL);
dns_tsigkey_attach(key, &msg->tsigkey);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment