summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-09-11 17:49:14 +0800
committerfengweihao <[email protected]>2024-09-11 17:49:14 +0800
commit1b917ef5ae149cc7bd966d88465769fb7b25ce72 (patch)
treeed70049ae5b43e634ca60f45dd8e8e035fba5c80 /plugin
parent268b80c3de6727ba0d82af3df433091b2225142e (diff)
TSG-22512 修复Manipulation配置Server FQDN Tags策略无法命中v4.10.2-20240911
TSG-22504 Manipulation日志输出Client Country,server_country字段 TSG-22374 修复Manipulation日志字段中的http版本号
Diffstat (limited to 'plugin')
-rw-r--r--plugin/business/doh/src/doh.cpp4
-rw-r--r--plugin/business/tsg-http/src/tsg_http.cpp4
-rw-r--r--plugin/business/tsg-http/src/tsg_logger.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/plugin/business/doh/src/doh.cpp b/plugin/business/doh/src/doh.cpp
index a2a28b2..f0370ed 100644
--- a/plugin/business/doh/src/doh.cpp
+++ b/plugin/business/doh/src/doh.cpp
@@ -308,9 +308,9 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
}
scan_ret = tfe_scan_fqdn_tags(stream, result, ctx->scan_mid, hit_cnt, g_doh_conf->tables[TYPE_HOST].id, g_doh_conf->local_logger);
- if (scan_ret == MAAT_SCAN_HIT)
+ if (scan_ret > 0)
{
- hit_cnt += n_hit_result;
+ hit_cnt += scan_ret;
}
}
diff --git a/plugin/business/tsg-http/src/tsg_http.cpp b/plugin/business/tsg-http/src/tsg_http.cpp
index 511d53e..9c57c56 100644
--- a/plugin/business/tsg-http/src/tsg_http.cpp
+++ b/plugin/business/tsg-http/src/tsg_http.cpp
@@ -2727,9 +2727,9 @@ enum proxy_action http_scan(const struct tfe_http_session * session, enum tfe_ht
}
scan_ret = tfe_scan_fqdn_tags(stream, result, ctx->scan_mid, hit_cnt, g_proxy_rt->scan_table_id[PXY_CTRL_HTTP_FQDN], g_proxy_rt->local_logger);
- if (scan_ret == MAAT_SCAN_HIT)
+ if (scan_ret > 0)
{
- hit_cnt += n_hit_result;
+ hit_cnt += scan_ret;
}
}
diff --git a/plugin/business/tsg-http/src/tsg_logger.cpp b/plugin/business/tsg-http/src/tsg_logger.cpp
index ee28f0d..6aa0c4d 100644
--- a/plugin/business/tsg-http/src/tsg_logger.cpp
+++ b/plugin/business/tsg-http/src/tsg_logger.cpp
@@ -265,7 +265,7 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg)
{
char *request_line=NULL;
struct tfe_http_req_spec req_spec=http->req->req_spec;
- asprintf(&request_line, "%s %s HTTP/%d.%d", http_std_method_to_string(req_spec.method), req_spec.url, http->major_version, http->minor_version);
+ asprintf(&request_line, "%s %s HTTP/%d.%d", http_std_method_to_string(req_spec.method), req_spec.url, http->req->major_version, http->req->minor_version);
cJSON_AddStringToObject(common_obj, "http_request_line", request_line);
free(request_line);
}