增加读取do_log字段, 修改fs2统计
This commit is contained in:
@@ -197,7 +197,8 @@ static int index_of_enforce_policy(struct Maat_rule_t* result, size_t size)
|
||||
return ret_intercept_idx;
|
||||
}
|
||||
|
||||
enum kni_action intercept_policy_scan(struct kni_maat_handle* handle, struct ipaddr *addr, char *domain, int domain_len, int thread_seq, int *policy_id, int *is_hit_policy){
|
||||
enum kni_action intercept_policy_scan(struct kni_maat_handle* handle, struct ipaddr *addr, char *domain, int domain_len,
|
||||
int thread_seq, int *policy_id, int *do_log, int *is_hit_policy){
|
||||
//return KNI_ACTION_INTERCEPT;
|
||||
Maat_feather_t maat_feather=handle->feather;
|
||||
int table_intercept_ip=handle->tableid_intercept_ip;
|
||||
@@ -225,7 +226,8 @@ enum kni_action intercept_policy_scan(struct kni_maat_handle* handle, struct ipa
|
||||
if(hit_policy_cnt>0)
|
||||
{
|
||||
enforced_policy_idx=index_of_enforce_policy(result, hit_policy_cnt);
|
||||
*policy_id=result[enforced_policy_idx].config_id;
|
||||
*policy_id = result[enforced_policy_idx].config_id;
|
||||
*do_log = result[enforced_policy_idx].do_log;
|
||||
*is_hit_policy=1;
|
||||
unsigned char action = (unsigned char)result[enforced_policy_idx].action;
|
||||
return (enum kni_action)action;
|
||||
|
||||
Reference in New Issue
Block a user