summaryrefslogtreecommitdiffstats
path: root/libc/inet
Commit message (Collapse)AuthorAgeFilesLines
* if both __NR_send and __NR_socketcall do not exist, fall back to __NR_sendto ↵Mike Frysinger2005-06-291-0/+12
| | | | (same goes for recv/recvfrom)
* ifdef out check which always failsMike Frysinger2005-06-291-0/+2
|
* The default static buffer sizes are too small to handle the 8 entries returnedEric Andersen2005-05-101-5/+5
| | | | | | | | | | | by 'nslookup www.yahoo.com' and 'nslookup mail.hotmail.com', and thus we currently return ERANGE when trying to lookup some of the most popular hosts on the planet. Whether these sites deserve to be popular is a question I'll leave for someone else to worry about. This change makes certain we have enough static buffer space to handle about 21 IPv4 IP address replies per DNS query. Far more than enough to handle common cases such as www.yahoo.com and mail.hotmail.com.
* Fix it so uClibc returns multiple ips via h_addr_list,Eric Andersen2005-04-281-66/+117
| | | | | | | | | | | | | | | | | | | | | | | | | This fix, based on this patch http://bugs.uclibc.org/view.php?id=104 makes it so uClibc fills out round robin dns lists for applications such as nslookup: Before: $ nslookup google.com Server: mace.codepoet.org Address: 10.10.10.1 Name: google.com Address: 216.239.39.99 After: $ nslookup google.com Server: mace.codepoet.org Address: 10.10.10.1 Name: google.com Addresses: 216.239.57.99, 216.239.37.99, 216.239.39.99
* Cleanup error case a bitEric Andersen2005-04-281-8/+8
|
* This might actually now be thread safe, assuming I havn't broken it.Eric Andersen2005-04-281-20/+27
|
* trim trailing whitespaceEric Andersen2005-04-281-26/+26
|
* x86_64 fixes: __NR_socketcall doesnt exist, nor does __NR_recv / __NR_send ↵Mike Frysinger2005-02-131-19/+21
| | | | ... so dont try using socketcall() unless the system call exists
* merge parallel build supportMike Frysinger2005-01-252-11/+8
|
* Jan Lana writes:Eric Andersen2005-01-111-11/+12
| | | | | | | | | | | | | | | | | | | | uClibc resolver doesn't lookup all search domains. For example, if you have computer 'jenda.prague.my.cz' and resolv.conf: search my.cz nameserver xx.xx.xx.xx try this: ping jenda.prague.my.cz #works ping jenda.prague #unknown host libc/inet/resolv.c doesn't want to try search domains if the domain name contains '.'. I don't find any reason for the behaviour in literature and it is inconsistent with the glibc. Patch is attached. regards, - jenda
* Document more things inet_aton() 'should' support but actually doesn't.Mike Frysinger2005-01-061-22/+38
| | | | | Most of the time, no one ever notices, so there's not point eh ? Also standardize tab usage.
* Revert Peter's __lib_gettimeofday patch. There's the minor issue ofManuel Novoa III2004-10-312-3/+3
| | | | | | adding cruft to include/sys/time.h. But also, there's no sense in making changes like this until we decide how we're going to approach the hidden symbol transition.
* Peter S. Mazinger writes:Eric Andersen2004-10-192-3/+3
| | | | | | | | | | | Hello! Would the attached patch be acceptable (maybe instead of __libc_gettimeofday using __gettimeofday) We have some issues, see http://bugs.gentoo.org/show_bug.cgi?id=65892
* Implement gethostent_rEric Andersen2004-09-071-15/+31
|
* Remove stale leftoversEric Andersen2004-09-071-9/+0
|
* Do not fail all lookups when /etc/resolv.conf is missing, as i.e.Eric Andersen2004-08-151-16/+7
| | | | | checking on 127.0.0.1 is still valid w/o resolv.conf -Erik
* req_search returned garbage. This teaches it to behave itself andEric Andersen2004-08-141-29/+38
| | | | | | return the length and the actual dns packet as received, rather than making stuff up. -Erik
* On Monday 02 August 2004 08:44 am, Mike Frysinger wrote:Manuel Novoa III2004-08-101-1/+16
| | | | | | | | | | | | | | | | | | | | > the gethostbyname_r() call itself is not segfaulting, but the memory > returned in the h_aliases array seems to be wrong ... was playing around with the source today and eventually the obvious answer hit me ... while read_etc_hosts_r() generatings an array of strings fo h_aliases and populates it, the dns path does not :) find attached a patch that'll actually generate the h_aliases list in the normal dns code path ... i used the etc_hosts_r() code as a template for some of it ... note that this is just a simple fix ... it fills the alias list with just the hostname gethostbyname_r was passed ... the proper fix i think would be to parse the dns packet down in __dns_lookup() and pass the info back via the resolv_answer struct ... but this fix is better than the current state of things ... that is, h_aliases currently is never initailized in the dns code path :)
* Stephen Hemminger from osdl dot org writes:Eric Andersen2004-06-121-0/+22
| | | | | | | | | | | | | | | | Rather than copy more code back into the bridge-utilities, how about applying this change to uClibc? I hate when packages get cluttered for workarounds for other incompatibilities. The problem is that SIOCGIFCONF only lists interfaces that have IP addresses, so it doesn't find the other interfaces that are being used for bridging. It could be fixed in the kernel to return all interfaces, but then something else might break; and still it mean a kernel update for the 2.4 users. The whole use of ifindex in the bridge API is a bad idea. But we probably have to live with it for compatibility. Patch against uClibc 0.9.26
* Joakim Tjernlund writes:Eric Andersen2004-05-141-1/+1
| | | | | | | | | | | Hi Erik It seems to me that __pthread_once and __pthread_initialize_minimal could be made WEAKs with no stub. The code in rpc_thread.c and __uClibc_main.c appears to expect this. Also, __pthread_return_0 __pthread_return_1 and __pthread_return_void can be static, not to pollute the name space. Jocke
* Add missing include.Manuel Novoa III2004-05-071-0/+1
|
* Change the global 'buf' to 'servbuf' since some functions in here useEric Andersen2004-05-071-7/+7
| | | | a local named 'buf' and we want to avoid shadowing that.
* Cope with gcc 3.4's more aggressive persuit of attribute unusedEric Andersen2004-04-201-1/+1
|
* Based on a patch from Alexandre Oliva, remove all reference to 'bzero' (whichEric Andersen2004-03-188-10/+10
| | | | | is not a SuSv3 symbol). Rather than using __bzero internally per Alexandre's original patch, use memset instead.
* Reduce memory used by static buffers and allocate that memory dynamiclyEric Andersen2004-03-183-10/+50
| | | | | | | | | | instead. Based on an initial patch from Tobias Anderberg, but reworked. I asked Tobias to look into doing something more like what is done in busybox, but that proved to be a pain. One possible concern is that these buffers will probably show up as memory leaks i.e. with valgrind. Perhaps we should add in an atexit call to free this memory right after we allocate it?
* Bug fix: gethostbyname2_r would fail if /etc/host was missing.Manuel Novoa III2004-03-101-21/+38
| | | | | Bug fix: gethostbyname_r checked errno without first setting it to a known value.
* Alexandre Oliva writes:Eric Andersen2004-02-187-10/+10
| | | | | | | | | | While testing the FR-V code with GCC mainline, I ran into some problems in the RPC code. It relies on a GCC extension that is no longer available, namely, the result of a cast is no longer considered an lvalue. This patch enables the code to compile. I haven't been able to test RPC though, especially in a multi-threaded environment.
* New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III2004-02-111-1/+2
| | | | | | | | Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
* Imre Sunyi writes:Eric Andersen2004-01-241-11/+16
| | | | | | | | | | | | | | | | | | | | | Hi Erik I have corrected a bug in uClibc/libc/inet/resolv.c in function __dns_lookup(). Have attaced a txt file with my diffs regarding to uClibc 0.9.26. If two nameservers are included in /etc/resolv.conf and the first one is wrong and the secondary is correct the algorithm never looked up the secondary one. Please review my diff and feel free to submit the patch onto your CVS. If reading manual page resolv.conf(5) under nameserver and how the algorithm should work the previous dns_lookup did not fully followed that. Regards Imre Sunyi
* s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/gEric Andersen2004-01-161-11/+11
|
* Implement res_search and res_querydomain based on netbsd code,Eric Andersen2004-01-041-5/+203
| | | | | | but remove support for host aliases (the HOSTALIASES env variable) which looks like a very bad idea. -Erik
* Fix a really dumb bug introduced in version 1.4 of this file (a patch for ipv6Eric Andersen2003-12-281-1/+3
| | | | | | | | | support) which could cause things like EOF and read errors while reading /etc/services to always return a TRY_AGAIN. The perl test suite would alloc a larger buffer and try again until all memory was exhausted. When we get a read error, or EOF, it means we didn't get what we wanted, and so we should return an error. Doing so fixes the failing perl 5.8.2 test. -Erik
* Fix whitespaceEric Andersen2003-12-281-5/+5
|
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-275-14/+14
| | | | | | | | | | | | | | | | were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
* Add function versions of ntohl and friendsEric Andersen2003-12-022-1/+68
|
* Avoid a potentially undefined operation with a veriable++ in a macroEric Andersen2003-12-021-2/+2
|
* We were failing to properly set h_errno on success, which couldEric Andersen2003-10-191-0/+3
| | | | | | | cause gethostbyaddr_r to keep looping allocating more and more memory each time till alloca finally caused a segfault. Ugh. This fixes that as well... -Erik
* Peter Kjellerstedt writes:Eric Andersen2003-10-182-2/+2
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
* Patch from Tony J. White:Eric Andersen2003-10-152-1/+313
| | | | | | I've created a patch for adding dn_expand() to uClibc 0.9.21. dn_expand() is used by at least ipsec-tools and also openldap I think.
* Atsushi Nemoto writes:Eric Andersen2003-10-084-17/+17
| | | | | | | | | | | | | I found inappropriate data types are used in some places in networking codes. * tcp_seq is 32bit (u_long -> u_int32_t) * in_addt_t should be used for internet address (unsigned long -> in_addr_t) * socklen_t should be used for accept() This is a patch against uclibc-0.9.21 (can be applied for current CVS). 64bit platforms (sizeof(int)!=sizeof(long)) will need this. I believe this patch does not harm any 32bit platforms.
* 15 retries is really rather excessive...Eric Andersen2003-09-011-1/+1
|
* Update inet_aton() to support an undocumented feature of inet_aton,Eric Andersen2003-08-041-7/+13
| | | | | | | | per UNIX Network Programming, Volume 1, second edition: An undocumented feature of inet_aton is that if addrptr is a null pointer, the function still performs it validation of the input string, but does not store the result.
* Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III2003-08-011-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
* Per a patch from Rob McMullen, add getprotoent_r, getprotobyname_r,Eric Andersen2003-06-271-20/+74
| | | | and getprotobynumber_r
* Patch from Ronald Wahl fixing an IPV6 specific problemEric Andersen2003-06-171-2/+2
| | | | with getaddrinfo().
* Patch from Jeffrey Damick:Eric Andersen2003-03-011-0/+2
| | | | | | | | With glibc if you do a res_init() that forces a reread of the nameservers file, but in uClibc the res_init will not force a reread if it has already read the file because then the nameservers value is greater than 0. So res_init must call close_nameservers() before calling open_nameservers().
* Eliminate a needless externEric Andersen2003-02-122-50/+41
|
* Per discussion with Nick Fedchik, restore original LGPLEric Andersen2003-01-301-12/+21
| | | | licensing to libc/inet/ether_addr.c
* Patch from Jay Kulpinski:Eric Andersen2003-01-101-0/+10
| | | | | | | __decode_dotted() does not count the null terminating byte of a hostname in the DNS response. This causes lookups to fail if the DNS response doesn't compress domain names in the message.
* Fix warningsEric Andersen2003-01-101-1/+2
|