diff options
| author | liuxueli <[email protected]> | 2023-03-25 20:13:23 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2023-03-25 20:13:23 +0800 |
| commit | d211aa1811bb8285a717498ac0275c10af4ae066 (patch) | |
| tree | d7c462db91c63737b440877ab967b914e8fdc093 | |
| parent | 3d96907ab7baed0b96eb201231ff392accfe8a8f (diff) | |
TSG-14453: 执行enforce_direction_rule且发送日后立即释放enforce_direction_rule,避免多次执行v5.8.15
| -rw-r--r-- | src/tsg_entry.cpp | 5 | ||||
| -rw-r--r-- | src/tsg_rule.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index ee1bb77..05e04b3 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -2188,7 +2188,10 @@ static unsigned char tsg_master_all_entry(const struct streaminfo *a_stream, uns state=tsg_deal_deny_action(a_stream, all_context->enforce_direction_result, (data_context==NULL ? PROTO_UNKONWN : data_context->proto), ACTION_RETURN_TYPE_APP, a_packet); master_send_log(a_stream, all_context->enforce_direction_result, 1, data_context, thread_seq); - + + dictator_free(thread_seq, all_context->enforce_direction_result); + all_context->enforce_direction_result=NULL; + if(data_context!=NULL) { data_context->is_log=1; diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 229cf22..06b835b 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -3417,7 +3417,7 @@ int tsg_set_bucket_to_tcpall(const struct streaminfo *a_stream, struct tcpall_co { case TSG_METHOD_TYPE_RATE_LIMIT: *context=_context; - return 1; + return 0; break; case TSG_METHOD_TYPE_DEFAULT: case TSG_METHOD_TYPE_UNKNOWN: |
