glibc/nscd
Fabian Vogt 2b3d020055 nscd: Fix netlink cache invalidation if epoll is used [BZ #29415]
Processes cache network interface information such as whether IPv4 or IPv6
are enabled. This is only checked again if the "netlink timestamp" provided
by nscd changed, which is triggered by netlink socket activity.

However, in the epoll handler for the netlink socket, it was missed to
assign the new timestamp to the nscd database. The handler for plain poll
did that properly, copy that over.

This bug caused that e.g. processes which started before network
configuration got unusuable addresses from getaddrinfo, like IPv6 only even
though only IPv4 is available:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1041

It's a bit hard to reproduce, so I verified this by checking the timestamp
on calls to __check_pf manually. Without this patch it's stuck at 1, now
it's increasing on network changes as expected.

Signed-off-by: Fabian Vogt <fvogt@suse.de>
(cherry picked from commit 02ca25fef2)
2022-09-06 17:17:35 +02:00
..
aicache.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
cache.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
cachedumper.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
connections.c nscd: Fix netlink cache invalidation if epoll is used [BZ #29415] 2022-09-06 17:17:35 +02:00
dbg_log.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dbg_log.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Depend hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
gai.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getgrgid_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getgrnam_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gethstbyad_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gethstbynm3_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getpwnam_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getpwuid_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getsrvbynm_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getsrvbypt_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
grpcache.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hstcache.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
initgrcache.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mem.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
netgroupcache.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nscd_conf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_getai.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_getgr_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_gethst_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_getpw_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_getserv_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_helper.c Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
nscd_initgroups.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_netgroup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_proto.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_setup_thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd_stat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd-client.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
nscd.conf nscd: Improve nscd.conf comments. 2019-08-19 09:57:58 -04:00
nscd.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nscd.init
nscd.service
nscd.tmpfiles
pwdcache.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
res_hconf.c
selinux.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
selinux.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
servicescache.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00