summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨威 <[email protected]>2020-12-25 15:08:19 +0800
committer杨威 <[email protected]>2020-12-25 15:08:19 +0800
commitbadd5547da4d3402bd7ef2185d6bb7380e894e88 (patch)
tree264441a25f6bbbf3ac59c886386b16d1398e5330
parent95bdca7514af0cf1098b2486ea99a26ff985272a (diff)
Update fw_dns_plug.cppv3.0.3
-rw-r--r--src/fw_dns_plug.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fw_dns_plug.cpp b/src/fw_dns_plug.cpp
index e159a09..1a06ba4 100644
--- a/src/fw_dns_plug.cpp
+++ b/src/fw_dns_plug.cpp
@@ -243,8 +243,16 @@ static char fw_dns_action(struct streaminfo *a_stream, dns_info_t *dns_info, Maa
return -1;
}
- senddir = MESA_dir_reverse(a_stream->routedir);
+ if(dns_info->hdr_info.qr==0)
+ {
+ senddir = MESA_dir_reverse(a_stream->routedir);
+ }
+ else
+ {
+ senddir = a_stream->routedir;
+ }
ret=MESA_inject_pkt(a_stream, (const char *)cheat_pkt_payload, payload_len, (const char *)a_packet, senddir);
+
if(ret<0)
{
MESA_handle_runtime_log(g_fw_dns_plug_info.logger,