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
68489713b8
commit
122150be85
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,
|
/* An answer from a name server: to the client as it is, whatever it
|
||||||
else as the name not found. 1: the query is done. */
|
says. 1: the query is done. */
|
||||||
static int dnsreply(struct udploop *u, struct udpsession *ss, unsigned char *buf, int len){
|
static int dnsreply(struct udploop *u, struct udpsession *ss, unsigned char *buf, int len){
|
||||||
struct clientparam *param = ss->param;
|
struct clientparam *param = ss->param;
|
||||||
struct dnsquery *q = ss->data;
|
struct dnsquery *q = ss->data;
|
||||||
@@ -131,15 +131,12 @@ static int dnsreply(struct udploop *u, struct udpsession *ss, unsigned char *buf
|
|||||||
buf[1] = q->cid[1];
|
buf[1] = q->cid[1];
|
||||||
param->statssrv64 += len;
|
param->statssrv64 += len;
|
||||||
param->nreads++;
|
param->nreads++;
|
||||||
if(buf[6] || buf[7]){
|
/* the answer goes to the client as it is, its code with no records
|
||||||
dnscache(param, q, buf, len);
|
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;
|
param->res = (udpanswer(u, param, buf, len) == len)? 0 : 822;
|
||||||
return 1;
|
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
|
/* The query to name server q->server or a later one: 0 once it is on its
|
||||||
way, the loop to wait for the answer; nonzero if none takes it. */
|
way, the loop to wait for the answer; nonzero if none takes it. */
|
||||||
|
|||||||
Reference in new issue
Block a user