]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-manager.c
resolved: rework how we handle truncation in the stub resolver 6988/head
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Oct 2017 10:35:48 +0000 (12:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Oct 2017 10:22:43 +0000 (12:22 +0200)
commit51027656951988babd4724def5d934e4817fdd1f
tree7fd87c0a020f1359124f1d54e0c73efc268cedec
parent9886b6b13cfe4348f9bd2ab62bb1d821fdac7ab7
resolved: rework how we handle truncation in the stub resolver

When we a reply message gets longer than the client supports we need to
truncate the response and set the TC bit, and we already do that.
However, we are not supposed to send incomplete RRs in that case, but
instead truncate right at a record boundary. Do that.

This fixes the "Message parser reports malformed message packet."
warning the venerable "host" tool outputs when a very large response is
requested.

See: #6520
src/resolve/resolve-tool.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-packet.h
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-stream.c
src/resolve/resolved-dns-stub.c
src/resolve/resolved-manager.c
src/resolve/test-dns-packet.c
src/resolve/test-resolved-packet.c