resolved: unify code for trying a different DNS server
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Nov 2020 17:36:08 +0000 (18:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Feb 2021 17:54:33 +0000 (18:54 +0100)
commit9147b591a1ec61d9aed5b11e5f702588a6ae8851
treead86b43d0046cb8395b17d375be95ddea521b504
parent7ef863a76a0b93a373ac288a049859c403214577
resolved: unify code for trying a different DNS server

Let's unify some code, and add a common implementation of a function
that checks whether we have tried all DNS servers yet, and retries the
transaction if we don't. We already use this same code twice. Let's use
it at some other places too now — basically all cases where we switch to
a new server — with the one case of packet loss, where we too switch
servers, but don#t care how many times we already tried to switch.
src/resolve/resolved-dns-transaction.c