cache: fix cache not update issue when serve-expired enabled.
This commit is contained in:
@@ -1929,14 +1929,12 @@ static int _dns_server_reply_passthrouth(struct dns_request *request, struct dns
|
|||||||
_dns_result_callback(request);
|
_dns_result_callback(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request->conn == NULL) {
|
if (request->conn) {
|
||||||
return 0;
|
/* When passthrough, modify the id to be the id of the client request. */
|
||||||
|
dns_server_update_reply_packet_id(request, inpacket, inpacket_len);
|
||||||
|
ret = _dns_reply_inpacket(request, inpacket, inpacket_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When passthrough, modify the id to be the id of the client request. */
|
|
||||||
dns_server_update_reply_packet_id(request, inpacket, inpacket_len);
|
|
||||||
ret = _dns_reply_inpacket(request, inpacket, inpacket_len);
|
|
||||||
|
|
||||||
if (packet->head.rcode != DNS_RC_NOERROR && packet->head.rcode != DNS_RC_NXDOMAIN) {
|
if (packet->head.rcode != DNS_RC_NOERROR && packet->head.rcode != DNS_RC_NXDOMAIN) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user