限速用户自定义字段参数名称变更,修复误释放ratelimit的空间

This commit is contained in:
liuxueli
2021-08-04 19:25:54 +08:00
parent b862d2490d
commit 34aee7ab31
4 changed files with 6 additions and 5 deletions

View File

@@ -499,7 +499,7 @@ static unsigned char do_action_reset(const struct streaminfo *a_stream, Maat_rul
static unsigned char do_action_ratelimit(const struct streaminfo *a_stream, Maat_rule_t *p_result, struct compile_user_region *user_region)
{
struct tcpall_context *context=NULL;
struct leaky_bucket *bucket=create_bucket((double)((user_region->deny->bytes_per_sec)/1000000), user_region->deny->bytes_per_sec, a_stream->threadnum);
struct leaky_bucket *bucket=create_bucket((double)((user_region->deny->bps)/1000000), user_region->deny->bps, a_stream->threadnum);
tsg_set_bucket_to_tcpall(a_stream, &context, bucket, a_stream->threadnum);
context=NULL;