diff options
| author | fengweihao <[email protected]> | 2024-11-04 16:27:16 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2024-11-04 16:27:16 +0800 |
| commit | 13ea52d6d1f32d192f4db98ecb1ec46a2cf9f848 (patch) | |
| tree | b81e741fac7036f94bf0eee39d09df2c5d189237 /plugin/business/tsg-http/src | |
| parent | 2b7d35c5c837cdf54f117d280a682057665123bf (diff) | |
TSG-23332 Fix the issue of coredump generated when Proxy executes lua script.v4.10.7-20241104
Diffstat (limited to 'plugin/business/tsg-http/src')
| -rw-r--r-- | plugin/business/tsg-http/src/tsg_http.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/business/tsg-http/src/tsg_http.cpp b/plugin/business/tsg-http/src/tsg_http.cpp index d468699..f98fc31 100644 --- a/plugin/business/tsg-http/src/tsg_http.cpp +++ b/plugin/business/tsg-http/src/tsg_http.cpp @@ -1529,8 +1529,10 @@ void proxy_send_metric_log(const struct tfe_stream * stream, struct proxy_http_c for(i=0; i< ctx->n_enforce; i++) { + char uuid_string[UUID_STRING_SIZE] = {0}; + uuid_unparse(ctx->enforce_rules[i].config_uuid, uuid_string); fieldstat->tags[thread_id][TAG_VSYS_ID].value_longlong = ctx->enforce_rules[i].vsys_id; - fieldstat->tags[thread_id][TAG_RULE_ID].value_str = ctx->enforce_rules[i].config_uuid_string; + fieldstat->tags[thread_id][TAG_RULE_ID].value_str = uuid_string; fieldstat->tags[thread_id][TAG_ACTION].value_str = "manipulate"; if(ctx->enforce_rules[i].action == PX_ACTION_MANIPULATE) { @@ -1891,7 +1893,7 @@ void http_lua(const struct tfe_stream * stream, const struct tfe_http_session * tsg_ctx->events = events; tsg_ctx->session = session; tsg_ctx->local_logger = g_proxy_rt->local_logger; - tsg_ctx->config_uuid_str = ctx->enforce_rules[0].config_uuid_string; + tsg_ctx->config_uuid_str = tfe_strdup(ctx->enforce_rules[0].config_uuid_string); struct tfe_http_half * in_req_half = session->req; struct tfe_http_half * in_resp_half = session->resp; |
