summaryrefslogtreecommitdiff
path: root/plugin/business/doh
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2023-12-26 17:13:03 +0800
committerfengweihao <[email protected]>2023-12-26 17:13:03 +0800
commit21bbd4e1f724506514c776a89dd0af936bd313e5 (patch)
tree16c80b707ef07039795f76d065f525dbf9f9e191 /plugin/business/doh
parentf69de9f4e3d5abff660220e86e164e83ca18aff7 (diff)
TSG-18165 Manipulation日志中 Subscriber ID值为空
Diffstat (limited to 'plugin/business/doh')
-rw-r--r--plugin/business/doh/src/logger.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugin/business/doh/src/logger.cpp b/plugin/business/doh/src/logger.cpp
index 9cbaab4..8381e26 100644
--- a/plugin/business/doh/src/logger.cpp
+++ b/plugin/business/doh/src/logger.cpp
@@ -335,7 +335,8 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
cJSON_AddStringToObject(common_obj, "doh_version", app_proto[http->major_version]);
cJSON_AddStringToObject(common_obj, "decoded_as", "DoH");
- char opt_val[24] = { 0 };
+ char opt_val[24]={0};
+ char source_subscribe_id[64]={0};
uint16_t opt_out_size;
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(stream);
if (cmsg != NULL)
@@ -345,6 +346,11 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
{
cJSON_AddStringToObject(common_obj, "session_id", opt_val);
}
+ ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_SRC_SUB_ID, (unsigned char *)source_subscribe_id, sizeof(source_subscribe_id), &opt_out_size);
+ if (ret==0)
+ {
+ cJSON_AddStringToObject(common_obj, "subscriber_id", source_subscribe_id);
+ }
}
if (http->req)