From c19f322914f380404b613fbb31f5ac2582098f9d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 12 Mar 2010 03:34:56 +0000 Subject: [PATCH] 2866. [bug] Windows does not like the TSIG name being compressed. [RT #20986] --- CHANGES | 3 +++ bin/nsupdate/nsupdate.c | 6 +++++- lib/dns/message.c | 4 +++- lib/dns/tsig.c | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index f97d26433f..a8aa9861c4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2866. [bug] Windows does not like the TSIG name being compressed. + [RT #20986] + 2865. [bug] memset to zero event.data. [RT #20986] 2864. [bug] Direct SIG/RRSIG queries were not handled correctly. diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 3d3645d36f..f3c5011452 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.176 2010/03/09 03:46:12 marka Exp $ */ +/* $Id: nsupdate.c,v 1.177 2010/03/12 03:34:55 marka Exp $ */ /*! \file */ @@ -2097,6 +2097,10 @@ send_update(dns_name_t *zonename, isc_sockaddr_t *master, fprintf(stderr, "Sending update to %s\n", addrbuf); } + /* Windows doesn't like the tsig name to be compressed. */ + if (updatemsg->tsigname) + updatemsg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS; + result = dns_request_createvia3(requestmgr, updatemsg, srcaddr, master, options, tsigkey, timeout, udp_timeout, udp_retries, global_task, diff --git a/lib/dns/message.c b/lib/dns/message.c index 1bbfe3ab8b..883216833e 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: message.c,v 1.251 2010/03/04 23:50:34 tbox Exp $ */ +/* $Id: message.c,v 1.252 2010/03/12 03:34:56 marka Exp $ */ /*! \file */ @@ -1531,6 +1531,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx, } else if (rdtype == dns_rdatatype_tsig && msg->tsig == NULL) { msg->tsig = rdataset; msg->tsigname = name; + /* Windows doesn't like TSIG names to be compressed. */ + msg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS; rdataset = NULL; free_rdataset = ISC_FALSE; free_name = ISC_FALSE; diff --git a/lib/dns/tsig.c b/lib/dns/tsig.c index d164530654..60dbb436d5 100644 --- a/lib/dns/tsig.c +++ b/lib/dns/tsig.c @@ -16,7 +16,7 @@ */ /* - * $Id: tsig.c,v 1.138 2009/06/11 23:47:55 tbox Exp $ + * $Id: tsig.c,v 1.139 2010/03/12 03:34:56 marka Exp $ */ /*! \file */ #include @@ -907,6 +907,9 @@ dns_tsig_sign(dns_message_t *msg) { msg->tsig = dataset; msg->tsigname = owner; + /* Windows does not like the tsig name being compressed. */ + msg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS; + return (ISC_R_SUCCESS); cleanup_rdatalist: