[Bug 691] gethostbyname() fails if DNS server returns 30 addresses

bugzilla at busybox.net bugzilla at busybox.net
Wed Mar 17 12:21:25 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=691





--- Comment #2 from Bernhard Reutner-Fischer <aldot at uclibc.org>  2010-03-17 12:21:24 UTC ---
Created an attachment (id=1309)
 --> (https://bugs.busybox.net/attachment.cgi?id=1309)
smallish example

works fine on current master.

$ ./xgcc.sh -DNAME2 -Os -o gethostbyname2 gethostbyname.c 
$ ./gethostbyname2 unlim.is74.ru
name   : unlim.is74.ru
fam    : 2
addrlen: 4
addr   : 78.29.3.115
addr   : 78.29.3.116
addr   : 78.29.3.117
addr   : 78.29.3.118
addr   : 78.29.3.119
addr   : 78.29.3.122
addr   : 78.29.3.124
addr   : 78.29.3.3
addr   : 78.29.3.4
addr   : 78.29.3.7
addr   : 78.29.3.9
addr   : 78.29.3.10
addr   : 78.29.3.11
addr   : 78.29.3.12
addr   : 78.29.3.13
addr   : 78.29.3.14
addr   : 78.29.3.16
addr   : 78.29.3.18
addr   : 78.29.3.19
addr   : 78.29.3.21
addr   : 78.29.3.27
addr   : 78.29.3.33
addr   : 78.29.3.35
addr   : 78.29.3.37
addr   : 78.29.3.41
addr   : 78.29.3.42
addr   : 78.29.3.44
addr   : 78.29.3.45
addr   : 78.29.3.46
addr   : 78.29.3.47
total 30 addresses
aliases: unlim.is74.ru
$ ./xgcc.sh -Os -o gethostbyname gethostbyname.c 
/tmp/ccY6ZTg9.o: In function `main':
gethostbyname.c:(.text+0x4c): warning: gethostbyname_r is obsolescent, use
getnameinfo() instead.
$ ./gethostbyname unlim.is74.ru
name   : unlim.is74.ru
fam    : 2
addrlen: 4
addr   : 78.29.3.110
addr   : 78.29.3.115
addr   : 78.29.3.116
addr   : 78.29.3.117
addr   : 78.29.3.118
addr   : 78.29.3.119
addr   : 78.29.3.122
addr   : 78.29.3.124
addr   : 78.29.3.3
addr   : 78.29.3.4
addr   : 78.29.3.7
addr   : 78.29.3.9
addr   : 78.29.3.10
addr   : 78.29.3.11
addr   : 78.29.3.12
addr   : 78.29.3.13
addr   : 78.29.3.14
addr   : 78.29.3.16
addr   : 78.29.3.18
addr   : 78.29.3.19
addr   : 78.29.3.21
addr   : 78.29.3.27
addr   : 78.29.3.33
addr   : 78.29.3.35
addr   : 78.29.3.37
addr   : 78.29.3.41
addr   : 78.29.3.42
addr   : 78.29.3.44
addr   : 78.29.3.45
addr   : 78.29.3.46
total 30 addresses
aliases: unlim.is74.ru


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list