Skip to content

Commit ae7f058

Browse files
committed
OVPN: checking datapackets for RTP validity to reduce false positives
1 parent 2c7efb1 commit ae7f058

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

process/ovpn.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void OVPNPlugin::update_record(RecordExtOVPN* vpn_data, const Packet &pkt)
155155
vpn_data->invalid_pkt_cnt = -1;
156156
}
157157

158-
if (pkt.payload_len_wire > c_min_data_packet_size) {
158+
if (pkt.payload_len_wire > c_min_data_packet_size && !check_valid_rtp_header(pkt)) {
159159
vpn_data->data_pkt_cnt++;
160160
}
161161
break;
@@ -165,7 +165,7 @@ void OVPNPlugin::update_record(RecordExtOVPN* vpn_data, const Packet &pkt)
165165
break;
166166
}
167167

168-
if (pkt.payload_len_wire > c_min_data_packet_size) {
168+
if (pkt.payload_len_wire > c_min_data_packet_size && !check_valid_rtp_header(pkt)) {
169169
vpn_data->large_pkt_cnt++;
170170
}
171171

0 commit comments

Comments
 (0)