mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-18 12:26:45 +02:00
BUG/MINOR: resolvers: answser item list was randomly purged or errors
In case of SRV records, The answer item list was purged by the error callback of the first requester which considers the error could not be safely ignored. It makes this item list unavailable for subsequent requesters even if they consider the error could be ignored. On A resolution or do_resolve action error, the answer items were never trashed. This patch re-work the error callbacks and the code to check the return code If a callback return 1, we consider the error was ignored and the answer item list must be kept. At the opposite, If all error callbacks of all requesters of the same resolution returns 0 the list will be purged This patch should be backported as far as 2.0.
This commit is contained in:
committed by
Christopher Faulet
parent
0fe1864f7d
commit
12ca658dbe
@@ -157,6 +157,12 @@ int act_resolution_cb(struct resolv_requester *requester, struct dns_counters *c
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do resolve error management callback
|
||||
* returns:
|
||||
* 0 if we can trash answser items.
|
||||
* 1 when safely ignored and we must kept answer items
|
||||
*/
|
||||
int act_resolution_error_cb(struct resolv_requester *requester, int error_code)
|
||||
{
|
||||
struct stream *stream;
|
||||
|
||||
Reference in New Issue
Block a user