source: vendor/3.6.23/examples/bind9-patches/0003-don-t-compress-TSIG-names.patch

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 2.0 KB
Line 
1From ec22ed6c9797dbdcd820e352167bef8500ca00c6 Mon Sep 17 00:00:00 2001
2From: Andrew Tridgell <tridge@samba.org>
3Date: Wed, 17 Feb 2010 12:20:35 +1100
4Subject: [PATCH 3/5] don't compress TSIG names
5
6windows DNS servers will refuse TSIG-GSS requests with compressed
7names
8---
9 bin/nsupdate/nsupdate.c | 4 ++++
10 lib/dns/message.c | 2 ++
11 lib/dns/tsig.c | 3 +++
12 3 files changed, 9 insertions(+), 0 deletions(-)
13
14diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c
15index 6cf4cf4..f7ce6db 100644
16--- a/bin/nsupdate/nsupdate.c
17+++ b/bin/nsupdate/nsupdate.c
18@@ -1985,6 +1985,10 @@ send_update(dns_name_t *zonename, isc_sockaddr_t *master,
19 fprintf(stderr, "Sending update to %s\n", addrbuf);
20 }
21
22+ /* windows doesn't like the tsig name to be compressed */
23+ if (updatemsg->tsigname)
24+ updatemsg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
25+
26 result = dns_request_createvia3(requestmgr, updatemsg, srcaddr,
27 master, options, tsigkey, timeout,
28 udp_timeout, udp_retries, global_task,
29diff --git a/lib/dns/message.c b/lib/dns/message.c
30index ae4965f..cb4528f 100644
31--- a/lib/dns/message.c
32+++ b/lib/dns/message.c
33@@ -1531,6 +1531,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
34 } else if (rdtype == dns_rdatatype_tsig && msg->tsig == NULL) {
35 msg->tsig = rdataset;
36 msg->tsigname = name;
37+ /* TSIG names should not be compressed */
38+ msg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
39 rdataset = NULL;
40 free_rdataset = ISC_FALSE;
41 free_name = ISC_FALSE;
42diff --git a/lib/dns/tsig.c b/lib/dns/tsig.c
43index 74a7af3..3223942 100644
44--- a/lib/dns/tsig.c
45+++ b/lib/dns/tsig.c
46@@ -889,6 +889,9 @@ dns_tsig_sign(dns_message_t *msg) {
47 msg->tsig = dataset;
48 msg->tsigname = owner;
49
50+ /* windows does not like the tsig name being compressed */
51+ msg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
52+
53 return (ISC_R_SUCCESS);
54
55 cleanup_rdatalist:
56--
571.6.3.3
58
Note: See TracBrowser for help on using the repository browser.