添加对TSG_OBJ_FQDN表注册

修改table_info配置
This commit is contained in:
fengweihao
2019-08-20 18:35:40 +08:00
parent 87734b9320
commit 3a99ba9f13
2 changed files with 23 additions and 20 deletions

View File

@@ -57,6 +57,7 @@ enum scan_table
{
PXY_CTRL_IP,
PXY_CTRL_HTTP_URL,
PXY_CTRL_HTTP_FQDN,
PXY_CTRL_HTTP_REQ_HDR,
PXY_CTRL_HTTP_REQ_BODY,
PXY_CTRL_HTTP_RES_HDR,
@@ -788,6 +789,7 @@ int pangu_policy_init(const char* profile_path, const char* static_section, cons
const char * table_name[__SCAN_TABLE_MAX];
table_name[PXY_CTRL_IP] = "PXY_CTRL_IP";
table_name[PXY_CTRL_HTTP_URL] = "PXY_CTRL_HTTP_URL";
table_name[PXY_CTRL_HTTP_FQDN] = "TSG_OBJ_FQDN";
table_name[PXY_CTRL_HTTP_REQ_HDR] = "PXY_CTRL_HTTP_REQ_HDR";
table_name[PXY_CTRL_HTTP_REQ_BODY] = "TSG_OBJ_CONTENT";
table_name[PXY_CTRL_HTTP_RES_HDR] = "PXY_CTRL_HTTP_RES_HDR";
@@ -1857,7 +1859,7 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht
const char *str_host = session->req->req_spec.host;
int str_host_length = (int) (strlen(session->req->req_spec.host));
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_URL],
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN],
CHARSET_UTF8, str_host, str_host_length, result, NULL, MAX_SCAN_RESULT, &(ctx->scan_mid), ctx->thread_id);
if (scan_ret > 0)
{