# HG changeset patch # User Matt Johnston # Date 1109585716 0 # Node ID 3e49d8d180054ca3d653143453cac085150a497f # Parent 8e68dbe8687bb1e469edb942e288dddc2f18aca9 * respect DO_HOST_LOOKUP config option diff -r 8e68dbe8687b -r 3e49d8d18005 dbutil.c --- a/dbutil.c Wed Jan 19 11:41:04 2005 +0000 +++ b/dbutil.c Mon Feb 28 10:15:16 2005 +0000 @@ -397,6 +397,11 @@ char sbuf[NI_MAXSERV]; int ret; unsigned int len; +#ifdef DO_HOST_LOOKUP + const int flags = NI_NUMERICSERV; +#else + const int flags = NI_NUMERICHOST | NI_NUMERICSERV; +#endif len = sizeof(struct sockaddr_storage); /* Some platforms such as Solaris 8 require that len is the length @@ -410,8 +415,9 @@ } #endif + ret = getnameinfo((struct sockaddr*)addr, len, hbuf, sizeof(hbuf), - sbuf, sizeof(sbuf), NI_NUMERICSERV); + sbuf, sizeof(sbuf), flags); if (ret != 0) { /* On some systems (Darwin does it) we get EINTR from getnameinfo diff -r 8e68dbe8687b -r 3e49d8d18005 options.h --- a/options.h Wed Jan 19 11:41:04 2005 +0000 +++ b/options.h Mon Feb 28 10:15:16 2005 +0000 @@ -96,9 +96,7 @@ * if the random number source isn't good. In general this isn't required */ /* #define DSS_PROTOK */ -/* Whether to do reverse DNS lookups. This is advisable, though will add - * code size with gethostbyname() etc, so for very small environments where - * you are statically linking, you might want to undefine this */ +/* Whether to do reverse DNS lookups. */ #define DO_HOST_LOOKUP /* Whether to print the message of the day (MOTD). This doesn't add much code