702. [func] If the address 0.0.0.0 is seen in resolv.conf,

use 127.0.0.1 instead. [RT #693]
This commit is contained in:
Brian Wellington
2001-01-23 00:41:55 +00:00
parent b151cb7dfa
commit ea6709ec8a
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -1,4 +1,7 @@
702. [func] If the address 0.0.0.0 is seen in resolv.conf,
use 127.0.0.1 instead. [RT #693]
701. [func] Root hints are now fully optional. Class IN
views use compiled-in hints by default, as
before. Non-IN views with no root hints now
+5 -1
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwconfig.c,v 1.26 2001/01/09 21:59:24 bwelling Exp $ */
/* $Id: lwconfig.c,v 1.27 2001/01/23 00:41:55 bwelling Exp $ */
/***
*** Module for parsing resolv.conf files.
@@ -439,6 +439,10 @@ lwres_create_addr(const char *buffer, lwres_addr_t *addr) {
unsigned int len;
if (lwres_net_pton(AF_INET, buffer, &addrbuff) == 1) {
unsigned char zeroaddress[] = {0, 0, 0, 0};
unsigned char loopaddress[] = {127, 0, 0, 1};
if (memcmp(addrbuff, zeroaddress, 4) == 0)
memcpy(addrbuff, loopaddress, 4);
addr->family = LWRES_ADDRTYPE_V4;
addr->length = NS_INADDRSZ;
len = 4;