309485 |
03-Dec-2016 |
ngie |
MFC r297790: r297790 (by pfg):
libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly drop some malloc() casts.
Found with devel/coccinelle. |
301920 |
15-Jun-2016 |
truckman |
MFC r301592
Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails.
If the ai->ai_addrlen <= minsiz test fails, then freeaddrinfo() does not get called to free the memory just allocated by getaddrinfo(). Fix by moving ai->ai_addrlen <= minsiz to a separate nested if block, and keep freeaddrinfo() in the outer block so that freeaddrinfo() will be called whenever getaddrinfo() succeeds.
Reported by: Coverity CID: 1273652 Reviewed by: ume Differential Revision: https://reviews.freebsd.org/D6756 |
300286 |
20-May-2016 |
truckman |
MFC r299879, r299880
r299879 | truckman | 2016-05-15 18:30:32 -0700 (Sun, 15 May 2016) | 7 lines
Likely a false positive ... but make sure that -1 can't be used as an array index by splitting up a test.
r299880 | truckman | 2016-05-15 18:38:24 -0700 (Sun, 15 May 2016) | 8 lines
Since rdata is only used as an argument to the immediately following call to res_nopt_rdata(), revert r299879 and fix CID 603941 by moving rdata = &buf[n]; inside the if block.
Reported by: Coverity CID: 603941 |
292462 |
19-Dec-2015 |
vangyzen |
MFC r289315, r292216
resolver: automatically reload /etc/resolv.conf
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.
Relnotes: yes Sponsored by: Dell Inc. |
292461 |
19-Dec-2015 |
vangyzen |
MFC r289837
resolver: abuse _res a little less
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.
Sponsored by: Dell Inc. |
292430 |
18-Dec-2015 |
ngie |
MFC r292250:
Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with lib/libc/resolv by conditionalizing its definition
Reviewed by: ume, vangyzen Differential Revision: https://reviews.freebsd.org/D4519 |
284559 |
18-Jun-2015 |
ume |
MFC r284229: Add support for '_' occurring at the beginning or end of a name component.
PR: 176093 Submitted by: landonf__at__bikemonkey.org |
270838 |
30-Aug-2014 |
ume |
MFC r269867: Update our stub resolver to final version of libbind (libbind-6.0).
Obtained from: ISC |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
255336 |
06-Sep-2013 |
jilles |
libc: Make resolver sockets close-on-exec (SOCK_CLOEXEC).
Although the resolver's sockets are exposed to applications via res_state, I do not expect them to pass the sockets across execve().
|
254700 |
23-Aug-2013 |
jilles |
libc: Make various internal file descriptors from fopen() close-on-exec.
|
228537 |
15-Dec-2011 |
dim |
Remove meaningless self-assignment in res_send.c, otherwise clang will 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
|
193023 |
29-May-2009 |
delphij |
Add an option to enforce strict RFC 1034 compliance.
PR: kern/129477
|
186090 |
14-Dec-2008 |
ume |
Merge the resolver part of BIND 9.4.3 into HEAD. 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>
|
176325 |
16-Feb-2008 |
delphij |
Allow underscore in domain names while resolving. While having underscore 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
|
174226 |
03-Dec-2007 |
ume |
Merge BIND 9.4.2 into main chunk.
|
170244 |
03-Jun-2007 |
ume |
Merge BIND 9.4.1 into main chunk.
MFC after: 2 weeks
|
170243 |
03-Jun-2007 |
ume |
This commit was generated by cvs2svn to compensate for changes in r170242, which included commits to RCS files with non-trunk default branches.
|
169092 |
29-Apr-2007 |
deischen |
Use C comments since we now preprocess these files with CPP.
|
168441 |
06-Apr-2007 |
kan |
__p_rcode_syms is declared as external in resolv.conf, so it cannot be 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.
|
167246 |
05-Mar-2007 |
jhb |
Only reject file descriptors higher than FD_SETSIZE if we are not using 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
|
165903 |
09-Jan-2007 |
imp |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
165258 |
15-Dec-2006 |
ume |
Merge BIND9 9.3.3 into main chunk.
Obtained from: ISC MFC after: 1 week
|
163661 |
24-Oct-2006 |
ume |
Merge res_send.c of BIND9 9.3.3rc2 into main chunk. It includes 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
|
160967 |
04-Aug-2006 |
ume |
Check if the filedes of kevent is expected one. Though our 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
|
160965 |
04-Aug-2006 |
ume |
_close() should be called instead of close() here.
|
158792 |
21-May-2006 |
ume |
Nuke some compatibility crufts of resolver for 6.X and earlier.
X-MFC after: never
|
158787 |
21-May-2006 |
ume |
Upgrade res_update(3) and the friends to BIND9's one excluding TSIG support.
X-MFC after: never
|
158783 |
21-May-2006 |
ume |
This commit was generated by cvs2svn to compensate for changes in r158782, which included commits to RCS files with non-trunk default branches.
|
157594 |
08-Apr-2006 |
ume |
Don't test if RES_INIT is set to see res_state structure is initialized. Some application may reset RES_INIT. Use the way in __res_vinit(), instead.
|
157308 |
30-Mar-2006 |
ume |
Expose res_update and friends again. At least, ports/mail/spamilter 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
|
157282 |
30-Mar-2006 |
deischen |
Add __collate_load_error and __collate_range_cmp to the list of 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!)
|
157093 |
24-Mar-2006 |
ume |
When res_nquerydomain() returns SERVFAIL, we should try next domain.
|
157049 |
23-Mar-2006 |
des |
It's not enough to provide symbol map files; you also have to add them to ${SYM_MAPS}. This unbreaks world with SYMVER_ENABLED.
Pointy hat to: ume
|
156956 |
21-Mar-2006 |
ume |
- Merge our local changes. - Exclude unnecessary functions for us.
|
156955 |
21-Mar-2006 |
ume |
This commit was generated by cvs2svn to compensate for changes in r156954, which included commits to RCS files with non-trunk default branches.
|
156953 |
21-Mar-2006 |
ume |
This commit was generated by cvs2svn to compensate for changes in r156952, which included commits to RCS files with non-trunk default branches.
|