]> git.ipfire.org Git - thirdparty/systemd.git/commit
nss-myhostname: keep IPv6 probe result stable 42934/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 8 Jul 2026 14:58:45 +0000 (15:58 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 11 Jul 2026 16:09:14 +0000 (17:09 +0100)
commit2d85bba6b9ddd20b74992c740fab7f82c9c03f01
treed582e30b6f4a9a31e4db46b83e5c3faff765603a
parent19c08f2dfa38e970fc95ad25258c9bfba7dbf7ad
nss-myhostname: keep IPv6 probe result stable

Cache the IPv6 enabled state while sizing and filling NSS result
buffers, so a transient sysctl read result cannot change the tuple or
address layout after the scratch buffer size has been computed. Also
zero-initialize gaih_addrtuple records before filling IPv4 addresses.

Follow-up for e8a7a315391a6a07897122725cd707f4e9ce63d7
src/nss-myhostname/nss-myhostname.c
src/test/test-nss-hosts.c