mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 11:32:50 +02:00
BUG/MAJOR: dns: dns client resolution infinite loop
Under certain circonstance (a configuration with many servers relying on DNS resolution and one of them triggering the replay of a request because of a timeout or invalid response to an ANY query), HAProxy could end up in an infinite loop over the currently supposed running DNS queries. This was caused because the FIFO list of running queries was improperly updated in snr_resolution_error_cb. The head of the list was removed instead of the resolution in error, when moving the resolution to the end of the list. In the mean time, a LIST_DEL statement is removed since useless. This action is already performed by the dns_reset_resolution function.
This commit is contained in:
committed by
Willy Tarreau
parent
f0d9370f6b
commit
11c4e4eefb
@@ -2088,7 +2088,6 @@ int snr_resolution_cb(struct dns_resolution *resolution, struct dns_nameserver *
|
||||
/* reset values */
|
||||
dns_reset_resolution(resolution);
|
||||
|
||||
LIST_DEL(&resolution->list);
|
||||
dns_update_resolvers_timeout(nameserver->resolvers);
|
||||
|
||||
snr_update_srv_status(s);
|
||||
@@ -2149,7 +2148,7 @@ int snr_resolution_error_cb(struct dns_resolution *resolution, int error_code)
|
||||
*/
|
||||
if (dns_check_resolution_queue(resolvers) > 1) {
|
||||
/* second resolution becomes first one */
|
||||
LIST_DEL(&resolvers->curr_resolution);
|
||||
LIST_DEL(&resolution->list);
|
||||
/* ex first resolution goes to the end of the queue */
|
||||
LIST_ADDQ(&resolvers->curr_resolution, &resolution->list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user