dns: suppress log
This commit is contained in:
@@ -44,6 +44,8 @@ define Package/smartdns/conffiles
|
||||
/etc/smartdns/address.conf
|
||||
/etc/smartdns/blacklist-ip.conf
|
||||
/etc/smartdns/custom.conf
|
||||
/etc/smartdns/domain-block.list
|
||||
/etc/smartdns/domain-forwarding.list
|
||||
endef
|
||||
|
||||
define Package/smartdns/install
|
||||
|
||||
16
src/dns.c
16
src/dns.c
@@ -2157,7 +2157,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_A(packet, type, domain, ttl, addr);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add A failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add A failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2172,7 +2172,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_CNAME(packet, type, domain, ttl, cname);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add CNAME failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add CNAME failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2186,7 +2186,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_SOA(packet, type, domain, ttl, &soa);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add SOA failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add SOA failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2200,7 +2200,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_NS(packet, type, domain, ttl, ns);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add NS failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add NS failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2214,7 +2214,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_PTR(packet, type, domain, ttl, name);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add PTR failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add PTR failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2228,7 +2228,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = dns_add_AAAA(packet, type, domain, ttl, addr);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add AAAA failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add AAAA failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
} break;
|
||||
@@ -2275,7 +2275,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
|
||||
ret = _dns_add_RAW(packet, type, qtype, domain, ttl, raw_data, rr_len);
|
||||
if (ret < 0) {
|
||||
tlog(TLOG_ERROR, "add raw failed, %s", domain);
|
||||
tlog(TLOG_DEBUG, "add raw failed, %s", domain);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2285,7 +2285,7 @@ static int _dns_decode_an(struct dns_context *context, dns_rr_type type)
|
||||
}
|
||||
|
||||
if (context->ptr - start != rr_len) {
|
||||
tlog(TLOG_ERROR, "length mismatch, %s, %ld:%d", domain, (long)(context->ptr - start), rr_len);
|
||||
tlog(TLOG_DEBUG, "length mismatch, %s, %ld:%d", domain, (long)(context->ptr - start), rr_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
#define DNS_MAX_CNAME_LEN 256
|
||||
#define DNS_MAX_OPT_LEN 256
|
||||
#define DNS_IN_PACKSIZE (512 * 8)
|
||||
#define DNS_PACKSIZE (512 * 12)
|
||||
#define DNS_PACKSIZE (512 * 16)
|
||||
#define DNS_DEFAULT_PACKET_SIZE 512
|
||||
#define DNS_MAX_ALPN_LEN 32
|
||||
#define DNS_MAX_ECH_LEN 256
|
||||
|
||||
@@ -3537,7 +3537,7 @@ static int _dns_client_send_packet(struct dns_query_struct *query, void *packet,
|
||||
server_info->type);
|
||||
time_t now = 0;
|
||||
time(&now);
|
||||
if (now - 5 > server_info->last_recv || send_err != ENOMEM) {
|
||||
if (now - 10 > server_info->last_recv || send_err != ENOMEM) {
|
||||
server_info->prohibit = 1;
|
||||
tlog(TLOG_INFO, "server %s not alive, prohibit", server_info->ip);
|
||||
_dns_client_shutdown_socket(server_info);
|
||||
|
||||
Reference in New Issue
Block a user