TSG-22773 TFE适配TRAFFIC_MIRROR_PROFILE/PROXY_TCP_OPTION库表变更

This commit is contained in:
luwenpeng
2024-10-23 15:41:57 +08:00
parent f24a349a42
commit 5c05bf4c2d
6 changed files with 12 additions and 12 deletions

View File

@@ -236,7 +236,7 @@ struct tcp_policy_enforcer *tcp_policy_enforcer_create(void *logger)
struct tcp_policy_enforcer *enforcer = ALLOC(struct tcp_policy_enforcer, 1);
enforcer->maat = tfe_get_maat_handle();
enforcer->logger = logger;
snprintf(enforcer->table_name, sizeof(enforcer->table_name), "PROXY_TCP_OPTION");
snprintf(enforcer->table_name, sizeof(enforcer->table_name), "PROXY_TCP_OPTION_PROFILE");
ret = maat_plugin_table_ex_schema_register(enforcer->maat, enforcer->table_name,
profile_param_new_cb,
@@ -245,7 +245,7 @@ struct tcp_policy_enforcer *tcp_policy_enforcer_create(void *logger)
0, enforcer);
if (ret < 0)
{
TFE_LOG_ERROR(enforcer->logger, "failed at register callback of PROXY_TCP_OPTION, ret = %d", ret);
TFE_LOG_ERROR(enforcer->logger, "failed at register callback of PROXY_TCP_OPTION_PROFILE, ret = %d", ret);
goto error_out;
}
return enforcer;

View File

@@ -521,13 +521,13 @@ int traffic_mirror_init(struct tfe_proxy * proxy)
goto errout;
}
result = maat_plugin_table_ex_schema_register(instance->maat_feather, "TRAFFIC_MIRROR_PROFILE",
result = maat_plugin_table_ex_schema_register(instance->maat_feather, "TRAFFIC_MIRRORING_PROFILE",
profile_table_ex_data_new_cb, profile_table_ex_data_free_cb, profile_table_ex_data_dup_cb,
0, instance);
if (unlikely(result < 0))
{
TFE_LOG_ERROR(instance->logger, "failed at Maat_plugin_EX_register(TRAFFIC_MIRROR_PROFILE)");
TFE_LOG_ERROR(instance->logger, "failed at Maat_plugin_EX_register(TRAFFIC_MIRRORING_PROFILE)");
goto errout;
}
@@ -610,7 +610,7 @@ int traffic_mirror_on_open_cb(const struct tfe_stream * stream, unsigned int thr
if (policy_ex_data->is_profile_set)
{
uuid_unparse(policy_ex_data->profile_uuid, profile_uuid_str);
profile_ex_data = (struct profile_table_ex_data *)maat_plugin_table_get_ex_data(instance->maat_feather, "TRAFFIC_MIRROR_PROFILE", (const char *)profile_uuid_str, strlen(profile_uuid_str));
profile_ex_data = (struct profile_table_ex_data *)maat_plugin_table_get_ex_data(instance->maat_feather, "TRAFFIC_MIRRORING_PROFILE", (const char *)profile_uuid_str, strlen(profile_uuid_str));
if (!profile_ex_data)
{
TFE_LOG_ERROR(instance->logger, "failed at getting policy %s's profile, profile id = %s, "