]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: rework server feature level logic
authorLennart Poettering <lennart@poettering.net>
Fri, 8 Jan 2016 17:50:41 +0000 (18:50 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Jan 2016 18:40:00 +0000 (19:40 +0100)
commit6bb2c08597c999c429e889cd2403b2fef5f3e1a0
treef424703e1ce9b959b0a38ee904b4371e6b59615c
parentef9fb66c0b292d3543c16bfce99ad677bef0f401
resolved: rework server feature level logic

This changes the DnsServer logic to count failed UDP and TCP failures separately. This is useful so that we don't end
up downgrading the feature level from one UDP level to a lower UDP level just because a TCP connection we did because
of a TC response failed.

This also adds accounting of truncated packets. If we detect incoming truncated packets, and count too many failed TCP
connections (which is the normal fall back if we get a trucnated UDP packet) we downgrade the feature level, given that
the responses at the current levels don't get through, and we somehow need to make sure they become smaller, which they
will do if we don't request DNSSEC or EDNS support.

This makes resolved work much better with crappy DNS servers that do not implement TCP and only limited UDP packet
sizes, but otherwise support DNSSEC RRs. They end up choking on the generally larger DNSSEC RRs and there's no way to
retrieve the full data.
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-server.h
src/resolve/resolved-dns-transaction.c