File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,14 @@ int OVPNPlugin::pre_update(Flow &rec, Packet &pkt)
206206void OVPNPlugin::pre_export (Flow &rec)
207207{
208208 RecordExtOVPN *vpn_data = (RecordExtOVPN *) rec.get_extension (RecordExtOVPN::REGISTERED_ID);
209+
210+ // do not export ovpn for short flows, usually port scans
211+ uint32_t packets = rec.src_packets + rec.dst_packets ;
212+ if (packets <= 5 ) {
213+ rec.remove_extension (RecordExtOVPN::REGISTERED_ID);
214+ return ;
215+ }
216+
209217 if (vpn_data->pkt_cnt > min_pckt_treshold && vpn_data->status == status_data) {
210218 vpn_data->possible_vpn = 100 ;
211219 } else if (vpn_data->pkt_cnt > min_pckt_treshold && ((double ) vpn_data->data_pkt_cnt / (double ) vpn_data->pkt_cnt ) >= data_pckt_treshold) {
You can’t perform that action at this time.
0 commit comments