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_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.
|
||||
*/
|
||||
#define SRV_MAX_PREF_NET 5
|
||||
|
@ -244,7 +244,7 @@ struct dns_options {
|
|||
struct in6_addr in6;
|
||||
} mask;
|
||||
} 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
|
||||
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 */
|
||||
int query_id; /* DNS query ID dedicated for this resolution */
|
||||
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 status; /* status of the resolution being processed RSLV_STATUS_* */
|
||||
int step; /* RSLV_STEP_* */
|
||||
|
@ -292,7 +292,7 @@ struct dns_requester {
|
|||
|
||||
/* Last resolution status code */
|
||||
enum {
|
||||
RSLV_STATUS_NONE = 0, /* no resolution occured yet */
|
||||
RSLV_STATUS_NONE = 0, /* no resolution occurred yet */
|
||||
RSLV_STATUS_VALID, /* no error */
|
||||
RSLV_STATUS_INVALID, /* invalid responses */
|
||||
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;
|
||||
|
||||
/* Select an IP regarding configuration preference.
|
||||
* Top priority is the prefered network ip version,
|
||||
* second priority is the prefered network.
|
||||
* Top priority is the preferred network ip version,
|
||||
* second priority is the preferred network.
|
||||
* the last priority is the currently used IP,
|
||||
*
|
||||
* For these three priorities, a score is calculated. The
|
||||
* weight are:
|
||||
* 8 - prefered ip version.
|
||||
* 4 - prefered network.
|
||||
* 8 - preferred ip version.
|
||||
* 4 - preferred network.
|
||||
* 2 - if the ip in the record is not affected to any other server in the same backend (duplication)
|
||||
* 1 - current ip.
|
||||
* 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;
|
||||
score = 0;
|
||||
|
||||
/* Check for prefered ip protocol. */
|
||||
/* Check for preferred ip protocol. */
|
||||
if (ip_type == family_priority)
|
||||
score += 8;
|
||||
|
||||
/* Check for prefered network. */
|
||||
/* Check for preferred network. */
|
||||
for (j = 0; j < dns_opts->pref_net_nb; j++) {
|
||||
|
||||
/* Compare only the same adresses class. */
|
||||
|
|
Loading…
Reference in New Issue