]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2854. [func] nsupdate will now preserve the entered case of domain
authorMark Andrews <marka@isc.org>
Thu, 4 Mar 2010 05:24:56 +0000 (05:24 +0000)
committerMark Andrews <marka@isc.org>
Thu, 4 Mar 2010 05:24:56 +0000 (05:24 +0000)
                        names in update requests it sends. [RT #20928]

CHANGES
bin/nsupdate/nsupdate.c
lib/dns/include/dns/request.h
lib/dns/request.c

diff --git a/CHANGES b/CHANGES
index 46a7c7ec3a83f34fce9c42cb511e27805694a3b9..a67cd5202da6008ebaedbaa58a0c1166871c89c2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2854.  [func]          nsupdate will now preserve the entered case of domain
+                       names in update requests it sends. [RT #20928]
+
 2854.  [func]          dig: allow the final soa record in a axfr response to
                        be suppressed, dig +onesoa. [RT #20929]
 
index a24590ad549570a9141df881d6506053826d0a4e..f9471314cba5829da2dc99138869e343bd9fa4ea 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsupdate.c,v 1.173 2009/09/29 15:06:06 fdupont Exp $ */
+/* $Id: nsupdate.c,v 1.174 2010/03/04 05:24:56 marka Exp $ */
 
 /*! \file */
 
@@ -2078,7 +2078,7 @@ send_update(dns_name_t *zonename, isc_sockaddr_t *master,
 {
        isc_result_t result;
        dns_request_t *request = NULL;
-       unsigned int options = 0;
+       unsigned int options = DNS_REQUESTOPT_CASE;
 
        ddebug("send_update()");
 
index adadce3ea391da2385ea1df079b38010bac7a50a..69b72b3cd1fbccd6532bc2490650c2a066608059 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: request.h,v 1.29 2009/01/17 23:47:43 tbox Exp $ */
+/* $Id: request.h,v 1.30 2010/03/04 05:24:56 marka Exp $ */
 
 #ifndef DNS_REQUEST_H
 #define DNS_REQUEST_H 1
@@ -47,6 +47,7 @@
 #include <dns/types.h>
 
 #define DNS_REQUESTOPT_TCP 0x00000001U
+#define DNS_REQUESTOPT_CASE 0x00000002U
 
 typedef struct dns_requestevent {
        ISC_EVENT_COMMON(struct dns_requestevent);
@@ -175,6 +176,9 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
  *     #DNS_REQUESTOPT_TCP option is set, TCP will be used.  The request
  *     will timeout after 'timeout' seconds.
  *
+ *\li  If the #DNS_REQUESTOPT_CASE option is set, use case sensitive
+ *     compression.
+ *
  *\li  When the request completes, successfully, due to a timeout, or
  *     because it was canceled, a completion event will be sent to 'task'.
  *
@@ -227,6 +231,9 @@ dns_request_createvia3(dns_requestmgr_t *requestmgr, dns_message_t *message,
  *     will timeout after 'timeout' seconds.  UDP requests will be resent
  *     at 'udptimeout' intervals if non-zero or 'udpretries' is non-zero.
  *
+ *\li  If the #DNS_REQUESTOPT_CASE option is set, use case sensitive
+ *     compression.
+ *
  *\li  When the request completes, successfully, due to a timeout, or
  *     because it was canceled, a completion event will be sent to 'task'.
  *
index ba19154b15d3a551dc62ea25d8db83cbb6195efa..fbe5f3527b69430c16d3d12691172f1f09192339 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: request.c,v 1.85 2009/09/01 00:22:26 jinmei Exp $ */
+/* $Id: request.c,v 1.86 2010/03/04 05:24:56 marka Exp $ */
 
 /*! \file */
 
@@ -1059,6 +1059,9 @@ req_render(dns_message_t *message, isc_buffer_t **bufferp,
                return (result);
        cleanup_cctx = ISC_TRUE;
 
+       if ((options & DNS_REQUESTOPT_CASE) != 0)
+               dns_compress_setsensitive(&cctx, ISC_TRUE);
+
        /*
         * Render message.
         */