summaryrefslogtreecommitdiffstats
path: root/libc/inet/resolv.c
Commit message (Collapse)AuthorAgeFilesLines
...
* close bug 473:Denis Vlasenko2008-06-031-33/+39
| | | | | | | 1. names with two consecutive dots are not valid 2. if name ends with a dot, dont try appending search domain(s) alos a few small optimisations are here.
* - adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer2008-06-031-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
* libc/inet/resolv.c: use ip6.arpa instead of ip6.int for reverseDenis Vlasenko2008-06-021-87/+88
| | | | | | | IPv6 DNS resolv. rfc4159 mandated this 3 years ago. Closes bug 1020. Also cleans up some stype inconsistensied and saves 2 bytes of rw data.
* Fix build failure due to missing 'smallint' definitionCarmelo Amoroso2008-05-271-1/+0
| | | | | | by adding <unistd.h> header file. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - remove old-style definitions. No object-code changes.Bernhard Reutner-Fischer2008-05-201-11/+5
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-191-12/+12
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* add hidden_proto's for __uc_mallocDenis Vlasenko2008-02-121-0/+1
| | | | | (patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
* Use poll() rather than select() if the former is available to wait inPeter Kjellerstedt2008-01-111-0/+26
| | | | | __dns_lookup(). This avoids segmentation faults when more than 1024 file descriptors are used by an application.
* Daniel Jacobowitz writes:Mike Frysinger2008-01-091-0/+26
| | | | | | | | 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.
* This patch will fix a problem when the same host is defined with both IPv4 andMike Frysinger2007-09-281-2/+8
| | | | | | | | | | | | 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>
* do not check the pointer before freeing it since free(NULL) works just fineMike Frysinger2007-09-281-8/+4
|
* cleanup code styleMike Frysinger2007-09-281-323/+301
|
* patch #3: make resolv.c use __uc_mallocDenis Vlasenko2007-07-301-12/+29
|
* - include stdbool.hBernhard Reutner-Fischer2007-04-231-0/+1
|
* - shrink resolver codeBernhard Reutner-Fischer2007-04-171-73/+76
|
* Warning fix for uninitialized variable, by Al Stone.Rob Landley2007-03-281-0/+1
|
* Ronald Maeder writes:Eric Andersen2007-02-021-10/+36
| | | | | | 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.
* use the correct lock for access to __nameserver[]Eric Andersen2007-02-021-9/+9
|
* fix lock namingEric Andersen2007-02-021-6/+6
|
* Ronald Maeder writes:Eric Andersen2007-02-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix obvious bug in ipv4/ipv6 resolving. When not using AF_INET,Eric Andersen2007-02-021-1/+1
| | | | | | 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.
* __resolv_lock is supposed to be shared, not static Eric Andersen2006-12-081-2/+2
|
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-071-321/+314
| | | | | | | 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.
* fix h_alias handling in gethostbyaddr_r() just like in gethostbyname_r()Mike Frysinger2006-07-311-0/+11
| | | | | | | | | 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
* select needs sys/select.h, str[n]casecmp/ffs needs strings.h, if BSD is not ↵Peter S. Mazinger2006-03-231-0/+1
| | | | defined, gettimeofday has other prototype and tm_gmtoff/tm_zone do not exist
* Correct build if UCLIBC_HAS_CTYPE_TABLES is not definedPeter S. Mazinger2006-03-221-1/+1
|
* Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, ↵Peter S. Mazinger2006-03-101-2/+0
| | | | most of global data relocations are back
* global data uses libc_hidden_data_def, convert all -I hope- and add some newPeter S. Mazinger2006-02-011-0/+2
|
* Get rid of missing prototype warningsPeter S. Mazinger2006-01-261-2/+10
|
* Last relocs jump and global data, (even locales) that I could remove are ↵Peter S. Mazinger2006-01-161-0/+5
| | | | gone from libc. The remaining are left as exercise for others ;-)
* some global data relocs gonePeter S. Mazinger2006-01-161-0/+1
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-1/+1
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-163/+152
| | | | missing headers, other jump relocs removed
* hide internal symbolsMike Frysinger2006-01-081-4/+4
|
* Convert some users and get rid of __rpc_thread_createerr jump reloc, this ↵Peter S. Mazinger2005-12-161-9/+17
| | | | was indeed a badly chosen name
* Implement hidden poll, switch user to hidden *printf/*scanf/pollPeter S. Mazinger2005-12-091-3/+4
|
* mmap/mremap/socket/rewind gonePeter S. Mazinger2005-12-081-2/+4
|
* Convert the rest of users to hiddenPeter S. Mazinger2005-12-081-0/+1
|
* Again rpc ;-( , all *inet*, *addr*Peter S. Mazinger2005-12-081-0/+5
|
* Hide morePeter S. Mazinger2005-12-071-14/+47
|
* Make use internal str*casecmp/wcscollPeter S. Mazinger2005-12-061-1/+1
|
* macro out the thread funcs in libc if threading is disabledMike Frysinger2005-12-061-12/+8
|
* Rename newly created __libc_x (reserved for libpthread overwrites) w/ ↵Peter S. Mazinger2005-12-031-12/+12
| | | | x_internal, do not use cascading aliases
* More hiding, including __mempcpyPeter S. Mazinger2005-12-031-0/+1
|
* Hide mostly used functionsPeter S. Mazinger2005-12-011-51/+50
|
* Hiding againPeter S. Mazinger2005-11-291-2/+9
|
* Hide some of mem* and str*Peter S. Mazinger2005-11-271-0/+5
|
* 100 JUMP relocs less (remaining 431) by hiding internally used onesPeter S. Mazinger2005-11-261-13/+16
|
* Some more hidden internalsPeter S. Mazinger2005-11-261-30/+30
|
* Better solution to duplicate locking definesPeter S. Mazinger2005-10-201-21/+15
|