Skip to content

Commit

Permalink
ndpiReader: fix VXLAN de-tunneling
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanNardi committed Mar 23, 2023
1 parent ddb9aa0 commit 2290428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/reader_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,7 @@ int ndpi_is_datalink_supported(int datalink_type) {
}

static bool ndpi_is_valid_vxlan(const struct pcap_pkthdr *header, const u_char *packet, u_int16_t ip_offset, u_int16_t ip_len){
if(header->caplen < ip_offset + ip_len + sizeof(struct ndpi_vxlanhdr)) {
if(header->caplen < ip_offset + ip_len + sizeof(struct ndpi_udphdr) + sizeof(struct ndpi_vxlanhdr)) {
return false;
}
u_int32_t vxlan_dst_port = ntohs(4789);
Expand Down

0 comments on commit 2290428

Please sign in to comment.