MINOR: resolvers: renames resolvers DNS_UPD_* returncodes to RSLV_UPD_*

This patch renames some #defines prefixes from DNS to RSLV.
This commit is contained in:
Emeric Brun 2020-12-23 18:17:31 +01:00 committed by Willy Tarreau
parent 30c766ebbc
commit 456de77bdb
3 changed files with 16 additions and 16 deletions

View File

@ -335,16 +335,16 @@ enum {
* preference
*/
enum {
DNS_UPD_NO = 1, /* provided IP was found and preference is matched
RSLV_UPD_NO = 1, /* provided IP was found and preference is matched
* OR provided IP found and preference is not matched, but no IP
* matching preference was found */
DNS_UPD_SRVIP_NOT_FOUND, /* provided IP not found
RSLV_UPD_SRVIP_NOT_FOUND, /* provided IP not found
* OR provided IP found and preference is not match and an IP
* matching preference was found */
DNS_UPD_CNAME, /* CNAME without any IP provided in the response */
DNS_UPD_NAME_ERROR, /* name in the response did not match the query */
DNS_UPD_NO_IP_FOUND, /* no IP could be found in the response */
DNS_UPD_OBSOLETE_IP, /* The server IP was obsolete, and no other IP was found */
RSLV_UPD_CNAME, /* CNAME without any IP provided in the response */
RSLV_UPD_NAME_ERROR, /* name in the response did not match the query */
RSLV_UPD_NO_IP_FOUND, /* no IP could be found in the response */
RSLV_UPD_OBSOLETE_IP, /* The server IP was obsolete, and no other IP was found */
};
struct proxy;

View File

@ -1323,7 +1323,7 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend,
* The following tasks are the responsibility of the caller:
* - <dns_p> contains an error free DNS response
* For both cases above, dns_validate_dns_response is required
* returns one of the DNS_UPD_* code
* returns one of the RSLV_UPD_* code
*/
int dns_get_ip_from_response(struct resolv_response *r_res,
struct resolv_options *resolv_opts, void *currentip,
@ -1435,14 +1435,14 @@ int dns_get_ip_from_response(struct resolv_response *r_res,
newip6 = ip;
currentip_found = currentip_sel;
if (score == 15)
return DNS_UPD_NO;
return RSLV_UPD_NO;
max_score = score;
}
} /* list for each record entries */
/* No IP found in the response */
if (!newip4 && !newip6)
return DNS_UPD_NO_IP_FOUND;
return RSLV_UPD_NO_IP_FOUND;
/* Case when the caller looks first for an IPv4 address */
if (family_priority == AF_INET) {
@ -1485,7 +1485,7 @@ int dns_get_ip_from_response(struct resolv_response *r_res,
}
/* No reason why we should change the server's IP address */
return DNS_UPD_NO;
return RSLV_UPD_NO;
not_found:
list_for_each_entry(record, &r_res->answer_list, list) {
@ -1495,7 +1495,7 @@ int dns_get_ip_from_response(struct resolv_response *r_res,
LIST_ADDQ(&r_res->answer_list, &record->list);
break;
}
return DNS_UPD_SRVIP_NOT_FOUND;
return RSLV_UPD_SRVIP_NOT_FOUND;
}
/* Turns a domain name label into a string.

View File

@ -4019,20 +4019,20 @@ int snr_resolution_cb(struct resolv_requester *requester, struct dns_counters *c
&firstip_sin_family, s);
switch (ret) {
case DNS_UPD_NO:
case RSLV_UPD_NO:
goto update_status;
case DNS_UPD_SRVIP_NOT_FOUND:
case RSLV_UPD_SRVIP_NOT_FOUND:
goto save_ip;
case DNS_UPD_CNAME:
case RSLV_UPD_CNAME:
goto invalid;
case DNS_UPD_NO_IP_FOUND:
case RSLV_UPD_NO_IP_FOUND:
has_no_ip = 1;
goto update_status;
case DNS_UPD_NAME_ERROR:
case RSLV_UPD_NAME_ERROR:
/* update resolution status to OTHER error type */
resolution->status = RSLV_STATUS_OTHER;
goto update_status;