Skip to content

Commit

Permalink
cache-size: fix cache size value issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Feb 1, 2024
1 parent d4bb3d7 commit 3bf395b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/dns_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -5936,7 +5936,7 @@ static struct config_item _config_item[] = {
CONF_CUSTOM("nftset-no-speed", _config_nftset_no_speed, NULL),
CONF_CUSTOM("speed-check-mode", _config_speed_check_mode, NULL),
CONF_INT("tcp-idle-time", &dns_conf_tcp_idle_time, 0, 3600),
CONF_SSIZE("cache-size", &dns_conf_cachesize, 0, CONF_INT_MAX),
CONF_SSIZE("cache-size", &dns_conf_cachesize, -1, CONF_INT_MAX),
CONF_CUSTOM("cache-file", _config_option_parser_filepath, (char *)&dns_conf_cache_file),
CONF_YESNO("cache-persist", &dns_conf_cache_persist),
CONF_INT("cache-checkpoint-time", &dns_conf_cache_checkpoint_time, 0, 3600 * 24 * 7),
Expand Down
4 changes: 0 additions & 4 deletions src/lib/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ int conf_ssize(const char *item, void *data, int argc, char *argv[])
}

num = atoi(value);
if (num < 0) {
return -1;
}

size = num * base;
if (size > item_size->max) {
size = item_size->max;
Expand Down

1 comment on commit 3bf395b

@leonanu
Copy link

@leonanu leonanu commented on 3bf395b Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.