diff -uN s.c dns_server.c
--- s.c 2020-01-05 18:15:46.288965975 +0800
+++ dns_server.c 2020-01-05 16:57:02.891166416 +0800
@@ -352,10 +352,13 @@
}
/* add CNAME record */
+ /*
if (request->has_cname) {
+ //request->ttl_cname = request->has_ipv4 ? request->ttl_v4 : request->ttl_v6;
ret |= dns_add_CNAME(packet, DNS_RRS_AN, request->domain, request->ttl_cname, request->cname);
domain = request->cname;
}
+ */
/* add A record */
if (request->has_ipv4 && request->qtype == DNS_T_A) {
一些函数:
进入查询处理:_dns_server_recv _dns_server_do_query _dns_server_process_cache
转发查询结果处理:dns_server_resolve_callback
返回客户端:_dns_server_request_complete _dns_reply _dns_add_rrs
标签:none