]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
back out changes 2661 & 2662
authorEvan Hunt <each@isc.org>
Tue, 1 Sep 2009 07:18:54 +0000 (07:18 +0000)
committerEvan Hunt <each@isc.org>
Tue, 1 Sep 2009 07:18:54 +0000 (07:18 +0000)
CHANGES
lib/lwres/context.c
lib/lwres/getipnode.c

diff --git a/CHANGES b/CHANGES
index c9511e4484f59b969036a534201ce18bef0028a4..1b9d21a26112677475645e2a16d43a82ea5a7fd0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,3 @@
-2662.  [bug]           lwres_getipnodebyname() and lwres_getipnodebyaddr() 
-                       returned a misleading error code when lwresd was
-                       down. [RT #20028]
-
-2661.  [bug]           Check whether socket fd exceeds FD_SETSIZE when
-                       creating lwres context. [RT #20029]
-
-
        --- 9.4.4b1 released ---
 
 2649.  [bug]           Set the domain for forward only zones. [RT #19944]
index edb929a3c7809d6c308ecc334b9aa3f9b918f9b5..96ee7a649388d243e1b50e996bb504e016d1e237 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: context.c,v 1.45.18.10 2009/09/01 06:55:10 each Exp $ */
+/* $Id: context.c,v 1.45.18.11 2009/09/01 07:18:54 each Exp $ */
 
 /*! \file context.c
    lwres_context_create() creates a #lwres_context_t structure for use in
@@ -471,17 +471,6 @@ lwres_context_sendrecv(lwres_context_t *ctx,
        result = lwres_context_send(ctx, sendbase, sendlen);
        if (result != LWRES_R_SUCCESS)
                return (result);
-       
-       /*
-        * If this is not checked, select() can overflow,
-        * causing corruption elsewhere.
-        */
-       if (ctx->sock >= FD_SETSIZE) {
-               close(ctx->sock);
-               ctx->sock = -1;
-               return (LWRES_R_IOERROR);
-       }
-
  again:
        FD_ZERO(&readfds);
        FD_SET(ctx->sock, &readfds);
index 8b4f12fb6af3f916c772c87f5c9ea743e86c9ec4..de9043f2bfc149d404ab8f071bb52e5268367646 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: getipnode.c,v 1.37.18.8 2009/09/01 06:55:10 each Exp $ */
+/* $Id: getipnode.c,v 1.37.18.9 2009/09/01 07:18:54 each Exp $ */
 
 /*! \file */
 
@@ -202,7 +202,7 @@ lwres_getipnodebyname(const char *name, int af, int flags, int *error_num) {
        struct in6_addr in6;
        struct hostent he, *he1 = NULL, *he2 = NULL, *he3 = NULL;
        int v4 = 0, v6 = 0;
-       int tmp_err = 0;
+       int tmp_err;
        lwres_context_t *lwrctx = NULL;
        lwres_gabnresponse_t *by = NULL;
        int n;
@@ -275,6 +275,7 @@ lwres_getipnodebyname(const char *name, int af, int flags, int *error_num) {
        (void) lwres_conf_parse(lwrctx, lwres_resolv_conf);
        tmp_err = NO_RECOVERY;
        if (have_v6 && af == AF_INET6) {
+
                n = lwres_getaddrsbyname(lwrctx, name, LWRES_ADDRTYPE_V6, &by);
                if (n == 0) {
                        he1 = hostfromname(by, AF_INET6);
@@ -284,12 +285,7 @@ lwres_getipnodebyname(const char *name, int af, int flags, int *error_num) {
                                goto cleanup;
                        }
                } else {
-                       if (n == LWRES_R_NOTFOUND)
-                               tmp_err = HOST_NOT_FOUND;
-                       else {
-                               *error_num = NO_RECOVERY;
-                               goto cleanup;
-                       }
+                       tmp_err = HOST_NOT_FOUND;
                }
        }
 
@@ -315,7 +311,7 @@ lwres_getipnodebyname(const char *name, int af, int flags, int *error_num) {
        } else
                *error_num = tmp_err;
 
-        he3 = copyandmerge(he1, he2, af, error_num);
+       he3 = copyandmerge(he1, he2, af, error_num);
 
  cleanup:
        if (he1 != NULL)
@@ -441,15 +437,9 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
        if (n != 0) {
                lwres_conf_clear(lwrctx);
                lwres_context_destroy(&lwrctx);
-
-               if (n == LWRES_R_NOTFOUND)
-                      *error_num = HOST_NOT_FOUND;
-               else
-                      *error_num = NO_RECOVERY;
-
+               *error_num = HOST_NOT_FOUND;
                return (NULL);
        }
-
        he1 = hostfromaddr(by, AF_INET6, src);
        lwres_gnbaresponse_free(lwrctx, &by);
        if (he1 == NULL)