aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorZied Aouini <aouinizied@gmail.com>2020-12-12 11:12:59 +0100
committerGitHub <noreply@github.com>2020-12-12 11:12:59 +0100
commit5bd5461f966c5270d8a23ad22f5aab6506c95866 (patch)
treedbcf3208cfeee54a3d3c1d384bf467cf0bdb53ed /example
parent74a77e7b3d4af1a3bebb2628ba551089cefc4e74 (diff)
Fix minimum packet length condition (#1087)
Diffstat (limited to 'example')
-rw-r--r--example/reader_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 8546c427e..c340884a3 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1616,7 +1616,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
datalink_check:
- if(header->caplen < eth_offset + 40)
+ // 20 for min iph and 8 for min UDP
+ if(header->caplen < eth_offset + 28)
return(nproto); /* Too short */
switch(datalink_type) {