diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 00:00:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 00:00:39 +0000 |
commit | 1e7741f40999b12a66f37978b280c7fa55b4fa0b (patch) | |
tree | e4567cce7db513c446c3f774631a86b776c957eb /src/smtpd/smtpd_check.c | |
parent | Adding upstream version 3.5.24. (diff) | |
download | postfix-1e7741f40999b12a66f37978b280c7fa55b4fa0b.tar.xz postfix-1e7741f40999b12a66f37978b280c7fa55b4fa0b.zip |
Adding upstream version 3.5.25.upstream/3.5.25upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/smtpd/smtpd_check.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/smtpd/smtpd_check.c b/src/smtpd/smtpd_check.c index ed0e3ff..69119ad 100644 --- a/src/smtpd/smtpd_check.c +++ b/src/smtpd/smtpd_check.c @@ -2985,6 +2985,7 @@ static int check_server_access(SMTPD_STATE *state, const char *table, struct addrinfo *res; int status; INET_PROTO_INFO *proto_info; + int server_addr_count = 0; /* * Sanity check. @@ -3134,6 +3135,15 @@ static int check_server_access(SMTPD_STATE *state, const char *table, msg_info("%s: %s host address check: %s", myname, dns_strtype(type), (char *) server->data); for (res = res0; res != 0; res = res->ai_next) { + server_addr_count += 1; + if (server_addr_count > var_dns_rr_list_limit) { + msg_warn("%s: %s server address count limit (%d) exceeded" + " for %s %s -- ignoring the remainder", myname, + dns_strtype(type), var_dns_rr_list_limit, + reply_class, reply_name); + freeaddrinfo(res0); + CHECK_SERVER_RETURN(SMTPD_CHECK_DUNNO); + } if (strchr((char *) proto_info->sa_family_list, res->ai_family) == 0) { if (msg_verbose) msg_info("skipping address family %d for host %s", |