TSG-22773 TFE适配TRAFFIC_MIRROR_PROFILE/PROXY_TCP_OPTION库表变更
This commit is contained in:
@@ -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);
|
struct tcp_policy_enforcer *enforcer = ALLOC(struct tcp_policy_enforcer, 1);
|
||||||
enforcer->maat = tfe_get_maat_handle();
|
enforcer->maat = tfe_get_maat_handle();
|
||||||
enforcer->logger = logger;
|
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,
|
ret = maat_plugin_table_ex_schema_register(enforcer->maat, enforcer->table_name,
|
||||||
profile_param_new_cb,
|
profile_param_new_cb,
|
||||||
@@ -245,7 +245,7 @@ struct tcp_policy_enforcer *tcp_policy_enforcer_create(void *logger)
|
|||||||
0, enforcer);
|
0, enforcer);
|
||||||
if (ret < 0)
|
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;
|
goto error_out;
|
||||||
}
|
}
|
||||||
return enforcer;
|
return enforcer;
|
||||||
|
|||||||
@@ -521,13 +521,13 @@ int traffic_mirror_init(struct tfe_proxy * proxy)
|
|||||||
goto errout;
|
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,
|
profile_table_ex_data_new_cb, profile_table_ex_data_free_cb, profile_table_ex_data_dup_cb,
|
||||||
0, instance);
|
0, instance);
|
||||||
|
|
||||||
if (unlikely(result < 0))
|
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;
|
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)
|
if (policy_ex_data->is_profile_set)
|
||||||
{
|
{
|
||||||
uuid_unparse(policy_ex_data->profile_uuid, profile_uuid_str);
|
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)
|
if (!profile_ex_data)
|
||||||
{
|
{
|
||||||
TFE_LOG_ERROR(instance->logger, "failed at getting policy %s's profile, profile id = %s, "
|
TFE_LOG_ERROR(instance->logger, "failed at getting policy %s's profile, profile id = %s, "
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
],
|
],
|
||||||
"plugin_table": [
|
"plugin_table": [
|
||||||
{
|
{
|
||||||
"table_name": "TRAFFIC_MIRROR_PROFILE",
|
"table_name": "TRAFFIC_MIRRORING_PROFILE",
|
||||||
"table_content": [
|
"table_content": [
|
||||||
{"uuid":"TRAFFIC0-MIRR-0000-0000-000000000001","vlan_ids":[1,2,3,4,5,6,7,8,9],"is_valid":1}
|
{"uuid":"TRAFFIC0-MIRR-0000-0000-000000000001","vlan_ids":[1,2,3,4,5,6,7,8,9],"is_valid":1}
|
||||||
]
|
]
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"table_name": "PROXY_TCP_OPTION",
|
"table_name": "PROXY_TCP_OPTION_PROFILE",
|
||||||
"table_content": [
|
"table_content": [
|
||||||
{"uuid":"TCPOPT00-0000-0000-0000-000000000001","tcp_passthrough":0,"bypass_duplicated_packet":0,"client_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"server_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"is_valid":1}
|
{"uuid":"TCPOPT00-0000-0000-0000-000000000001","tcp_passthrough":0,"bypass_duplicated_packet":0,"client_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"server_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"is_valid":1}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
],
|
],
|
||||||
"plugin_table": [
|
"plugin_table": [
|
||||||
{
|
{
|
||||||
"table_name": "TRAFFIC_MIRROR_PROFILE",
|
"table_name": "TRAFFIC_MIRRORING_PROFILE",
|
||||||
"table_content": [
|
"table_content": [
|
||||||
{"uuid":"TRAFFIC0-MIRR-0000-0000-000000000001","vlan_ids":[1,2,3,4,5,6,7,8,9],"is_valid":1}
|
{"uuid":"TRAFFIC0-MIRR-0000-0000-000000000001","vlan_ids":[1,2,3,4,5,6,7,8,9],"is_valid":1}
|
||||||
]
|
]
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"table_name": "PROXY_TCP_OPTION",
|
"table_name": "PROXY_TCP_OPTION_PROFILE",
|
||||||
"table_content": [
|
"table_content": [
|
||||||
{"uuid":"TCPOPT00-0000-0000-0000-000000000001","tcp_passthrough":0,"bypass_duplicated_packet":0,"client_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"server_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"is_valid":1}
|
{"uuid":"TCPOPT00-0000-0000-0000-000000000001","tcp_passthrough":0,"bypass_duplicated_packet":0,"client_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"server_side_conn_param":{"tcp_maxseg":{"enable":0,"maxseg":1500},"nodelay":1,"keep_alive":{"enable":1,"tcp_keepcnt":8,"tcp_keepidle":30,"tcp_keepintvl":15},"ttl":70,"user_timeout":{"enable":1,"timeout_ms":600}},"is_valid":1}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"table_id":20,
|
"table_id":20,
|
||||||
"table_name":"TRAFFIC_MIRROR_PROFILE",
|
"table_name":"TRAFFIC_MIRRORING_PROFILE",
|
||||||
"table_type":"plugin",
|
"table_type":"plugin",
|
||||||
"custom": {
|
"custom": {
|
||||||
"key_type":"pointer",
|
"key_type":"pointer",
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"table_id":24,
|
"table_id":24,
|
||||||
"table_name":"PROXY_TCP_OPTION",
|
"table_name":"PROXY_TCP_OPTION_PROFILE",
|
||||||
"table_type":"plugin",
|
"table_type":"plugin",
|
||||||
"custom": {
|
"custom": {
|
||||||
"key_type":"pointer",
|
"key_type":"pointer",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"table_id":1,
|
"table_id":1,
|
||||||
"table_name":"TRAFFIC_MIRROR_PROFILE",
|
"table_name":"TRAFFIC_MIRRORING_PROFILE",
|
||||||
"table_type":"plugin",
|
"table_type":"plugin",
|
||||||
"custom": {
|
"custom": {
|
||||||
"key_type":"pointer",
|
"key_type":"pointer",
|
||||||
|
|||||||
Reference in New Issue
Block a user