- Fix for #41: change outbound retry to int to fix signed comparison

warnings.
This commit is contained in:
W.C.A. Wijngaards 2021-09-08 15:07:11 +02:00
parent 750f46d1aa
commit 829f3c932e
6 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,8 @@
processQueryResponse takes an iterator env argument like other
functions in the iterator, no colon in string for set_option,
and some whitespace style, to make it similar to the rest.
- Fix for #41: change outbound retry to int to fix signed comparison
warnings.
3 September 2021: Wouter
- Fix #538: Fix subnetcache statistics.

View file

@ -1285,7 +1285,7 @@ iter_scrub_nxdomain(struct dns_msg* msg)
msg->rep->an_numrrsets = 0;
}
void iter_dec_attempts(struct delegpt* dp, int d, size_t outbound_msg_retry)
void iter_dec_attempts(struct delegpt* dp, int d, int outbound_msg_retry)
{
struct delegpt_addr* a;
for(a=dp->target_list; a; a = a->next_target) {
@ -1300,7 +1300,8 @@ void iter_dec_attempts(struct delegpt* dp, int d, size_t outbound_msg_retry)
}
}
void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old, size_t outbound_msg_retry)
void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old,
int outbound_msg_retry)
{
struct delegpt_addr* a, *o, *prev;
for(a=dp->target_list; a; a = a->next_target) {

View file

@ -349,7 +349,7 @@ void iter_scrub_nxdomain(struct dns_msg* msg);
* @param d: decrease.
* @param outbound_msg_retry: number of retries of outgoing queries
*/
void iter_dec_attempts(struct delegpt* dp, int d, size_t outbound_msg_retry);
void iter_dec_attempts(struct delegpt* dp, int d, int outbound_msg_retry);
/**
* Add retry counts from older delegpt to newer delegpt.
@ -359,7 +359,7 @@ void iter_dec_attempts(struct delegpt* dp, int d, size_t outbound_msg_retry);
* @param outbound_msg_retry: number of retries of outgoing queries
*/
void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old,
size_t outbound_msg_retry);
int outbound_msg_retry);
/**
* See if a DS response (type ANSWER) is too low: a nodata answer with

View file

@ -139,7 +139,7 @@ struct iter_env {
size_t num_queries_ratelimited;
/** number of retries on outgoing queries */
size_t outbound_msg_retry;
int outbound_msg_retry;
};
/**

View file

@ -753,7 +753,7 @@ int config_set_option(struct config_file* cfg, const char* opt,
else S_POW2("ratelimit-slabs:", ratelimit_slabs)
else S_NUMBER_OR_ZERO("ip-ratelimit-factor:", ip_ratelimit_factor)
else S_NUMBER_OR_ZERO("ratelimit-factor:", ratelimit_factor)
else S_SIZET_NONZERO("outbound-msg-retry:", outbound_msg_retry)
else S_NUMBER_NONZERO("outbound-msg-retry:", outbound_msg_retry)
else S_SIZET_NONZERO("fast-server-num:", fast_server_num)
else S_NUMBER_OR_ZERO("fast-server-permil:", fast_server_permil)
else S_YNO("qname-minimisation:", qname_minimisation)

View file

@ -579,7 +579,7 @@ struct config_file {
/** ratelimit factor, 0 blocks all, 10 allows 1/10 of traffic */
int ratelimit_factor;
/** number of retries on outgoing queries */
size_t outbound_msg_retry;
int outbound_msg_retry;
/** minimise outgoing QNAME and hide original QTYPE if possible */
int qname_minimisation;
/** minimise QNAME in strict mode, minimise according to RFC.