diff options
| author | 刘学利 <[email protected]> | 2021-04-17 13:38:01 +0000 |
|---|---|---|
| committer | 刘学利 <[email protected]> | 2021-04-17 13:38:01 +0000 |
| commit | ab097e3bffbdbf00269fe83457e80fbdc6d747fc (patch) | |
| tree | 92ea126f7a99a5863867cd504b84eb4896f861ab /src | |
| parent | badd5547da4d3402bd7ef2185d6bb7380e894e88 (diff) | |
命中策略后返回GIVEME,处理链接上后续的DNS请求v3.0.4
用户自定义没有符合的欺骗IP时,串联环境丢弃真实应答包
Diffstat (limited to 'src')
| -rw-r--r-- | src/fw_dns_plug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fw_dns_plug.cpp b/src/fw_dns_plug.cpp index 1a06ba4..497098f 100644 --- a/src/fw_dns_plug.cpp +++ b/src/fw_dns_plug.cpp @@ -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 @@ -268,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 { @@ -284,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: |
