|
@@ -162,6 +162,7 @@ char dns_save_fail_packet_dir[DNS_MAX_PATH];
|
|
|
char dns_resolv_file[DNS_MAX_PATH];
|
|
|
int dns_no_pidfile;
|
|
|
int dns_no_daemon;
|
|
|
+size_t dns_socket_buff_size;
|
|
|
|
|
|
struct hash_table conf_file_table;
|
|
|
struct conf_file_path {
|
|
@@ -1824,14 +1825,6 @@ errout:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int _config_ipset_timeout(void *data, int argc, char *argv[])
|
|
|
-{
|
|
|
- struct config_item_yesno item;
|
|
|
-
|
|
|
- item.data = &_config_current_rule_group()->ipset_nftset.ipset_timeout_enable;
|
|
|
- return conf_yesno(NULL, &item, argc, argv);
|
|
|
-}
|
|
|
-
|
|
|
static int _config_ipset(void *data, int argc, char *argv[])
|
|
|
{
|
|
|
char domain[DNS_MAX_CONF_CNAME_LEN];
|
|
@@ -1875,14 +1868,6 @@ errout:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int _config_nftset_timeout(void *data, int argc, char *argv[])
|
|
|
-{
|
|
|
- struct config_item_yesno item;
|
|
|
-
|
|
|
- item.data = &_config_current_rule_group()->ipset_nftset.nftset_timeout_enable;
|
|
|
- return conf_yesno(NULL, &item, argc, argv);
|
|
|
-}
|
|
|
-
|
|
|
static void _config_nftset_table_destroy(void)
|
|
|
{
|
|
|
struct dns_nftset_name *nftset = NULL;
|
|
@@ -5682,10 +5667,12 @@ static struct config_item _config_item[] = {
|
|
|
CONF_CUSTOM("cname", _config_cname, NULL),
|
|
|
CONF_CUSTOM("srv-record", _config_srv_record, NULL),
|
|
|
CONF_CUSTOM("proxy-server", _config_proxy_server, NULL),
|
|
|
- CONF_CUSTOM("ipset-timeout", _config_ipset_timeout, NULL),
|
|
|
+ CONF_YESNO_FUNC("ipset-timeout", _dns_conf_group_yesno,
|
|
|
+ (void *)offsetof(struct dns_conf_group, ipset_nftset.ipset_timeout_enable)),
|
|
|
CONF_CUSTOM("ipset", _config_ipset, NULL),
|
|
|
CONF_CUSTOM("ipset-no-speed", _config_ipset_no_speed, NULL),
|
|
|
- CONF_CUSTOM("nftset-timeout", _config_nftset_timeout, NULL),
|
|
|
+ CONF_YESNO_FUNC("nftset-timeout", _dns_conf_group_yesno,
|
|
|
+ (void *)offsetof(struct dns_conf_group, ipset_nftset.nftset_timeout_enable)),
|
|
|
CONF_YESNO("nftset-debug", &dns_conf_nftset_debug_enable),
|
|
|
CONF_CUSTOM("nftset", _config_nftset, NULL),
|
|
|
CONF_CUSTOM("nftset-no-speed", _config_nftset_no_speed, NULL),
|
|
@@ -5767,6 +5754,7 @@ static struct config_item _config_item[] = {
|
|
|
CONF_YESNO("debug-save-fail-packet", &dns_save_fail_packet),
|
|
|
CONF_YESNO("no-pidfile", &dns_no_pidfile),
|
|
|
CONF_YESNO("no-daemon", &dns_no_daemon),
|
|
|
+ CONF_SIZE("socket-buff-size", &dns_socket_buff_size, 0, 1024 * 1024 * 8),
|
|
|
CONF_CUSTOM("plugin", _config_plugin, NULL),
|
|
|
CONF_STRING("resolv-file", (char *)&dns_resolv_file, sizeof(dns_resolv_file)),
|
|
|
CONF_STRING("debug-save-fail-packet-dir", (char *)&dns_save_fail_packet_dir, sizeof(dns_save_fail_packet_dir)),
|