Skip to content

Commit 2fbff88

Browse files
committed
Added min_pckt_export_treshold constant
1 parent 0152a71 commit 2fbff88

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

process/ovpn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void OVPNPlugin::pre_export(Flow &rec)
209209

210210
//do not export ovpn for short flows, usually port scans
211211
uint32_t packets = rec.src_packets + rec.dst_packets;
212-
if (packets <= 5) {
212+
if (packets <= min_pckt_export_treshold) {
213213
rec.remove_extension(RecordExtOVPN::REGISTERED_ID);
214214
return;
215215
}

process/ovpn.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ class OVPNPlugin : public ProcessPlugin
156156
static const uint32_t c_udp_opcode_index = 0;
157157
static const uint32_t c_tcp_opcode_index = 2;
158158
static const uint32_t min_pckt_treshold = 20;
159+
static const uint32_t min_pckt_export_treshold = 5;
159160
static constexpr float data_pckt_treshold = 0.6f;
160161
static const int32_t invalid_pckt_treshold = 4;
161162
static const uint32_t min_opcode = 1;

0 commit comments

Comments
 (0)