summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-11-06 13:32:53 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-15 23:14:32 +0100
commit80710ade03d971a8877fde8ce9d42eb2b07f4c47 (patch)
treeda07a32bb5416b4b26a20b5b1a3217a970726f9b /src/resolve/resolved-manager.h
parent0886999416a299beeafdf91233eeb52512b1fbb9 (diff)
downloadsystemd-80710ade03d971a8877fde8ce9d42eb2b07f4c47.tar.gz
resolved: instead of closing DNS UDP transaction fds right-away, add them to a socket "graveyard"
The "socket graveyard" shall contain sockets we have sent a question out of, but not received a reply. If we'd close thus sockets immediately when we are not interested anymore, we'd trigger ICMP port unreachable messages once we after all *do* get a reply. Let's avoid that, by leaving the fds open for a bit longer, until a timeout is reached or a reply datagram received. Fixes: #17421
Diffstat (limited to 'src/resolve/resolved-manager.h')
-rw-r--r--src/resolve/resolved-manager.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resolve/resolved-manager.h b/src/resolve/resolved-manager.h
index 4dc55e6e41..90f5586230 100644
--- a/src/resolve/resolved-manager.h
+++ b/src/resolve/resolved-manager.h
@@ -21,6 +21,7 @@ typedef struct Manager Manager;
#include "resolved-dns-stub.h"
#include "resolved-dns-trust-anchor.h"
#include "resolved-link.h"
+#include "resolved-socket-graveyard.h"
#define MANAGER_SEARCH_DOMAINS_MAX 256
#define MANAGER_DNS_SERVERS_MAX 256
@@ -144,6 +145,10 @@ struct Manager {
VarlinkServer *varlink_server;
sd_event_source *clock_change_event_source;
+
+ LIST_HEAD(SocketGraveyard, socket_graveyard);
+ SocketGraveyard *socket_graveyard_oldest;
+ size_t n_socket_graveyard;
};
/* Manager */