PXY_INTERCEPT_RULE,SERVICE_CHAINING_RULE adapt uuid

This commit is contained in:
wangmenglan
2024-09-25 18:52:27 +08:00
parent 707b418250
commit ad96bf00c1
2 changed files with 54 additions and 57 deletions

View File

@@ -46,10 +46,10 @@ static void chaining_param_new_cb(const char *table_name, const char *key, const
goto error_out;
}
json_subroot = cJSON_GetObjectItem(json_root, "USER_REGION");
json_subroot = cJSON_GetObjectItem(json_root, "action_parameter");
if (unlikely(!json_subroot))
{
TFE_LOG_ERROR(enforcer->logger, "Invalid chaining rule: %s (invalid USER_REGION format) %s.", key, table_line);
TFE_LOG_ERROR(enforcer->logger, "Invalid chaining rule: %s (invalid action_parameter format) %s.", key, table_line);
goto error_out;
}
@@ -139,7 +139,7 @@ struct chaining_policy_enforcer *chaining_policy_enforcer_create(void *logger)
struct chaining_policy_enforcer *enforcer = ALLOC(struct chaining_policy_enforcer, 1);
enforcer->maat = tfe_get_maat_handle();
enforcer->logger = logger;
snprintf(enforcer->table_name, sizeof(enforcer->table_name), "SERVICE_CHAINING_COMPILE");
snprintf(enforcer->table_name, sizeof(enforcer->table_name), "SERVICE_CHAINING_RULE");
ret = maat_plugin_table_ex_schema_register(enforcer->maat, enforcer->table_name,
chaining_param_new_cb,
@@ -148,7 +148,7 @@ struct chaining_policy_enforcer *chaining_policy_enforcer_create(void *logger)
0, enforcer);
if (ret < 0)
{
TFE_LOG_ERROR(enforcer->logger, "failed at register callback of SERVICE_CHAINING_COMPILE, ret = %d", ret);
TFE_LOG_ERROR(enforcer->logger, "failed at register callback of SERVICE_CHAINING_RULE, ret = %d", ret);
goto error_out;
}
return enforcer;