diff --git a/include/haproxy/dns-t.h b/include/haproxy/dns-t.h index 48a3952a1..a542d45dc 100644 --- a/include/haproxy/dns-t.h +++ b/include/haproxy/dns-t.h @@ -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; diff --git a/src/dns.c b/src/dns.c index 5db3653a9..a48f685a3 100644 --- a/src/dns.c +++ b/src/dns.c @@ -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: * - 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. diff --git a/src/server.c b/src/server.c index 03b107bda..d33f3deea 100644 --- a/src/server.c +++ b/src/server.c @@ -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;