summaryrefslogtreecommitdiffstats
path: root/libc/inet/resolv.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Change in_addr_t inet_aton to int, glibc has it as int and uClibc uses it in ↵Peter S. Mazinger2005-10-201-11/+11
| | | | addr.c also as int. Rename mylock/LOCK/UNLOCK in resolv.c to allow IMA compiling
* 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
|
* 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
* Implement gethostent_rEric Andersen2004-09-071-15/+31
|