mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
dnspr: a name server's answer with no records relayed as it is (#1292)
C/C++ CI Linux / ubuntu-24.04-arm (push) Waiting to run
C/C++ CI Linux / ubuntu-latest (push) Waiting to run
C/C++ CI MacOS / macos-15 (push) Waiting to run
C/C++ CI Windows / windows-2022 (push) Waiting to run
C/C++ CI cmake / macos-15 (push) Waiting to run
C/C++ CI cmake / ubuntu-24.04-arm (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (push) Waiting to run
C/C++ CI cmake / windows-2022 (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ubuntu-24.04-arm (push) Waiting to run
C/C++ CI Linux / ubuntu-latest (push) Waiting to run
C/C++ CI MacOS / macos-15 (push) Waiting to run
C/C++ CI Windows / windows-2022 (push) Waiting to run
C/C++ CI cmake / macos-15 (push) Waiting to run
C/C++ CI cmake / ubuntu-24.04-arm (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (push) Waiting to run
C/C++ CI cmake / windows-2022 (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
This commit is contained in:
1 parent
142f89cb4d
commit
1461dbaff0
1 file changed
+5
-8
+5
-8
@@ -117,8 +117,8 @@ static void dnscache(struct clientparam *param, struct dnsquery *q, unsigned cha
|
||||
}
|
||||
}
|
||||
|
||||
/* An answer from a name server: to the client as it is if it has answers,
|
||||
else as the name not found. 1: the query is done. */
|
||||
/* An answer from a name server: to the client as it is, whatever it
|
||||
says. 1: the query is done. */
|
||||
static int dnsreply(struct udploop *u, struct udpsession *ss, unsigned char *buf, int len){
|
||||
struct clientparam *param = ss->param;
|
||||
struct dnsquery *q = ss->data;
|
||||
@@ -131,14 +131,11 @@ static int dnsreply(struct udploop *u, struct udpsession *ss, unsigned char *buf
|
||||
buf[1] = q->cid[1];
|
||||
param->statssrv64 += len;
|
||||
param->nreads++;
|
||||
if(buf[6] || buf[7]){
|
||||
dnscache(param, q, buf, len);
|
||||
/* the answer goes to the client as it is, its code with no records
|
||||
among them: the name not found is the server's word, not ours */
|
||||
if(buf[6] || buf[7]) dnscache(param, q, buf, len);
|
||||
param->res = (udpanswer(u, param, buf, len) == len)? 0 : 822;
|
||||
return 1;
|
||||
}
|
||||
q->ip = 0;
|
||||
param->res = dnsanswer(u, param, q, buf, len);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* The query to name server q->server or a later one: 0 once it is on its
|
||||
|
||||
Reference in new issue
Block a user