APP_ID域表intval匹配模式修改
This commit is contained in:
@@ -203,7 +203,7 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
|
||||
{
|
||||
int hit_cnt = 0;
|
||||
int scan_ret = 0;
|
||||
const char *app_id = "doh.";
|
||||
int app_id = 135;
|
||||
struct ipaddr sapp_addr;
|
||||
struct Maat_rule_t *p_result = NULL;
|
||||
struct Maat_rule_t result[MAX_SCAN_RESULT];
|
||||
@@ -213,7 +213,7 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
|
||||
{
|
||||
hit_cnt += scan_ret;
|
||||
}
|
||||
|
||||
|
||||
scan_ret = tfe_scan_ip_location(stream, result, &(ctx->scan_mid), hit_cnt, ctx->thread_id, g_doh_conf->local_logger, ctx->addr_string, &(ctx->location_server), &(ctx->location_client));
|
||||
if (scan_ret > 0)
|
||||
{
|
||||
@@ -262,17 +262,16 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
|
||||
}
|
||||
|
||||
// scan appid
|
||||
scan_ret = Maat_full_scan_string(g_doh_conf->maat, g_doh_conf->tables[TYPE_APPID].id, CHARSET_UTF8,
|
||||
app_id, strlen(app_id), result + hit_cnt, NULL, MAX_SCAN_RESULT - hit_cnt, &(ctx->scan_mid), ctx->thread_id);
|
||||
scan_ret=Maat_scan_intval(g_doh_conf->maat, g_doh_conf->tables[TYPE_APPID].id, app_id, result + hit_cnt, MAX_SCAN_RESULT - hit_cnt, &(ctx->scan_mid), ctx->thread_id);
|
||||
if (scan_ret > 0)
|
||||
{
|
||||
TFE_LOG_INFO(g_doh_conf->local_logger, "Scan %s, Hit proto: %s scan ret: %d policy_id: %d service: %d action: %d addr: %s",
|
||||
TFE_LOG_INFO(g_doh_conf->local_logger, "Scan %s, Hit proto: %d scan ret: %d policy_id: %d service: %d action: %d addr: %s",
|
||||
g_doh_conf->tables[TYPE_APPID].name, app_id, scan_ret, result[hit_cnt].config_id, result[hit_cnt].service_id, result[hit_cnt].action, ctx->addr_string);
|
||||
hit_cnt += scan_ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
TFE_LOG_INFO(g_doh_conf->local_logger, "Scan %s, NO hit proto: %s scan ret: %d addr: %s",
|
||||
TFE_LOG_INFO(g_doh_conf->local_logger, "Scan %s, NO hit proto: %d scan ret: %d addr: %s",
|
||||
g_doh_conf->tables[TYPE_APPID].name, app_id, scan_ret, ctx->addr_string);
|
||||
}
|
||||
|
||||
@@ -678,7 +677,7 @@ int doh_on_data(const struct tfe_stream *stream, const struct tfe_http_session *
|
||||
* may either be an explicit media type (e.g. ct=application/dns-
|
||||
* udpwireformat&dns=...) or it may be empty. An empty value indicates
|
||||
* the default application/dns-udpwireformat type (e.g. ct&dns=...).
|
||||
*
|
||||
*
|
||||
* NOTE: evhttp_parse_query_str()
|
||||
* support "ct=x&dns=xxx"
|
||||
* support "ct=&dns=xxx"
|
||||
|
||||
Reference in New Issue
Block a user