Compare commits
6 Commits
v3.0.2.20.
...
v3.0.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab097e3bff | ||
|
|
badd5547da | ||
|
|
95bdca7514 | ||
|
|
9e4ed53bb1 | ||
|
|
4942106aab | ||
|
|
28cfd57e98 |
@@ -67,7 +67,6 @@ develop_build_release:
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
PACKAGE: 1
|
||||
UPLOAD_RPM: 1
|
||||
ASAN_OPTION: ADDRESS
|
||||
TESTING_VERSION_BUILD: 1
|
||||
PULP3_REPO_NAME: tsg-testing-x86_64.el7
|
||||
PULP3_DIST_NAME: tsg-testing-x86_64.el7
|
||||
|
||||
@@ -37,6 +37,11 @@ if [ -n "${INSTALL_DEPENDENCY_LIBRARY}" ]; then
|
||||
yum install -y $INSTALL_DEPENDENCY_LIBRARY
|
||||
source /etc/profile.d/framework.sh
|
||||
fi
|
||||
|
||||
if [ $ASAN_OPTION ];then
|
||||
source /opt/rh/devtoolset-7/enable
|
||||
fi
|
||||
|
||||
mkdir build || true
|
||||
cd build
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ static char fw_dns_action(struct streaminfo *a_stream, dns_info_t *dns_info, Maa
|
||||
tmp_buff=NULL;
|
||||
}
|
||||
|
||||
return PROT_STATE_GIVEME;
|
||||
return PROT_STATE_GIVEME|PROT_STATE_DROPPKT;
|
||||
}
|
||||
|
||||
item=cJSON_GetObjectItem(object, "method");
|
||||
@@ -168,7 +168,7 @@ static char fw_dns_action(struct streaminfo *a_stream, dns_info_t *dns_info, Maa
|
||||
switch(method_type)
|
||||
{
|
||||
case TSG_METHOD_TYPE_DROP:
|
||||
state=PROT_STATE_DROPME|PROT_STATE_DROPPKT;
|
||||
state=PROT_STATE_GIVEME|PROT_STATE_DROPPKT;
|
||||
break;
|
||||
case TSG_METHOD_TYPE_REDIRECTION:
|
||||
if(g_fw_dns_plug_info.mode==0 && dns_info->hdr_info.qr==1) //mirror
|
||||
@@ -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,
|
||||
@@ -260,7 +268,7 @@ static char fw_dns_action(struct streaminfo *a_stream, dns_info_t *dns_info, Maa
|
||||
);
|
||||
}
|
||||
|
||||
state=PROT_STATE_DROPME|PROT_STATE_DROPPKT;
|
||||
state=PROT_STATE_GIVEME|PROT_STATE_DROPPKT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -276,7 +284,7 @@ static char fw_dns_action(struct streaminfo *a_stream, dns_info_t *dns_info, Maa
|
||||
dns_info->query_question.qtype,
|
||||
(g_fw_dns_plug_info.level<RLOG_LV_FATAL ? printaddr(&a_stream->addr, a_stream->threadnum) : "")
|
||||
);
|
||||
state=PROT_STATE_GIVEME;
|
||||
state=PROT_STATE_GIVEME|PROT_STATE_DROPPKT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user