resolved: when we get a TCP connection failure, try again

Previously, when we couldn't connect to a DNS server via TCP we'd abort the whole transaction using a
"connection-failure" state. This change removes that, and counts failed connections as "lost packet" events, so that
we switch back to the UDP protocol again.
This commit is contained in:
Lennart Poettering
2016-01-11 19:39:59 +01:00
parent 6a1a5eec43
commit a1a3f73a57
4 changed files with 11 additions and 8 deletions
+3
View File
@@ -73,3 +73,6 @@ int same_fd(int a, int b);
void cmsg_close_all(struct msghdr *mh);
bool fdname_is_valid(const char *s);
#define ERRNO_IS_DISCONNECT(r) \
IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE)