Home | History | Annotate | Download | only in resolv
History log of /src/lib/libc/resolv/res_private.h
RevisionDateAuthorComments
 1.5  23-Jan-2024  christos fix nested extern warnings
 1.4  30-Sep-2021  christos kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.
 1.3  24-Oct-2009  christos branches: 1.3.48;
expose res_check.
 1.2  24-Oct-2009  christos Add a knote to keep track when resolv.conf gets changed and re-initialize.
While here fix a memory leak when calling res_vinit with an already inited
res_state.
 1.1  20-May-2004  christos branches: 1.1.1;
Initial revision
 1.1.1.4  12-Apr-2009  christos libc portion of libbind from external/bsd/libbind
 1.1.1.3  30-Mar-2007  ghen branches: 1.1.1.3.18; 1.1.1.3.22; 1.1.1.3.24; 1.1.1.3.28;
Import bind 9.4.0.
 1.1.1.2  27-Jan-2007  christos import resolver portion of bind-9.4.0-rc2
 1.1.1.1  20-May-2004  christos branches: 1.1.1.1.10; 1.1.1.1.12;
Import libc portion of the resolver from bind9
 1.1.1.3.28.1  09-Jan-2011  riz Apply patches (requested by spz in ticket #1517):

Update bind to 9.7.2-P3.
 1.1.1.3.24.1  10-Jan-2011  riz Apply patches (requested by spz in ticket #1517):

Update bind to 9.7.2-P3.
 1.1.1.3.22.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.1.1.3.18.1  06-Jan-2011  riz Apply patches (requested by spz in ticket #1517):

Update bind to 9.7.2-P3.
 1.1.1.1.12.1  03-Jun-2007  wrstuden Catch up with now-somewhat-dated netbsd-4. These changes took longer
than expected for me to actually get around to merging.
 1.1.1.1.10.2  17-May-2007  jdc Add missing BIND 9.4.x include file and library changes (requested by
tron in ticket #662).
 1.1.1.1.10.1  17-May-2007  jdc Update BIND to version 9.4.1 (requested by christos in ticket #602).
Thanks to tron for the patches, upgrade script and testing.
 1.3.48.1  05-Oct-2021  martin Pull up following revision(s) (requested by christos in ticket #1356):

lib/libc/resolv/res_init.c: revision 1.32
lib/libc/resolv/res_private.h: revision 1.4

kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.

An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.

RSS XML Feed