A new user interface for you! Read more...

File glibc-nameserver-localhost.diff of Package glibc.openSUSE_11.3

2009-11-20  Petr Baudis <pasky@suse.cz>

	[BZ #10851]
	* resolv/res_init.c (__res_vinit): Initialize nscount again to
	one so that the default localhost nameserver record is used.

diff --git a/resolv/res_init.c b/resolv/res_init.c
index 40dbe7d..99ef8cf 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -183,7 +183,7 @@ __res_vinit(res_state statp, int preinit) {
 #endif
 	statp->nsaddr.sin_family = AF_INET;
 	statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
-	statp->nscount = 0;
+	statp->nscount = 1;
 	statp->ndots = 1;
 	statp->pfcode = 0;
 	statp->_vcsock = -1;
@@ -420,7 +420,8 @@ __res_vinit(res_state statp, int preinit) {
 		    continue;
 		}
 	    }
-	    statp->nscount = nservall;
+	    if (nservall > 0)
+	      statp->nscount = nservall;
 #ifdef _LIBC
 	    if (nservall - nserv > 0) {
 		statp->_u._ext.nscount6 = nservall - nserv;