mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
CLEANUP: Fix typos in the dns subsystem
Fix misspells in the code comments of the dns subsystem.
This commit is contained in:
parent
0342090ed7
commit
42cf6395c4
@ -88,7 +88,7 @@
|
|||||||
#define DNS_FLAG_TRUNCATED 0x0200 /* mask for truncated flag */
|
#define DNS_FLAG_TRUNCATED 0x0200 /* mask for truncated flag */
|
||||||
#define DNS_FLAG_REPLYCODE 0x000F /* mask for reply code */
|
#define DNS_FLAG_REPLYCODE 0x000F /* mask for reply code */
|
||||||
|
|
||||||
/* max number of network preference entries are avalaible from the
|
/* max number of network preference entries are available from the
|
||||||
* configuration file.
|
* configuration file.
|
||||||
*/
|
*/
|
||||||
#define SRV_MAX_PREF_NET 5
|
#define SRV_MAX_PREF_NET 5
|
||||||
@ -244,7 +244,7 @@ struct dns_options {
|
|||||||
struct in6_addr in6;
|
struct in6_addr in6;
|
||||||
} mask;
|
} mask;
|
||||||
} pref_net[SRV_MAX_PREF_NET];
|
} pref_net[SRV_MAX_PREF_NET];
|
||||||
int pref_net_nb; /* The number of registered prefered networks. */
|
int pref_net_nb; /* The number of registered preferred networks. */
|
||||||
int accept_duplicate_ip; /* flag to indicate whether the associated object can use an IP address
|
int accept_duplicate_ip; /* flag to indicate whether the associated object can use an IP address
|
||||||
already set to an other object of the same group */
|
already set to an other object of the same group */
|
||||||
};
|
};
|
||||||
@ -265,7 +265,7 @@ struct dns_resolution {
|
|||||||
unsigned int last_valid; /* time of the last valid response */
|
unsigned int last_valid; /* time of the last valid response */
|
||||||
int query_id; /* DNS query ID dedicated for this resolution */
|
int query_id; /* DNS query ID dedicated for this resolution */
|
||||||
struct eb32_node qid; /* ebtree query id */
|
struct eb32_node qid; /* ebtree query id */
|
||||||
int prefered_query_type; /* prefered query type */
|
int prefered_query_type; /* preferred query type */
|
||||||
int query_type; /* current query type */
|
int query_type; /* current query type */
|
||||||
int status; /* status of the resolution being processed RSLV_STATUS_* */
|
int status; /* status of the resolution being processed RSLV_STATUS_* */
|
||||||
int step; /* RSLV_STEP_* */
|
int step; /* RSLV_STEP_* */
|
||||||
@ -292,7 +292,7 @@ struct dns_requester {
|
|||||||
|
|
||||||
/* Last resolution status code */
|
/* Last resolution status code */
|
||||||
enum {
|
enum {
|
||||||
RSLV_STATUS_NONE = 0, /* no resolution occured yet */
|
RSLV_STATUS_NONE = 0, /* no resolution occurred yet */
|
||||||
RSLV_STATUS_VALID, /* no error */
|
RSLV_STATUS_VALID, /* no error */
|
||||||
RSLV_STATUS_INVALID, /* invalid responses */
|
RSLV_STATUS_INVALID, /* invalid responses */
|
||||||
RSLV_STATUS_ERROR, /* error */
|
RSLV_STATUS_ERROR, /* error */
|
||||||
|
12
src/dns.c
12
src/dns.c
@ -974,14 +974,14 @@ int dns_get_ip_from_response(struct dns_response_packet *dns_p,
|
|||||||
max_score = -1;
|
max_score = -1;
|
||||||
|
|
||||||
/* Select an IP regarding configuration preference.
|
/* Select an IP regarding configuration preference.
|
||||||
* Top priority is the prefered network ip version,
|
* Top priority is the preferred network ip version,
|
||||||
* second priority is the prefered network.
|
* second priority is the preferred network.
|
||||||
* the last priority is the currently used IP,
|
* the last priority is the currently used IP,
|
||||||
*
|
*
|
||||||
* For these three priorities, a score is calculated. The
|
* For these three priorities, a score is calculated. The
|
||||||
* weight are:
|
* weight are:
|
||||||
* 8 - prefered ip version.
|
* 8 - preferred ip version.
|
||||||
* 4 - prefered network.
|
* 4 - preferred network.
|
||||||
* 2 - if the ip in the record is not affected to any other server in the same backend (duplication)
|
* 2 - if the ip in the record is not affected to any other server in the same backend (duplication)
|
||||||
* 1 - current ip.
|
* 1 - current ip.
|
||||||
* The result with the biggest score is returned.
|
* The result with the biggest score is returned.
|
||||||
@ -1003,11 +1003,11 @@ int dns_get_ip_from_response(struct dns_response_packet *dns_p,
|
|||||||
continue;
|
continue;
|
||||||
score = 0;
|
score = 0;
|
||||||
|
|
||||||
/* Check for prefered ip protocol. */
|
/* Check for preferred ip protocol. */
|
||||||
if (ip_type == family_priority)
|
if (ip_type == family_priority)
|
||||||
score += 8;
|
score += 8;
|
||||||
|
|
||||||
/* Check for prefered network. */
|
/* Check for preferred network. */
|
||||||
for (j = 0; j < dns_opts->pref_net_nb; j++) {
|
for (j = 0; j < dns_opts->pref_net_nb; j++) {
|
||||||
|
|
||||||
/* Compare only the same adresses class. */
|
/* Compare only the same adresses class. */
|
||||||
|
Loading…
Reference in New Issue
Block a user