Skip to content

Commit 69db2d9

Browse files
committed
Enhancment: Contrain ovpn data packet on minimal size
1 parent 3515fe2 commit 69db2d9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

process/ovpn.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ void OVPNPlugin::update_record(RecordExtOVPN* vpn_data, const Packet &pkt)
166166
vpn_data->status = status_data;
167167
vpn_data->invalid_pkt_cnt = -1;
168168
}
169-
vpn_data->data_pkt_cnt++;
169+
if(pkt.payload_len_wire > c_min_data_packet_size) {
170+
vpn_data->data_pkt_cnt++;
171+
}
170172
break;
171173

172174
//no opcode

process/ovpn.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class OVPNPlugin : public ProcessPlugin
152152
udp = 17
153153
} e_ip_proto_nbr;
154154

155+
static const uint32_t c_min_data_packet_size = 500;
155156
static const uint32_t c_udp_opcode_index = 0;
156157
static const uint32_t c_tcp_opcode_index = 2;
157158
static const uint32_t min_pckt_treshold = 20;

0 commit comments

Comments
 (0)