resolved: Recover from slow DNS responses
authorKai Krakow <kai@kaishome.de>
Sat, 13 May 2017 10:30:56 +0000 (12:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Jun 2017 20:04:16 +0000 (22:04 +0200)
commit496ae8c84b2d3622bc767a727e3582e2b6bcffcd
tree83e00059ea9ff8034625f5c565a5d8b36f4d1e36
parent9af868392bb8ceb50afc6b5028786dc266888dea
resolved: Recover from slow DNS responses

When DNS is unreliable temporarily, the current implementation will
never improve resend behavior again and switch DNS servers only late
(current maximum timeout is 5 seconds).

We can improve this by biasing the resend_timeout back to the current
RTT when a successful response was received. Next time, a timeout is hit
on this server, it will switch to the next server faster.

Fixes: #5953
src/resolve/resolved-dns-server.c