]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: announce support for large UDP packets 2043/head
authorTom Gundersen <teg@jklm.no>
Mon, 6 Jul 2015 14:48:24 +0000 (16:48 +0200)
committerTom Gundersen <teg@jklm.no>
Fri, 27 Nov 2015 00:35:47 +0000 (01:35 +0100)
commitd74fb368b18f0fbd9a4fe6f15691bbea7f3c4a01
treed7f2e66d4b67420d6c9bd0dfd399492254b4fd14
parent7586f4d172dd9c3ccc3126fc47dca9e49adec132
resolved: announce support for large UDP packets

This is often needed for proper DNSSEC support, and even to handle AAAA records
without falling back to TCP.

If the path between the client and server is fully compliant, this should always
work, however, that is not the case, and overlarge packets will get mysteriously
lost in some cases.

For that reason, we use a similar fallback mechanism as we do for palin EDNS0,
EDNS0+DO, etc.:

The large UDP size feature is different from the other supported feature, as we
cannot simply verify that it works based on receiving a reply (as the server
will usually send us much smaller packets than what we claim to support, so
simply receiving a reply does not mean much).

For that reason, we keep track of the largest UDP packet we ever received, as this
is the smallest known good size (defaulting to the standard 512 bytes). If
announcing the default large size of 4096 fails (in the same way as the other
features), we fall back to the known good size. The same logic of retrying after a
grace-period applies.
src/resolve/resolved-dns-packet.h
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-server.h
src/resolve/resolved-dns-transaction.c