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

bugzilla at busybox.net bugzilla at busybox.net
Wed Nov 4 19:49:34 UTC 2009


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

           Summary: gethostbyname() fails if DNS server returns 30 addresses
           Product: uClibc
           Version: 0.9.30.1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Networking
        AssignedTo: unassigned at uclibc.org
        ReportedBy: lly.dev at gmail.com
                CC: uclibc-cvs at uclibc.org
   Estimated Hours: 0.0


Created an attachment (id=713)
 --> (https://bugs.busybox.net/attachment.cgi?id=713)
Proposed patch

I discover that an old 1468 issue
(http://lists.busybox.net/pipermail/uclibc-cvs/2007-August/024363.html) which
probably lost in bugzilla, was not fixed completely in commit
http://git.uclibc.org/uClibc/commit/?id=f09a1461fe8f3511750ad91f164b2769225858f5

In my case, DNS returned 30 records, which fits in 512 bytes buffer
successfully, but later can't be decoded in gethostbyname_r() - internal error
is ERANGE ("buffer too small for all addresses").

Sample ISP host used - unlim.is74.ru

Proposed patch increases static buffer in gethostbyname() up to required value
and saves 0.5k static buffer space in case of IPv6 turned on.


-- 
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