mirror of
https://github.com/systemd/systemd.git
synced 2026-08-13 06:32:22 +00:00
resolve: limit the number NTAs to something sensible
(cherry picked from commit 17e6a3e2a8)
This commit is contained in:
committed by
Luca Boccassi
parent
4bf52a5d79
commit
75ceeac012
@@ -683,6 +683,9 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (strv_length(ntas) > LINK_NEGATIVE_TRUST_ANCHORS_MAX)
|
||||
return sd_bus_error_set(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many negative trust anchors per link");
|
||||
|
||||
STRV_FOREACH(i, ntas) {
|
||||
r = dns_name_is_valid(*i);
|
||||
if (r < 0)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define LINK_SEARCH_DOMAINS_MAX 1024
|
||||
#define LINK_DNS_SERVERS_MAX 256
|
||||
#define LINK_NEGATIVE_TRUST_ANCHORS_MAX 2048
|
||||
|
||||
typedef struct LinkAddress {
|
||||
Link *link;
|
||||
|
||||
Reference in New Issue
Block a user