diff options
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/business/doh/src/doh.cpp | 9 | ||||
| -rw-r--r-- | plugin/business/pangu-http/src/pangu_http.cpp | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/plugin/business/doh/src/doh.cpp b/plugin/business/doh/src/doh.cpp index f53f5a7..aa0af29 100644 --- a/plugin/business/doh/src/doh.cpp +++ b/plugin/business/doh/src/doh.cpp @@ -244,8 +244,8 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http g_doh_conf->tables[TYPE_HOST].name, host, scan_ret, ctx->addr_string); } - scan_ret = tfe_scan_fqdn_cat(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_doh_conf->local_logger, g_doh_conf->tables[TYPE_HOST].id); - if( scan_ret > 0) + scan_ret = tfe_scan_fqdn_cat(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_doh_conf->local_logger, ctx->addr_string, g_doh_conf->tables[TYPE_HOST].id); + if( scan_ret > 0) { hit_cnt += scan_ret; } @@ -295,11 +295,6 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http TFE_LOG_INFO(g_doh_conf->local_logger, "Scan %s, NO hit domain: %s scan ret: %d addr: %s", g_doh_conf->tables[TYPE_QNAME].name, qname, scan_ret, ctx->addr_string); } - scan_ret = tfe_scan_fqdn_cat(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_doh_conf->local_logger, g_doh_conf->tables[TYPE_QNAME].id); - if( scan_ret > 0) - { - hit_cnt += scan_ret; - } if (hit_cnt) { diff --git a/plugin/business/pangu-http/src/pangu_http.cpp b/plugin/business/pangu-http/src/pangu_http.cpp index 244012d..841dd9f 100644 --- a/plugin/business/pangu-http/src/pangu_http.cpp +++ b/plugin/business/pangu-http/src/pangu_http.cpp @@ -1957,12 +1957,14 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht { hit_cnt += scan_ret; } - scan_ret = tfe_scan_fqdn_cat(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_pangu_rt->local_logger, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN]); - if (scan_ret > 0) + char *addr_string = tfe_stream_addr_to_str(stream->addr); + scan_ret = tfe_scan_fqdn_cat(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_pangu_rt->local_logger, addr_string, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN]); + if (scan_ret > 0) { hit_cnt += scan_ret; } - } + free(addr_string); + } const char * str_url = session->req->req_spec.url; int str_url_length = (int) (strlen(session->req->req_spec.url)); @@ -2385,7 +2387,6 @@ void pangu_on_http_begin(const struct tfe_stream * stream, { hit_cnt+=scan_ret; } - int scan_val=106; scan_ret=Maat_scan_intval(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_APP_ID], scan_val, result+hit_cnt, MAX_SCAN_RESULT-hit_cnt, &(ctx->scan_mid), (int) thread_id); if(scan_ret>0) |
