2652. [bug] lwres_getipnodebyname() and lwres_getipnodebyaddr()
returned a misleading error code when lwresd was down. [RT #20028]
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2652. [bug] lwres_getipnodebyname() and lwres_getipnodebyaddr()
|
||||
returned a misleading error code when lwresd was
|
||||
down. [RT #20028]
|
||||
|
||||
2649. [bug] Set the domain for forward only zones. [RT #19944]
|
||||
|
||||
2648. [port] win32: isc_time_seconds() was broken. [RT #19900]
|
||||
|
||||
+17
-3
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: getipnode.c,v 1.42 2007/06/18 23:47:51 tbox Exp $ */
|
||||
/* $Id: getipnode.c,v 1.42.332.1 2009/08/15 03:11:13 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -285,7 +285,10 @@ lwres_getipnodebyname(const char *name, int af, int flags, int *error_num) {
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
tmp_err = HOST_NOT_FOUND;
|
||||
if (n == LWRES_R_NOTFOUND)
|
||||
tmp_err = HOST_NOT_FOUND;
|
||||
else
|
||||
tmp_err = NO_RECOVERY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,9 +440,15 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
|
||||
if (n != 0) {
|
||||
lwres_conf_clear(lwrctx);
|
||||
lwres_context_destroy(&lwrctx);
|
||||
*error_num = HOST_NOT_FOUND;
|
||||
|
||||
if (n == LWRES_R_NOTFOUND)
|
||||
*error_num = HOST_NOT_FOUND;
|
||||
else
|
||||
*error_num = NO_RECOVERY;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
he1 = hostfromaddr(by, AF_INET6, src);
|
||||
lwres_gnbaresponse_free(lwrctx, &by);
|
||||
if (he1 == NULL)
|
||||
@@ -836,6 +845,11 @@ copyandmerge(struct hostent *he1, struct hostent *he2, int af, int *error_num)
|
||||
int len = 0;
|
||||
char **cpp, **npp;
|
||||
|
||||
|
||||
/* If there is an unrecoverable error, the other steps are useless */
|
||||
if (*error_num == NO_RECOVERY)
|
||||
goto no_recovery;
|
||||
|
||||
/*
|
||||
* Work out array sizes.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user