Comment 7 for bug 1665394

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

It is likely to be an upstream problem. Given a zone with A/AAAA records with enough addresses, I can reproduce the problem.

Hacking in systemd source code, I could find those STR:
 - disable "resolve" in nsswitch.conf
 - add a resolution against a record with a lot of addresses in src/libsystemd/sd-resolve/test-resolve.c
 - build test-resolve tool
 - run ./test-resolve

e.g.:
> r = sd_resolve_getaddrinfo(resolve, &q2, "test.neteffmon.eu", NULL, &hints, getaddrinfo_handler, NULL);

Running this results in:
> Assertion '*length <= maxlength' failed at src/libsystemd/sd-resolve/sd-resolve.c:203, function serialize_addrinfo(). Aborting.

Changing BUFSIZE in src/libsystemd/sd-resolve/sd-resolve.c to something bigger (e.g. 65536U), rebuild and restart ./test-resolve, the resolution succeeds.