]> git.ipfire.org Git - thirdparty/bind9.git/commit
shrunk cfgobj down to 48bytes
authorColin Vidal <colin@isc.org>
Fri, 7 Nov 2025 13:58:36 +0000 (14:58 +0100)
committerColin Vidal <colin@isc.org>
Fri, 5 Dec 2025 07:59:53 +0000 (08:59 +0100)
commit77e0104cf4e9cc77cd121d62d000cf3378d96c31
tree2ff38f3182d462acf9e3c142882a529416186819
parentb97991463e73bdcce07db2a1a756af9ca0a71554
shrunk cfgobj down to 48bytes

Make all non-scalar properties of `cfg_obj_t` allocated values, which
ensures the union size is the width of one pointer. Also reorder the
fields inside `cfg_obj_t` to avoid alignment padding that would increase
the size. As a result, a `cfg_obj_t` instance is now 48 bytes on a
64-bit platform.

Add a static assertion to avoid increasing the size of the struct by
mistake.

The function `parse_sockaddrsub` was taking advantage of the fact that
both sockaddr and sockaddrtls were in the same position, and used to
initialize the sockaddr field independently if this was a -tls one or
not. This doesn't work anymore now that all fields are allocated,
so it has been slightly rewritten to take both cases into account
separately.
bin/named/server.c
bin/plugins/synthrecord.c
bin/tests/system/hooks/driver/test-syncplugin.c
lib/isccfg/include/isccfg/grammar.h
lib/isccfg/namedconf.c
lib/isccfg/parser.c
tests/isccfg/parser_test.c