summaryrefslogtreecommitdiff
path: root/libc/inet
AgeCommit message (Collapse)Author
2008-02-07Added AI_NUMERICSERV flag and check if the string is not just a numberCarmelo Amoroso
when AI_NUMERICSERV flag set. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
2008-01-11Use poll() rather than select() if the former is available to wait inPeter Kjellerstedt
__dns_lookup(). This avoids segmentation faults when more than 1024 file descriptors are used by an application.
2008-01-09Daniel Jacobowitz writes:Mike Frysinger
MontaVista noticed that when their kernels were configured to trap on unaligned access gethostbyname_r could mysteriously crash. I tracked this down to an unaligned buffer being passed to gethostbyname_r from some other part of uClibc (afraid I don't remember where from any more). We have to pad the beginning of the buffer to a pointer alignment before we store pointers in it.
2007-09-28This patch will fix a problem when the same host is defined with both IPv4 andMike Frysinger
IPv6 entries in /etc/hosts. Previous only the first of these host would work, as uClibc would read the /etc/hosts file from top to bottom, failing if the first hit did not match the IP type. Now uClibc will continue reading, even if the first correct entry name, but wrong IP type fails. Thus, allowing a second correct entry name with correct IP type will result in a name resolve. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
2007-09-28do not check the pointer before freeing it since free(NULL) works just fineMike Frysinger
2007-09-28cleanup code styleMike Frysinger
2007-09-15switch to a smaller/more robust implementation by Andrey Simonenko and as ↵Mike Frysinger
suggested by Natanael Copa harvested from: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/92880
2007-07-30make regex_old.c, ruserpass.c use __uc_malloc,Denis Vlasenko
replace "buf = malloc(BUFSIZ); if (!buf) abort();" by __uc_malloc elsewhere. With last 7 patches together uclibc has 3k of static data total with fairly big .config and with 2k being used for 2 x BUFSIZ stdio buffer: text data bss dec hex filename 114 132 2048 2294 8f6 _stdio.o (ex lib/libc.a) total data 593 total bss 3062
2007-07-30make getnetent.c, md5.c use __uc_mallocDenis Vlasenko
2007-07-30patch #3: make resolv.c use __uc_mallocDenis Vlasenko
2007-04-23- include stdbool.hBernhard Reutner-Fischer
2007-04-18Bugfix from Atsushi Nemoto: return nonzero error code on failure Rob Landley
(without which busybox ping segfaults on error). Broken during locking changes in in svn 16801.
2007-04-17- shrink resolver codeBernhard Reutner-Fischer
2007-03-28Warning fix for uninitialized variable, by Al Stone.Rob Landley
2007-02-08do not use ghbn_buf after it goes out of scopeEric Andersen
2007-02-04the sun rpc code has too many alias violations to worry over now; just ↵Mike Frysinger
disable strict-aliasing until someone gets the balls to clean this stuff up
2007-02-02Ronald Maeder writes:Eric Andersen
I have successfully made gethostbyname_r(), res_init(), and gethostid() fully reentrant. In addition, I have added a NULL check to inet_aton(). This is where SEG FAULTs were coming from when gethostbyname_r() was called.
2007-02-02use the correct lock for access to __nameserver[]Eric Andersen
2007-02-02fix lock namingEric Andersen
2007-02-02Ronald Maeder writes:Eric Andersen
Hi Erik, Thanks for all your great work. I found a set of bugs in resolv.c . Basically, there is code that looks like: BIGLOCK; __nameserversXX=__nameservers; __nameserverXX=__nameserver; BIGUNLOCK; i = __dns_lookup(dname, type, __nameserversXX, __nameserverXX, &packet, &a); which is a problem because the declarations are int __nameservers; char * __nameserver[MAX_SERVERS]; int __searchdomains; char * __searchdomain[MAX_SEARCH]; so you can see that __nameserver is a pointer. Copying the pointer to __nameserverXX doesn't protect the global variable space. I have attached a patch and the new file. I hope you will incorporate these bug fixes. I spent quite a bit of time tracking them down. Many thanks, Ron
2007-02-02fix obvious bug in ipv4/ipv6 resolving. When not using AF_INET,Eric Andersen
gethostbyname2_r tries to resolve an ipv6 address from /etc/hosts using get_hosts_byname_r, but with AF_INET instead of the supplied address family. This returns ipv4 addresses marked as ipv6 ones. Fix from nbd.
2007-01-29sync some fixes from glibcMike Frysinger
2007-01-10need to keep __check_rhosts_file exported for proper rhost controlMike Frysinger
2006-12-08__resolv_lock is supposed to be shared, not static Eric Andersen
2006-12-07Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen
things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
2006-12-07Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen
things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
2006-08-24fix from psm: only define __ASSUME_NETLINK_SUPPORT if not definedMike Frysinger
2006-07-31fix h_alias handling in gethostbyaddr_r() just like in gethostbyname_r()Mike Frysinger
otherwise we get messed up alias memory and this simple test case will segfault: python -c 'import socket; print socket.gethostbyaddr("80.68.88.204")[2];' see bug report in blackfin tracker for more info: http://blackfin.uclinux.org/tracker/index.php?func=detail&aid=1503&group_id=17&atid=141
2006-07-05fixup my copyright notice, trim stale remnants of older notices whichEric Andersen
I had clearly run search/replace on that were cluttering things up.
2006-07-05update licenseMike Frysinger
2006-06-20need hidden proto for rtime() as wellMike Frysinger
2006-06-19sync fix fixes from glibcMike Frysinger
2006-06-19dont shadow the socket() functionMike Frysinger
2006-03-24Move hidden xdr_rmtcall_args prototype before first usePeter S. Mazinger
2006-03-23Mark some functions as BSD onlyPeter S. Mazinger
2006-03-23select needs sys/select.h, str[n]casecmp/ffs needs strings.h, if BSD is not ↵Peter S. Mazinger
defined, gettimeofday has other prototype and tm_gmtoff/tm_zone do not exist
2006-03-22Correct build if UCLIBC_HAS_CTYPE_TABLES is not definedPeter S. Mazinger
2006-03-22Mark some functions as GNU, provide missing hidden memmem, remove ↵Peter S. Mazinger
_ISOC99/XOPEN_SOURCE
2006-03-10Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, ↵Peter S. Mazinger
most of global data relocations are back
2006-03-09Get rid of nested extern warnings if threads are disabledPeter S. Mazinger
2006-03-09Add back sjhill's 14625 commit, correcting the typo that made it failPeter S. Mazinger
2006-03-01Update copyrightPeter S. Mazinger
2006-03-01Remove duplicate includePeter S. Mazinger
2006-02-25Remove commented include."Steven J. Hill"
2006-02-25Revert change. Calls can only be used when utilizing TLS. Sorry for the ↵"Steven J. Hill"
breakage.
2006-02-25Use the TSD macros and get rid of warnings."Steven J. Hill"
2006-02-18tweak the idea between having a MMU and actually using itMike Frysinger
2006-02-15hide xdr_u_shortPeter S. Mazinger
2006-02-15DOMULTI may be used for libc, the excluded files need work, ↵Peter S. Mazinger
linuxthreads[_db] as well, don't try on slow box
2006-02-13libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger
libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore