]> git.ipfire.org Git - thirdparty/glibc.git/commit
nscd: Do not rebuild getaddrinfo (bug 30709)
authorFlorian Weimer <fweimer@redhat.com>
Fri, 11 Aug 2023 08:10:16 +0000 (10:10 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 11 Aug 2023 08:10:16 +0000 (10:10 +0200)
commit039ff51ac7e02db1cfc0c23e38ac7bfbb00221d1
tree9b61ff729e18e085ea908cd6508a368ce9dcdabc
parent881546979d0219c18337e1b4f4d00cfacab13c40
nscd: Do not rebuild getaddrinfo (bug 30709)

The nscd daemon caches hosts data from NSS modules verbatim, without
filtering protocol families or sorting them (otherwise separate caches
would be needed for certain ai_flags combinations).  The cache
implementation is complete separate from the getaddrinfo code.  This
means that rebuilding getaddrinfo is not needed.  The only function
actually used is __bump_nl_timestamp from check_pf.c, and this change
moves it into nscd/connections.c.

Tested on x86_64-linux-gnu with -fexceptions, built with
build-many-glibcs.py.  I also backported this patch into a distribution
that still supports nscd and verified manually that caching still works.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
include/ifaddrs.h
inet/check_pf.c
nscd/Makefile
nscd/connections.c
nscd/gai.c [deleted file]
sysdeps/unix/sysv/linux/check_pf.c