History log of /freebsd-11.0-release/lib/libc/resolv/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


301592 08-Jun-2016 truckman

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
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6756


299880 16-May-2016 truckman

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


299879 16-May-2016 truckman

Likely a false positive ... but make sure that -1 can't be used as an
array index by splitting up a test.

Reported by: Coverity
CID: 603941
MFC after: 1 week


298830 30-Apr-2016 pfg

libc: spelling fixes.

Mostly on comments.


298226 18-Apr-2016 avos

libc: do not include <sys/types.h> where <sys/param.h> was already included

According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).


298120 16-Apr-2016 pfg

libc: make some more use of the nitems() macro.

We have an nitems() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Given that it is available already without adding additional
headers and other parts of libc already use it, extend a bit
more its use.


297790 10-Apr-2016 pfg

libc: replace 0 with NULL for pointers.

While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by: bde (previous version - all new bugs are mine)


292250 15-Dec-2015 ngie

Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition

MFC after: 3 days
Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519


292216 14-Dec-2015 vangyzen

resolver: preserve binary compatibility; reduce header pollution

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


289837 23-Oct-2015 vangyzen

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.

Reviewed by: jilles
MFC after: 1 week
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3887


289315 14-Oct-2015 vangyzen

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.

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


288114 22-Sep-2015 rodrigc

Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.


288018 20-Sep-2015 rodrigc

Add declarations to eliminate -Wmissing-prototypes warnings


284229 10-Jun-2015 ume

Add support for '_' occurring at the beginning or end of a name
component.

PR: 176093
Submitted by: landonf__at__bikemonkey.org
MFC after: 1 week


269867 12-Aug-2014 ume

Update our stub resolver to final version of libbind.

Obtained from: ISC


262722 04-Mar-2014 marcel

Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
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.


260652 14-Jan-2014 jilles

libc/resolv: Use poll() instead of kqueue().

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


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.