summaryrefslogtreecommitdiffstats
path: root/lib/libc/resolv
Commit message (Collapse)AuthorAgeFilesLines
* Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" withngie2015-12-155-5/+15
| | | | | | | | lib/libc/resolv by conditionalizing its definition MFC after: 3 days Reviewed by: ume, vangyzen Differential Revision: https://reviews.freebsd.org/D4519
* resolver: preserve binary compatibility; reduce header pollutionvangyzen2015-12-143-20/+29
| | | | | | | | | | | | | | In r289315, I added new fields to res_state. This broke binary backward compatibility. It also broke some ports (and possibly other code) by requiring the definition of time_t and struct timespec. Fix these problems by moving the new fields into __res_state_ext. Suggested by: ume Reviewed by: ume MFC after: 3 days Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D4472
* resolver: abuse _res a little lessvangyzen2015-10-231-39/+52
| | | | | | | | | | | | | | | | | In the past, _res was a global variable. Now, it's multiple function calls. Several functions in the resolver use _res multiple times and therefore call the function(s) far more than necessary. Fix those callers to store the result of _res in a local variable. Add __noinline to the definition of res_init() to avoid the code bloat that these changes would have otherwise incurred. Thanks to jilles for noticing this. Reviewed by: jilles MFC after: 1 week Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3887
* resolver: automatically reload /etc/resolv.confvangyzen2015-10-142-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html Reviewed by: kp, wblock Discussed with: jilles, imp, alfred MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3867
* Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-224-21/+9
|
* Add declarations to eliminate -Wmissing-prototypes warningsrodrigc2015-09-201-0/+3
|
* Add support for '_' occurring at the beginning or end of a nameume2015-06-101-3/+3
| | | | | | | | component. PR: 176093 Submitted by: landonf__at__bikemonkey.org MFC after: 1 week
* Update our stub resolver to final version of libbind.ume2014-08-1213-120/+208
| | | | Obtained from: ISC
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}marcel2014-03-041-2/+2
| | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc.
* libc/resolv: Use poll() instead of kqueue().jilles2014-01-141-2/+2
| | | | | | | | The resolver in libc creates a kqueue for watching a single file descriptor. This can be done using poll() which should be lighter on the kernel and reduce possible problems with rlimits (file descriptors, kqueues). Reviewed by: jhb
* libc: Make resolver sockets close-on-exec (SOCK_CLOEXEC).jilles2013-09-061-2/+3
| | | | | Although the resolver's sockets are exposed to applications via res_state, I do not expect them to pass the sockets across execve().
* libc: Make various internal file descriptors from fopen() close-on-exec.jilles2013-08-232-2/+2
|
* Remove meaningless self-assignment in res_send.c, otherwise clang willdim2011-12-151-2/+0
| | | | | | | | warn about it. I guess this was originally done to silence a bogus warning by an older version of gcc, but I could not reproduce it with any version of gcc that I have access to. MFC after: 1 week
* Add an option to enforce strict RFC 1034 compliance.delphij2009-05-291-0/+4
| | | | PR: kern/129477
* Merge the resolver part of BIND 9.4.3 into HEAD.ume2008-12-144-24/+139
| | | | | | | | | | It includes the following fix: 2426. [bug] libbind: inet_net_pton() can sometimes return the wrong value if excessively large netmasks are supplied. [RT #18512] Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>
* Allow underscore in domain names while resolving. While having underscoredelphij2008-02-161-1/+2
| | | | | | | | | | is a violation of RFC 1034 [STD 13], it is accepted by certain name servers as well as other popular operating systems' resolver library. Bugs are mine. Obtained from: ume MFC after: 2 weeks
* Merge BIND 9.4.2 into main chunk.ume2007-12-032-18/+25
|
* Merge BIND 9.4.1 into main chunk.ume2007-06-0311-241/+265
| | | | MFC after: 2 weeks
* This commit was generated by cvs2svn to compensate for changes in r170242,ume2007-06-032-0/+3
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import of BIND 9.4.1ume2007-06-0313-242/+269
| |
| * Vendor import of BIND 9.3.3ume2006-12-153-17/+12
| |
| * Import of BIND 9.3.3rc2ume2006-10-241-7/+7
| |
* | Use C comments since we now preprocess these files with CPP.deischen2007-04-291-4/+4
| |
* | __p_rcode_syms is declared as external in resolv.conf, so it cannot bekan2007-04-062-1/+2
| | | | | | | | | | | | | | | | | | | | redeclared as static in res_debug.c. Make __p_rcode_syms global and add it to Symbol map. The rest of __p_??_syms are already global. Choice of FBSD_1.0 version for these debug symbols seems strange and should be revisited before symbol versioning is enabled for libc.so.7.
* | Only reject file descriptors higher than FD_SETSIZE if we are not usingjhb2007-03-051-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | poll(2) or kqueue(2). Previously we rejected fd's higher than FD_SETSIZE for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2). However, the check for poll(2) wasn't really needed. open(2) and socket(2) won't return an fd you can't pass to either poll(2) or kevent(2). This fixes a but where gethostbyname() would fail if you had more than 1023 files open in a process. MFC after: 1 week Reviewed by: ume Found by: ps
* | Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-097-28/+0
| | | | | | | | | | | | clause. # If I've done so improperly on a file, please let me know.
* | Merge BIND9 9.3.3 into main chunk.ume2006-12-153-17/+12
| | | | | | | | | | Obtained from: ISC MFC after: 1 week
* | Merge res_send.c of BIND9 9.3.3rc2 into main chunk. It includesume2006-10-241-6/+7
| | | | | | | | | | | | | | | | | | | | following fix: Retransmission timeouts should be based on which attempt it is to the nameserver and not the nameserver itself. Obtained from: ISC MFC after: 3 days
* | Check if the filedes of kevent is expected one. Though ourume2006-08-041-0/+4
| | | | | | | | | | | | | | | | | | old resolver opened just one socket, BIND9's resolver may open more than one sockets. And, BIND9's resolver doesn't close the socket on timeout. So, we need this check. Reported by: freebsd-cvs-src__at__oldach.net (Helge Oldach), bz Hinted by: rwatson
* | _close() should be called instead of close() here.ume2006-08-041-2/+6
| |
* | Nuke some compatibility crufts of resolver for 6.X and earlier.ume2006-05-213-15/+0
| | | | | | | | X-MFC after: never
* | Upgrade res_update(3) and the friends to BIND9's one excluding TSIGume2006-05-215-7/+60
| | | | | | | | | | | | support. X-MFC after: never
* | This commit was generated by cvs2svn to compensate for changes in r158782,ume2006-05-213-0/+2089
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import of BIND 9.3.2ume2006-05-213-0/+2089
| |
| * Oops, remove the file I imported into wrong place.ume2006-03-211-47/+0
| |
* | Don't test if RES_INIT is set to see res_state structure isume2006-04-081-1/+1
| | | | | | | | | | initialized. Some application may reset RES_INIT. Use the way in __res_vinit(), instead.
* | Expose res_update and friends again. At least, ports/mail/spamilterume2006-03-302-6/+2
| | | | | | | | | | | | | | | | | | uses them. Now, we have res_nupdate and res_nmkupdate as well, but they are still based on our old resolver for binary backward compatibility. So, they don't provide new features such as TSIG support. Reported by: pointyhat via kris
* | Add __collate_load_error and __collate_range_cmp to the list ofdeischen2006-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | FBSDprivate locale symbols. These functions are needed by libcompat. Add _cleanup to the list of stdio FBSDprivate symbols. Some third party applications use this. This will be removed and replaced by fcloseall() once libc version is bumped. Add _res to the list of resolv symbols. Found by: portbuilder runs (thanks Kris!)
* | When res_nquerydomain() returns SERVFAIL, we should try next domain.ume2006-03-241-4/+17
| |
* | It's not enough to provide symbol map files; you also have to add themdes2006-03-231-0/+2
| | | | | | | | | | | | to ${SYM_MAPS}. This unbreaks world with SYMVER_ENABLED. Pointy hat to: ume
* | - Merge our local changes.ume2006-03-2113-57/+578
| | | | | | | | - Exclude unnecessary functions for us.
* | This commit was generated by cvs2svn to compensate for changes in r156954,ume2006-03-211-47/+0
|/ | | | which included commits to RCS files with non-trunk default branches.
* Vendor import of BIND 9.3.2ume2006-03-2112-0/+4648
OpenPOWER on IntegriCloud