summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-24 21:39:14 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 21:58:38 +0100
commiteed857b71702f8551b46b66b31fa0d08583cf23c (patch)
tree519b8597bd9f187e6656b4e60ea8a0ea38b88a64 /src/resolve/resolved-manager.h
parent4b95f1798f22c1bb75295f448188560cb6ec9ece (diff)
resolved: enforce a maximum limit on both dns servers and search domains
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 0683e23f6c..2bbd5d08e9 100644
--- a/src/resolve/resolved-manager.h
+++ b/src/resolve/resolved-manager.h
@@ -45,6 +45,9 @@ enum Support {
#include "resolved-dns-stream.h"
#include "resolved-link.h"
+#define MANAGER_SEARCH_DOMAINS_MAX 32
+#define MANAGER_DNS_SERVERS_MAX 32
+
struct Manager {
sd_event *event;
@@ -70,9 +73,11 @@ struct Manager {
/* Unicast dns */
LIST_HEAD(DnsServer, dns_servers);
LIST_HEAD(DnsServer, fallback_dns_servers);
+ unsigned n_dns_servers; /* counts both main and fallback */
DnsServer *current_dns_server;
LIST_HEAD(DnsSearchDomain, search_domains);
+ unsigned n_search_domains;
bool need_builtin_fallbacks:1;