mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MINOR: dns: server set by SRV records stay in "no resolution" status
This patch fixes a bug where some servers managed by SRV record query types never ever recover from a "no resolution" status. The problem is due to a wrong function called when breaking the server/resolution (A/AAAA) relationship: this is performed when a server's SRV record disappear from the SRV response.
This commit is contained in:
parent
6ca71a9297
commit
747359eeca
@ -57,6 +57,7 @@ const char *update_server_fqdn(struct server *server, const char *fqdn, const ch
|
||||
int snr_resolution_cb(struct dns_requester *requester, struct dns_nameserver *nameserver);
|
||||
int snr_resolution_error_cb(struct dns_requester *requester, int error_code);
|
||||
struct server *snr_check_ip_callback(struct server *srv, void *ip, unsigned char *ip_family);
|
||||
void srv_free_from_resolution(struct server *srv);
|
||||
|
||||
/* increase the number of cumulated connections on the designated server */
|
||||
static void inline srv_inc_sess_ctr(struct server *s)
|
||||
|
||||
@ -564,10 +564,7 @@ void dns_resolve_recv(struct dgram_conn *dgram)
|
||||
srv->hostname_dn_len = 0;
|
||||
free(srv->hostname_dn);
|
||||
srv->hostname_dn = NULL;
|
||||
dns_resolution_free(srv->resolvers, srv->resolution);
|
||||
srv->resolution = dns_resolution_list_get(srv->resolvers, NULL, srv->dns_requester->prefered_query_type);
|
||||
if (resolution == srv->resolution)
|
||||
removed_reso = 1;
|
||||
srv_free_from_resolution(srv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1692,7 +1692,7 @@ static int srv_prepare_for_resolution(struct server *srv, const char *hostname)
|
||||
* - move resolution's hostname_dn and hostname_dn_len to the next requester
|
||||
* available (when applied)
|
||||
*/
|
||||
static void srv_free_from_resolution(struct server *srv)
|
||||
void srv_free_from_resolution(struct server *srv)
|
||||
{
|
||||
struct dns_requester *requester;
|
||||
int count;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user