TSG-20185 Proxy支持IP+Port组合object
This commit is contained in:
@@ -34,7 +34,7 @@ env | sort
|
||||
|
||||
# Install dependency from YUM
|
||||
yum install -y mrzcpd-corei7-4.* numactl-devel zlib-devel librdkafka-devel systemd-devel
|
||||
yum install -y libcjson-devel libmaatframe-devel libMESA_field_stat2-devel libfieldstat3-devel libMESA_handle_logger-devel libelua-devel
|
||||
yum install -y libcjson-devel libmaatframe-devel libMESA_field_stat2-devel libfieldstat3-devel libfieldstat4-devel libMESA_handle_logger-devel libelua-devel
|
||||
yum install -y libMESA_htable-devel libMESA_prof_load-devel libwiredcfg-devel libWiredLB-devel sapp-devel libbreakpad_mini-devel
|
||||
yum install -y libasan
|
||||
yum install -y numactl-libs # required by mrzcpd
|
||||
|
||||
@@ -152,7 +152,6 @@ static struct maat *create_maat_feather(const char *instance_name, const char *p
|
||||
maat_options_set_deferred_load_on(opts);
|
||||
}
|
||||
|
||||
maat_options_set_rule_effect_interval_ms(opts, effect_interval);
|
||||
if (strlen(accept_path) > 0)
|
||||
{
|
||||
MESA_load_profile_string_def(accept_path, "maat", "ACCEPT_TAGS", accept_tags, sizeof(accept_tags), "{\"tags\":[{\"tag\":\"device_id\",\"value\":\"device_1\"}]}");
|
||||
|
||||
@@ -434,7 +434,8 @@ int tfe_scan_ipv4_addr(const struct tfe_stream *stream, long long *result, struc
|
||||
{
|
||||
hit_cnt_ip += n_hit_result;
|
||||
}
|
||||
scan_ret = maat_scan_ipv4((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_IP), sapp_addr.v4->saddr,
|
||||
|
||||
scan_ret = maat_scan_ipv4_port((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_IP), sapp_addr.v4->saddr, ntohs(sapp_addr.v4->source),
|
||||
result+hit_cnt+hit_cnt_ip, MAX_SCAN_RESULT-hit_cnt-hit_cnt_ip, &n_hit_result, scan_mid);
|
||||
if (scan_ret == MAAT_SCAN_HIT)
|
||||
{
|
||||
@@ -452,7 +453,7 @@ int tfe_scan_ipv4_addr(const struct tfe_stream *stream, long long *result, struc
|
||||
hit_cnt_ip += scan_ret;
|
||||
}
|
||||
|
||||
scan_ret = maat_scan_ipv4((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_IP), sapp_addr.v4->daddr,
|
||||
scan_ret = maat_scan_ipv4_port((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_IP), sapp_addr.v4->daddr, ntohs(sapp_addr.v4->dest),
|
||||
result+hit_cnt+hit_cnt_ip, MAX_SCAN_RESULT-hit_cnt-hit_cnt_ip, &n_hit_result, scan_mid);
|
||||
if(scan_ret == MAAT_SCAN_HIT)
|
||||
{
|
||||
@@ -489,7 +490,7 @@ int tfe_scan_ipv6_addr(const struct tfe_stream *stream, long long *result, struc
|
||||
hit_cnt_ip += n_hit_result;
|
||||
}
|
||||
|
||||
scan_ret = maat_scan_ipv6((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_IP), sapp_addr.v6->saddr,
|
||||
scan_ret = maat_scan_ipv6_port((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_SOURCE_IP), sapp_addr.v6->saddr, ntohs(sapp_addr.v6->source),
|
||||
result+hit_cnt+hit_cnt_ip, MAX_SCAN_RESULT-hit_cnt-hit_cnt_ip, &n_hit_result, scan_mid);
|
||||
if (scan_ret == MAAT_SCAN_HIT)
|
||||
{
|
||||
@@ -507,7 +508,7 @@ int tfe_scan_ipv6_addr(const struct tfe_stream *stream, long long *result, struc
|
||||
hit_cnt_ip += scan_ret;
|
||||
}
|
||||
|
||||
scan_ret = maat_scan_ipv6((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_IP), sapp_addr.v6->daddr,
|
||||
scan_ret = maat_scan_ipv6_port((struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(PXY_CTRL_DESTINATION_IP), sapp_addr.v6->daddr, ntohs(sapp_addr.v6->dest),
|
||||
result+hit_cnt+hit_cnt_ip, MAX_SCAN_RESULT-hit_cnt-hit_cnt_ip, &n_hit_result, scan_mid);
|
||||
if (scan_ret == MAAT_SCAN_HIT)
|
||||
{
|
||||
|
||||
@@ -414,7 +414,6 @@ static struct maat* maat_feather_create_with_override(const char * instance_name
|
||||
{
|
||||
maat_options_set_deferred_load_on(opts);
|
||||
}
|
||||
maat_options_set_rule_effect_interval_ms(opts, effect_interval);
|
||||
if (strlen(accept_tags) > 0)
|
||||
{
|
||||
maat_options_set_accept_tags(opts, accept_tags);
|
||||
|
||||
@@ -66,15 +66,16 @@
|
||||
"table_id":5,
|
||||
"table_name":"TSG_OBJ_IP",
|
||||
"db_tables":["TSG_OBJ_IP_ADDR","TSG_OBJ_IP_LEARNING_ADDR"],
|
||||
"table_type":"ip_plus",
|
||||
"valid_column":7,
|
||||
"table_type":"ip",
|
||||
"valid_column":8,
|
||||
"custom": {
|
||||
"item_id":1,
|
||||
"group_id":2,
|
||||
"addr_type":3,
|
||||
"addr_format":4,
|
||||
"ip1":5,
|
||||
"ip2":6
|
||||
"ip2":6,
|
||||
"port":7
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user