diff options
| author | 刘学利 <[email protected]> | 2023-05-26 07:23:57 +0000 |
|---|---|---|
| committer | 刘学利 <[email protected]> | 2023-05-26 07:23:57 +0000 |
| commit | 7bd3fe594c32e865a3ab066d49326d0e5001b34b (patch) | |
| tree | d532e104346a10f5e181dfa187dbf01977a7b60e /src/tsg_rule.cpp | |
| parent | b9e33e36bb89141c5acd66d8db834ab3a47a8081 (diff) | |
TSG-15187: 增加遗漏的category的库表注册v6.0.12
Diffstat (limited to 'src/tsg_rule.cpp')
| -rw-r--r-- | src/tsg_rule.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 7759912..619a62d 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -1805,6 +1805,11 @@ int init_scan_table(struct maat *feather, const char *conffile) MESA_load_profile_string_def(conffile, "MAAT", "TUNNEL_ID_TABLE", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_TUNNEL_ID].name, MAX_TABLE_NAME_LEN, "TSG_SECURITY_TUNNEL"); MESA_load_profile_string_def(conffile, "MAAT", "SESSION_FLAG_TABLE", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_SESSION_FLAGS].name, MAX_TABLE_NAME_LEN, "TSG_SECURITY_FLAG"); + MESA_load_profile_string_def(conffile, "MAAT", "HTTP_HOST_CAT", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_HTTP_HOST_CAT].name, MAX_TABLE_NAME_LEN, "TSG_FIELD_HTTP_HOST_CAT"); + MESA_load_profile_string_def(conffile, "MAAT", "SSL_SNI_CAT", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_SSL_SNI_CAT].name, MAX_TABLE_NAME_LEN, "TSG_FIELD_SSL_SNI_CAT"); + MESA_load_profile_string_def(conffile, "MAAT", "QUIC_SNI_CAT", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_QUIC_SNI_CAT].name, MAX_TABLE_NAME_LEN, "TSG_FIELD_QUIC_SNI_CAT"); + MESA_load_profile_string_def(conffile, "MAAT", "DTLS_SNI_CAT", g_tsg_maat_rt_para.scan_tb[MAAT_SCAN_DTLS_SNI_CAT].name, MAX_TABLE_NAME_LEN, "TSG_FIELD_DTLS_SNI_CAT"); + for(int i=0; i<MAAT_SCAN_MAX; i++) { g_tsg_maat_rt_para.scan_tb[i].id=maat_get_table_id(feather, g_tsg_maat_rt_para.scan_tb[i].name); @@ -3089,7 +3094,7 @@ size_t tsg_select_rules_by_service_id(struct maat_rule *matched_rules, size_t n_ return offset; } -int tsg_table_idx_get_by_protocol(TSG_PROTOCOL proto) +int tsg_domain_table_idx_get(enum TSG_PROTOCOL proto) { switch(proto) { @@ -3108,6 +3113,25 @@ int tsg_table_idx_get_by_protocol(TSG_PROTOCOL proto) return -1; } +int tsg_fqdn_category_table_idx_get(enum TSG_PROTOCOL proto) +{ + switch(proto) + { + case PROTO_HTTP: + return MAAT_SCAN_HTTP_HOST_CAT; + case PROTO_SSL: + return MAAT_SCAN_SSL_SNI_CAT; + case PROTO_QUIC: + return MAAT_SCAN_QUIC_SNI_CAT; + case PROTO_DTLS: + return MAAT_SCAN_DTLS_SNI_CAT; + default: + break; + } + + return -1; +} + int tsg_http_url_table_idx_get(void) { return MAAT_SCAN_HTTP_URL; |
