ndpi: ignore packets that have a different proto than the flow

This can happen when the flow is UDP, but an ICMP unreachable is
returned, which gets assigned to the same flow.

Reference: https://github.com/ntop/nDPI/issues/2762
pull/12875/head
Jason Ish 1 year ago committed by Victor Julien
parent 66eb29affd
commit 81915548de

@ -101,6 +101,12 @@ static void OnFlowUpdate(ThreadVars *tv, Flow *f, Packet *p, void *_data)
return;
}
/* Ignore packets that have a different protocol than the
* flow. This can happen with ICMP unreachable packets. */
if (p->proto != f->proto) {
return;
}
if (PacketIsIPv4(p)) {
const IPV4Hdr *ip4h = PacketGetIPv4(p);
ip_len = IPV4_GET_RAW_IPLEN(ip4h);

Loading…
Cancel
Save