修复读取subscrible id的一些bug

This commit is contained in:
崔一鸣
2019-09-25 13:17:35 +08:00
parent 5a32b9ca27
commit 660d2c07c1
2 changed files with 4 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ void subscribe_id_new_cb(int table_id, const char* key, const char* table_line,
int ret = 0;
size_t subscribe_id_offset, len;
void *logger = argp;
ret = get_column_pos(table_line, 7, &subscribe_id_offset, &len);
ret = get_column_pos(table_line, 4, &subscribe_id_offset, &len);
if(ret<0){
KNI_LOG_ERROR(logger, "Add subscribe ID faild: %s", table_line);
return;
@@ -325,6 +325,7 @@ enum kni_action intercept_policy_scan(struct kni_maat_handle* handle, struct ipa
if(scan_ret > 0){
hit_policy_cnt += scan_ret;
}
free(source_subscribe_id);
}
if(dest_subscribe_id != NULL){
scan_ret = Maat_full_scan_string(handle->static_maat, handle->scan_tableid[TSG_OBJ_SUBSCRIBE_ID],
@@ -334,6 +335,7 @@ enum kni_action intercept_policy_scan(struct kni_maat_handle* handle, struct ipa
if(scan_ret > 0){
hit_policy_cnt += scan_ret;
}
free(dest_subscribe_id);
}
//tcp: 6, udp: 17, can't be 0
scan_ret = Maat_scan_proto_addr(handle->static_maat, handle->scan_tableid[PXY_INTERCEPT_IP], addr, 6,