修复读取subscrible id的一些bug
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user