Commit Graph

447 Commits

Author SHA1 Message Date
Jeroen van Bemmel
7b6e99be77 Avoid duplicate DNS requests if answer is longer than a implementation
limit

        [BZ #14307]
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Increase the size of
        the temporary buffer used to invoke __gethostbyname2_r,
        __gethostbyaddr_r and gethostbyname4_r to make room for struct
        host_data / struct gaih_addrtuple.
        * resolv/nss_dns/dns-host.c (global scope): Move definition of
        implementation constants MAX_NR_ALIASES and MAX_NR_ADDRS to
        header file nss/nsswitch.h.
        * nss/nsswitch.h (global scope): Add definition of implementation
        constants MAX_NR_ALIASES and MAX_NR_ADDRS (moved from
        resolv/nss_dns/dns-host.c).
2012-07-12 11:31:48 +05:30
Siddhesh Poyarekar
6cd0a5eaf0 Merge copyright years in resolv/nss_dns/dns-host.c 2012-03-31 10:01:43 +05:30
Siddhesh Poyarekar
48c41d04ee Consider TTL of CNAME record and return minimum TTL in the chain
[BZ #13928] A DNS request consists of multiple resources combined into
a single hostent, including multiple CNAME records that may have been
assigned different TTL values. In such a case, nscd should take the
least TTL among all of the resources as the timeout for the hostent
before it is reloaded in its cache so that the hostent remains stale
in the database for the least amount of time.
2012-03-30 21:30:01 +05:30
Jeff Law
2f5a5ed02c * resolv/nss_dns/dns-host.c: Update copyright year. 2012-03-30 09:54:21 -06:00
Ulrich Drepper
966977f1b7 Better error handling for sendmmsg use in res_send 2012-03-30 08:38:58 -04:00
Ulrich Drepper
8e6d108343 Correct check for DNS request send success
This predates the sendmmsg use.  The two requests can use different
request sizes but the check for successful transfer always only used
buflen.
2012-03-30 08:27:11 -04:00
Ulrich Drepper
c030f70c87 Speed up DNS by avoiding a system call if possible 2012-03-30 07:42:29 -04:00
Jeff Law
86ae07a8c9 [BZ #13760]
* resolv/nss_dns/dns-host.c (gaih_getanswer): Look for errno
        in the right place. Discard and retry query if response is
        larger than input buffer size.
2012-03-28 10:09:29 -06:00
Paul Pluzhnikov
3ff4252677 2012-03-23 Daniel Jacobowitz <dmj@google.com>
Paul Pluzhnikov  <ppluzhnikov@google.com>

	[BZ #6528]
	* grp/Makefile (otherlibs): Don't set it.
	* inet/Makefile (otherlibs): Likewise.
	* login/Makefile (otherlibs): Likewise.
	* nscd/Makefile (otherlibs): Likewise.
	* posix/Makefile (otherlibs): Likewise.
	* pwd/Makefile (otherlibs): Likewise.
	* rt/Makefile (otherlibs): Likewise.
	* sunrpc/Makefile (otherlibs): Likewise.
	* nss/Makefile (otherlibs): Likewise.
	Add libnss_files to routines and static-only-routines.
	($(objpfx)getent): Remove rule.
	* resolv/Makefile: Add libnss_dns and libresolv to routines and
	static-only-routines.
2012-03-23 09:47:03 -07:00
Thomas Schwinge
82d86f2844 Fix struct timespec normalization (as used in many other places). 2012-03-08 11:49:43 +01:00
Ulrich Drepper
a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Jeff Law
8fdceb2efd [network] Avoid out ouf bounds read in __libc_res_nquerydomain
2012-02-28  Jeff Law  <law@redhat.com>

	* resolv/res_query.c (__libc_res_nquerydomain): Avoid
	out of bounds read.
2012-02-29 11:51:27 -05:00
Paul Eggert
59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper
a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper
0269750ca6 Remove non-ELF support 2012-01-07 20:30:26 -05:00
Ross Lagerwall
ad8ac1bd6a Open /etc/resolv.conf with FD_CLOEXEC 2011-12-17 14:43:40 -05:00
Ulrich Drepper
312be3f9f5 Clean up internal fopen uses
No need to ever not use c and e.
2011-11-15 04:24:42 -05:00
Ulrich Drepper
9694fc4479 Avoid unused warning in getaddrinfo_a 2011-11-12 02:30:01 -05:00
Joseph Myers
e057a1b593 Link libresolv.so with ld.so for __stack_chk_guard. 2011-09-21 13:27:50 -07:00
Ulrich Drepper
d063d16433 Remove support for !USE___THREAD 2011-09-10 16:50:28 -04:00
Ulrich Drepper
3ce1f29594 Cleanup of configuration options
Make several tool features mandatory and simplify the code.
2011-09-10 14:34:15 -04:00
Ulrich Drepper
44f0a71e58 Add rules to build libresolv with SSP flags 2011-08-17 21:36:23 -04:00
Andreas Schwab
9be9bfcc9d Properly tokenize nameserver line for servers with IPv6 address 2011-08-04 15:50:48 -04:00
Andreas Schwab
28b59fca7a Use size_t for strlen results 2011-07-20 11:40:37 -04:00
Andreas Jaeger
c75fa153a9 Fix warnings in resolver code 2011-07-06 22:29:45 -04:00
Ulrich Drepper
57912a71cc Fix typo in recent resolver change which causes segvs 2011-06-15 22:43:58 -04:00
Roland McGrath
5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Ulrich Drepper
4769ae77fc Handle DNS server failures in case of AF_UNSPEC lookups correctly 2011-05-30 22:48:47 -04:00
Ulrich Drepper
652ffab113 Make resolv.conf parsing more compact 2011-05-29 22:07:49 -04:00
Ulrich Drepper
16985fd0c7 Recognize use-vc option in resolv.conf 2011-05-29 21:43:33 -04:00
Ulrich Drepper
f87dfb1f11 Backport BIND code to query name as TLD. 2011-05-07 13:05:19 -04:00
Andreas Schwab
597df64714 Install rpc/netdb.h again 2011-05-06 07:46:42 -04:00
Andreas Schwab
4e34d5f589 Don't use removed rpc headers 2011-05-05 07:36:40 -04:00
Bruno Haible
e4ecafe004 Fix getnameinfo flags parameter type. 2011-05-01 21:36:43 -04:00
Andreas Schwab
a769081960 Don't ignore zero TTL in DNS answers 2010-11-25 20:50:16 -05:00
Ulrich Drepper
e66e7419a6 Actually make it possible to user the default name server. 2010-09-14 00:01:42 -07:00
Ulrich Drepper
df24a73ecd Missing server address again leads to localhost being used 2010-08-25 07:43:53 -07:00
Ulrich Drepper
ea42a20cae Fix crash on reloading of gai data in nscd. 2010-04-09 21:38:20 -07:00
Ulrich Drepper
4535680d03 Handle DNS timeouts in old-style lookkup code. 2010-04-05 12:21:20 -07:00
Ulrich Drepper
2cd9670885 Declare iruserok and iruserok_af. 2010-04-04 22:01:52 -07:00
Andreas Schwab
94308fd0e0 Fix debug statements in resolver 2010-03-17 06:57:38 -07:00
Yann Droneaud
a092b645f8 Fix DEBUG statements in resolv/res_send.c 2010-03-05 16:52:31 -08:00
Ulrich Drepper
ace4e23f8c Always use IPv4 sockets for IPv4 addresses. 2010-01-14 22:34:28 -08:00
Ulrich Drepper
52e2ea9a83 Relax visibility of some more declaration. 2010-01-14 13:22:06 -08:00
Ulrich Drepper
63ee841069 Relax condition for resolver constant definition. 2010-01-14 10:05:36 -08:00
Ulrich Drepper
505cf2c00a Fix up netdb.h for XPG7. 2010-01-12 16:43:00 -08:00
Andreas Schwab
51e4196f16 Handle running out of buffer space with IPv6 mapping enabled.
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.
2009-11-10 07:36:50 -08:00
Ulrich Drepper
75ded9bcdf Initialize local variable in resolver.
When the DNS server doesn't reply at all we possibly tested
an unitialized variable.
2009-10-29 23:01:58 -07:00
Petar Bogdanovic
3a85895fa3 Fix mixing IPv4 and IPv6 name server in resolv.conf. 2009-10-29 08:17:48 -07:00
Adam Tkac
2d0671cbbd Define and implement RES_USE_DNSSEC option in resolver. 2009-07-27 07:33:48 -07:00