TSG-14704 用户自定义域中带有特殊字符策略无法生效
TSG-14703 扫描ip和app_id后策略没有执行
This commit is contained in:
@@ -60,57 +60,57 @@ static struct maat *create_maat_feather(const char *instance_name, const char *p
|
||||
maat_options_set_caller_thread_number(opts, max_thread);
|
||||
switch (input_mode)
|
||||
{
|
||||
case MAAT_INPUT_JSON:
|
||||
if (!strlen(json_cfg_file))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid json_cfg_file, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_json_file(opts, json_cfg_file);
|
||||
break;
|
||||
case MAAT_INPUT_REDIS:
|
||||
if (!strlen(redis_server))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid maat_redis_server, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
case MAAT_INPUT_JSON:
|
||||
if (!strlen(json_cfg_file))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid json_cfg_file, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_json_file(opts, json_cfg_file);
|
||||
break;
|
||||
case MAAT_INPUT_REDIS:
|
||||
if (!strlen(redis_server))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid maat_redis_server, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
ret = sscanf(redis_port_range, "%d-%d", &redis_port_begin, &redis_port_end);
|
||||
if (ret == 1)
|
||||
{
|
||||
redis_port_select = redis_port_begin;
|
||||
}
|
||||
else if (ret == 2)
|
||||
{
|
||||
srand(time(NULL));
|
||||
redis_port_select = redis_port_begin + rand() % (redis_port_end - redis_port_begin);
|
||||
}
|
||||
else
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid redis port range %s, MAAT init failed.", redis_port_range);
|
||||
ret = sscanf(redis_port_range, "%d-%d", &redis_port_begin, &redis_port_end);
|
||||
if (ret == 1)
|
||||
{
|
||||
redis_port_select = redis_port_begin;
|
||||
}
|
||||
else if (ret == 2)
|
||||
{
|
||||
srand(time(NULL));
|
||||
redis_port_select = redis_port_begin + rand() % (redis_port_end - redis_port_begin);
|
||||
}
|
||||
else
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid redis port range %s, MAAT init failed.", redis_port_range);
|
||||
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_redis(opts, redis_server, redis_port_select, redis_db_idx);
|
||||
break;
|
||||
case MAAT_INPUT_FILE:
|
||||
if (!strlen(ful_cfg_dir))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid ful_cfg_dir, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_redis(opts, redis_server, redis_port_select, redis_db_idx);
|
||||
break;
|
||||
case MAAT_INPUT_FILE:
|
||||
if (!strlen(ful_cfg_dir))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid ful_cfg_dir, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if (!strlen(inc_cfg_dir))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid inc_cfg_dir, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_iris(opts, ful_cfg_dir, inc_cfg_dir);
|
||||
break;
|
||||
default:
|
||||
TFE_LOG_ERROR(logger, "Invalid MAAT Input Mode: %d.", input_mode);
|
||||
goto error_out;
|
||||
break;
|
||||
if (!strlen(inc_cfg_dir))
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Invalid inc_cfg_dir, MAAT init failed.");
|
||||
goto error_out;
|
||||
}
|
||||
maat_options_set_iris(opts, ful_cfg_dir, inc_cfg_dir);
|
||||
break;
|
||||
default:
|
||||
TFE_LOG_ERROR(logger, "Invalid MAAT Input Mode: %d.", input_mode);
|
||||
goto error_out;
|
||||
break;
|
||||
}
|
||||
maat_options_set_foreign_cont_dir(opts, "./pangu_files");
|
||||
if (maat_stat_on)
|
||||
|
||||
Reference in New Issue
Block a user