resolv: Introduce struct resolv_context [BZ #21668]
commit352f4ff9a268b81ef5d4b2413f582565806e4790
authorFlorian Weimer <fweimer@redhat.com>
Fri, 30 Jun 2017 19:10:23 +0000 (30 21:10 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 3 Jul 2017 18:52:59 +0000 (3 20:52 +0200)
treefb27056dfdeafe43c021f6127c9544c016e78019
parent4e45d83c92dbb5b8dc20654f32395108d18cf739
resolv: Introduce struct resolv_context [BZ #21668]

struct resolv_context objects provide a temporary resolver context
which does not change during a name lookup operation.  Only when the
outmost context is created, the stub resolver configuration is
verified to be current (at present, only against previous res_init
calls).  Subsequent attempts to obtain the context will reuse the
result of the initial verification operation.

struct resolv_context can also be extended in the future to store
data which needs to be deallocated during thread cancellation.
24 files changed:
ChangeLog
include/resolv.h
nscd/aicache.c
nss/digits_dots.c
nss/getXXbyYY.c
nss/getXXbyYY_r.c
nss/getnssent_r.c
nss/nsswitch.h
resolv/Makefile
resolv/Versions
resolv/compat-gethnamaddr.c
resolv/nss_dns/dns-canon.c
resolv/nss_dns/dns-host.c
resolv/nss_dns/dns-network.c
resolv/res-close.c
resolv/res_libc.c
resolv/res_mkquery.c
resolv/res_query.c
resolv/res_send.c
resolv/res_use_inet6.h [new file with mode: 0644]
resolv/resolv-internal.h
resolv/resolv_context.c [new file with mode: 0644]
resolv/resolv_context.h [new file with mode: 0644]
sysdeps/posix/getaddrinfo.c