Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/NetworkInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3417,11 +3417,19 @@ bool NetworkInterface::dissectPacket(
*/
u_short eth_type;
ip_offset = ip_offset + ip_len + sizeof(struct ndpi_udphdr);

if ((ip_offset + 1) >= h->caplen) {
incStats(ingressPacket, h->ts.tv_sec, 0, NDPI_PROTOCOL_UNKNOWN,
NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, 0, len_on_wire, 1,
NULL /* srcMac */, NULL /* dstMac */);
goto dissect_packet_end;
}

u_int8_t capwap_header_len =
((*(u_int8_t*)&packet[ip_offset + 1]) >> 3) * 4;
ip_offset = ip_offset + capwap_header_len + 24 + 8;

if (ip_offset >= h->len) {
if (ip_offset >= h->caplen) {
incStats(ingressPacket, h->ts.tv_sec, 0, NDPI_PROTOCOL_UNKNOWN,
NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, 0, len_on_wire, 1,
NULL /* srcMac */, NULL /* dstMac */);
Expand Down
Loading