about summary refs log tree commit diff
path: root/resolv
Commit message (Collapse)AuthorAgeFilesLines
* Always use IPv4 sockets for IPv4 addresses.Ulrich Drepper2010-01-141-35/+9
|
* Relax visibility of some more declaration.Ulrich Drepper2010-01-141-2/+2
|
* Relax condition for resolver constant definition.Ulrich Drepper2010-01-141-6/+6
|
* Fix up netdb.h for XPG7.Ulrich Drepper2010-01-121-1/+3
|
* Handle running out of buffer space with IPv6 mapping enabled.Andreas Schwab2009-11-102-9/+9
| | | | | | With big DNS answers like the one you get for goodtimesdot.com you can get a truncated address list if IPv6 mapping is enabled. Instead tell the caller to resize the buffer.
* Initialize local variable in resolver.Ulrich Drepper2009-10-291-1/+2
| | | | | When the DNS server doesn't reply at all we possibly tested an unitialized variable.
* Fix mixing IPv4 and IPv6 name server in resolv.conf.Petar Bogdanovic2009-10-291-26/+26
|
* Define and implement RES_USE_DNSSEC option in resolver.Adam Tkac2009-07-274-5/+16
|
* Handle SERVFAIL, NOTIMP, REFUSED replies from DNS server better.Ulrich Drepper2009-07-261-5/+1
| | | | | When doing IPv4+6 lookups we have to pass up the error record from send_dg.
* Handle overly large answer buffers in resolver.Ulrich Drepper2009-07-161-1/+1
| | | | | | In EDNS0 records the maximum result size is transmitted in a 16 bit value. Large buffer sizes were handled incorrectly by using only the low 16 bits. Fix this by limiting the size to 0xffff.
* Implement second fallback mode for DNS requests.Ulrich Drepper2009-06-263-19/+54
| | | | | | | | | | | | There is some more shardware/software out there which has problems if two DNS requests are sent using the same tuple (source addr, source port, dest addr, dest port) This can range from firewalls to load balancers. Some of the vendors already fixed it in response to this problem. Still, we need a way to make glibc work with broken environments. The single-request-reopen flag can be used or we fall back automatically to this mode.
* Remember we switched to single-request mode.Ulrich Drepper2009-06-111-1/+2
| | | | | This change prevents repetition in most later calls of the resolver in case the DNS server or the network connection is broken.
* Remove redundant .gitignore files.Andreas Schwab2009-05-161-6/+0
|
* rename each .cvsignore file to .gitignoreJim Meyering2009-05-151-0/+0
|
* [BZ #10128]Ulrich Drepper2009-05-091-0/+7
| | | | | | | 2009-05-05 Aurelien Jarno <aurelien@aurel32.net> [BZ #10128] * resolv/res_query.c (__libc_res_nquery): If one query returns NOTIMP or FORMERR and the other NOERROR, don't raise an error.
* (send_dg): Don't just ignore the result we got in case we only receive one ↵Ulrich Drepper2009-04-161-6/+10
| | | | reply in single-request mode.
* * resolv/res_send.c (send_dg): Don't switch into single-requestUlrich Drepper2009-04-161-1/+3
| | | | mode if we already are in it.
* * malloc/malloc.c (_int_realloc): Add parameter with old blockUlrich Drepper2009-04-081-1/+1
| | | | | | size. Remove duplicated test. Don't handle mmap'ed blocks here. Adjust all callers. * malloc/hooks.c (realloc_check): Adjust _int_realloc call.
* * resolv/res_hconf.c (_res_hconf_trim_domain): Use strcasecmpUlrich Drepper2009-04-072-3/+3
| | | | | instead of __strcasecmp. * resolv/nss_dns/dns-host.c (getanswer_r): Likewise.
* * resolv/resolv.h (RES_SNGLKUP): Define. cvs/fedora-glibc-20090407T0545Ulrich Drepper2009-04-073-11/+30
| | | | | | | * resolv/res_init.c (res_setoptions): Recognize single-request option. * resolv/res_send.c (send_dg): If we sent two requests at once and only get one reply before timeout switch to mode where we send the second request only after the first answer has been received.
* * stdlib/monetary.h: Uglify function parameter names. cvs/fedora-glibc-20090218T1534Jakub Jelinek2009-02-163-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sunrpc/rpc/pmap_clnt.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/xdr.h: Likewise. * sunrpc/rpc/clnt.h: Likewise. * resolv/netdb.h: Likewise. * resolv/arpa/nameser.h: Likewise. * resolv/resolv.h: Likewise. * argp/argp.h: Likewise. * locale/langinfo.h: Likewise. * io/sys/stat.h: Likewise. * posix/spawn.h: Likewise. * nis/rpcsvc/nislib.h: Likewise. * malloc/obstack.h: Likewise. * sysdeps/ia64/bits/link.h: Likewise. * sysdeps/i386/bits/link.h: Likewise. * sysdeps/s390/bits/link.h: Likewise. * sysdeps/powerpc/bits/link.h: Likewise. * sysdeps/x86_64/bits/link.h: Likewise. * sysdeps/sparc/bits/link.h: Likewise. * sysdeps/sh/bits/link.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise. * sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise. 2009-02-16 Jakub Jelinek <jakub@redhat.com> * stdlib/monetary.h: Uglify function parameter names. * sunrpc/rpc/pmap_clnt.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/xdr.h: Likewise. * sunrpc/rpc/clnt.h: Likewise. * resolv/netdb.h: Likewise. * resolv/arpa/nameser.h: Likewise. * resolv/resolv.h: Likewise. * argp/argp.h: Likewise. * locale/langinfo.h: Likewise. * io/sys/stat.h: Likewise. * posix/spawn.h: Likewise. * nis/rpcsvc/nislib.h: Likewise. * malloc/obstack.h: Likewise. * sysdeps/ia64/bits/link.h: Likewise. * sysdeps/i386/bits/link.h: Likewise. * sysdeps/s390/bits/link.h: Likewise. * sysdeps/powerpc/bits/link.h: Likewise. * sysdeps/x86_64/bits/link.h: Likewise. * sysdeps/sparc/bits/link.h: Likewise. * sysdeps/sh/bits/link.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise. * sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise.
* [BZ #9781]Ulrich Drepper2009-02-071-3/+2
| | | | | * grp/compat-initgroups.c (compat_call): Switch to use malloc when the input line is too long.
* * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr2_r): Check andUlrich Drepper2009-01-081-1/+14
| | | | adjust the buffer alignment.
* * resolv/res_init.c (__res_vinit): Count all servers in statp->nscount.Ulrich Drepper2008-12-291-1/+1
|
* * resolv/res_send.c (send_dg): Use correct guards for SOCK_CLOEXECUlrich Drepper2008-12-081-3/+3
| | | | | | | use. * sysdeps/unix/sysv/linux/kernel-features.h: Fix typo in accept4 handling.
* * resolv/res_init.c (__res_vinit): Always assign to statp->nscountUlrich Drepper2008-12-081-2/+1
| | | | after reading name server list.
* * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): RecognizeUlrich Drepper2008-12-032-5/+17
| | | | | | | | | ESRCH return value. (_nss_dns_gethostbyname4_r): Likewise. * resolv/res_init.c (__res_vinit): Initialize nscount to zero. * sysdeps/posix/getaddrinfo.c (gaih_inet): In case we use gethostbyname4_r, we don't have a separate IPv6 status, so copy the no_data variable.
* * resolv/res_init.c (__res_vinit): Fill in IPv4 name serverUlrich Drepper2008-12-031-3/+3
| | | | information at the correct index.
* * resolv/res_send.c (send_dg): Create sockets with non-blockingUlrich Drepper2008-12-021-11/+47
| | | | flag already set.
* (gaih_getanswer_slice): Don't abort for unknown request types for now.Ulrich Drepper2008-11-121-0/+7
|
* [BZ #6942]Ulrich Drepper2008-10-311-1/+9
| | | | | | | 2008-10-07 Andreas Schwab <schwab@suse.de> [BZ #6942] * resolv/res_send.c (send_vc): Fix last change. (send_dg): Align here as well.
* * grp/initgroups.c (internal_getgrouplist): Don't prematurelyUlrich Drepper2008-10-301-1/+1
| | | | abort if there is no initgroups_dyn function.
* * resolv/res_send.c (send_dg): On timeout, only return nonzeroUlrich Drepper2008-10-301-1/+1
| | | | result if any of the queries really provided an answer.
* Fix tests for existence of second reply.Ulrich Drepper2008-10-241-3/+3
|
* * resolv/res_query.c (__libc_res_nquery): Add a few casts.Ulrich Drepper2008-10-241-4/+4
|
* (send_vc): Fix use of unaligned address. Properly handle partial reads.Ulrich Drepper2008-10-061-3/+11
|
* (res_nmkquery): Call ns_name_compress directly instead of going through dn_comp.Ulrich Drepper2008-08-121-2/+7
|
* * Versions.def: Add GLIBC_2.9 to libresolv.Ulrich Drepper2008-08-0114-565/+1034
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/resolv.h: Remove hidden proto declarations for __ns_* functions. Add them for __dn_count_labels and __p_secstodate. * include/arpa/nameser.h: Add a number of hidden proto declarations. Define ns_msg_getflags macro here. * resolv/res_debug.c: Add hidden definition for __dn_count_labels and __p_secstodate. * resolv/Versions: Export functions from <arpa/nameser.h> from libresolv in version GLIBC_2.9. * resolv/ns_name.c: Integrate changes from bind 9.5.0. Add necessary hidden definitions. * resolv/ns_netint.c: Likewise. * resolv/ns_parse.c: Likewise. * resolv/ns_print.c: Likewise. * resolv/ns_samedomain.c: Likewise. * resolv/ns_ttl.c: Likewise. * resolv/arpa/nameser_compat.h: Likewise. * resolv/arpa/nameser.h: Likewise. Remove macros which redirect function calls. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Use __ns_get16 instead of ns_get16. * resolv/nss_dns/dns-host.c (getanswer_r): Use __ns_get16 and __ns_get32 instead of ns_get16 and ns_get32 respectively. (gaih_getanswer_slice): Likewise. * resolv/Makefile (libresolv-routines): Add ns_date. * resolv/ns_date.c: New file.
* * resolv/res_send.c (__libc_res_nsend): Take additional parameter. cvs/fedora-glibc-20080728T2320Ulrich Drepper2008-07-286-68/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use it instead of locally defined resplen2 variable. (res_nsend): Adjust for __libc_res_nsend interface change. (send_vc): Initialize *resplen2 if necessary. Read length of package into an appropriately aligned variable. Store converted length in new variable and use it appropriately. Add branch prediction help. * resolv/res_query.c (__libc_res_nquery): Take additional parameter and pass it on to __libc_res_nsend. Adjust all callers. (__libc_res_nsearch): Likewise. (__libc_res_nqeurydomain): Likewise. * resolv/nss_dns/dns-host.c: Adjust for __libc_res_nsearch interface change. (_nss_dns_gethostbyname4): Don't unconditionally allocate tmp array. Define resplen2 variable and pass it to __libc_res_nsearch and then to gaih_getanswer. (getanswer_r): In case of incorrect DNS data don't overread buffer. Add branch prediction. (gaih_getanswer_slice): Likewise. Check for invalid data types. (gaih_getanswer): Don't decode second slice if first one failed due to a too small buffer. Don't let not found status of second decoder shadow results of the first. * resolv/gethnamaddr.c (gethostbyname2): Adjust for __libc_res_nsearch and __libc_res_nquery interface changes (gethostbyaddr): Adjust for __libc_res_nquery interface change. * include/resolv.h: Adjust prototypes for __libc_res_nquery, __libc_res_nsearch, and __libc_res_nsend. * resolv/nss_dns/dns-canon.c: Adjust for __libc_res_nquery interface change. * resolv/nss_dns/dns-network.c: Adjust for __libc_res_nquery and __libc_res_nsearch interface changes.
* * resolv/res_send.c: Remove unnecessary res_pquery prototype.Ulrich Drepper2008-07-091-1/+0
|
* * resolv/res_query.c (__libc_res_nquery): Issue debug message onlyUlrich Drepper2008-07-091-2/+4
| | | | if DEBUG is defined.
* * resolv/res_query.c (__libc_res_nquery): Align buffer for T_AAAAUlrich Drepper2008-07-091-4/+20
| | | | query. Adjust buffer size computation for padding.
* * resolv/res_debig.c (__p_type_syms): Add ns_t_dname entry.Ulrich Drepper2008-06-271-0/+1
| | | | Patch by Peter Jones <pjones@redhat.com>.
* * resolv/nss_dns/dns-host.c (gaih_getanswer): Don'tUlrich Drepper2008-06-131-9/+11
| | | | unconditionally use second gaih_getanswer_slice result.
* * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Also log andUlrich Drepper2008-06-101-2/+3
| | | | | ignore T_DNAME messages. * resolv/arpa/nameser_compat.h (T_DNAME): Define.
* (T_DNAME): Define.Ulrich Drepper2008-06-101-2/+3
|
* * resolv/res_send.c (send_dg): If we already have one of twoUlrich Drepper2008-05-241-6/+24
| | | | | answers and the server reports SERVFAI, NOTIMP, or REFUSED, then use the one answer insted of failing.
* * resolv/res_query.c (__libc_res_nquery): In case one of twoUlrich Drepper2008-05-192-0/+22
| | | | | | | | answer was too short don't try to read that answer's header. * resolv/res_send.c (send_dg): In case of timeout and there are two queries and one has been answered, return value indicating success.
* * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): If there areUlrich Drepper2008-05-171-5/+11
| | | | | | | | no answers return NSS_STATUS_NOTFOUND. (gaih_getanswer): Don't call gaih_getanswer_slice if the answer buffer does not have any content. * nscd/servicescache.c: Likewise.
* * include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsendUlrich Drepper2008-05-107-133/+693
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prototypes. * include/arpa/nameser_compat.h: Define T_UNSPEC. * nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r. (libnss_nisplus): Export _nss_nisplus_gethostbyname4_r. * nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_nis_gethostbyname4_r): New function. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Change to also handle af==AF_UNSPEC. (get_tablename): New function. Use it to avoid duplication. (_nss_nisplus_gethostbyname4_r): New function. * nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is available. * nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r. * nss/nss.h: Define struct gaih_addrtuple. * nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_files_gethostbyname4_r): New function. * resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r. * resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery calls. * resolv/res_query.c (__libc_res_nquery): Take two additional parameters for second answer buffer. Handle type=T_UNSPEC to mean look up IPv4 and IPv6. Change all callers. * resolv/res_send.c (__libc_res_nsend): Take five aditional parameters for an additional query and answer buffer. Pass to send_vc and send_dg. (send_vc): Send possibly two requests and receive two answers. (send_dg): Likewise. * resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and __libc_res_nquery. (_nss_dns_gethostbyname4_r): New function. (gaih_getanswer_slice): Likewise. (gaih_getanswer): Likewise. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust __libc_res_nquery call. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise. (_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call. * sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is available.