It seems gethostbyname(3) fails if the answer returned is too big, for
example "chat.freenode.net" contains a lot of records that will easily
trigger this.

This was introduced as part of the asr libc resolver rewrite.

$ ping chat.freenode.net
ping: unknown host: chat.freenode.net
$ host chat.freenode.net | wc -l
        22
$ 

I've doubled the value for MAXALIASES/MAXADDRS, which is closer
to the original of 35 (..in the Attic)

ok?

Index: gethostnamadr_async.c
===================================================================
RCS file: /cvs/src/lib/libc/asr/gethostnamadr_async.c,v
retrieving revision 1.34
diff -u -p -u -r1.34 gethostnamadr_async.c
--- gethostnamadr_async.c       16 Jan 2015 16:48:51 -0000      1.34
+++ gethostnamadr_async.c       1 Mar 2015 22:52:17 -0000
@@ -41,8 +41,8 @@
 
 #include "asr_private.h"
 
-#define MAXALIASES     16
-#define MAXADDRS       16
+#define MAXALIASES     32
+#define MAXADDRS       32
 
 struct hostent_ext {
        struct hostent   h;

Reply via email to