diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2024-08-21 12:21:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 12:21:03 +0200 |
commit | d6bde4bcd90291351833be09fd0bb0eccc75824b (patch) | |
tree | b804956f37dd154efe39d8e88debb510f4452ddb /src/lib | |
parent | 5610145c6c2f0aebd6adee7717145ab44c29f848 (diff) |
Removed unnecessary includes (#2525)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index b64b928a1..b285bbb22 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6521,8 +6521,8 @@ static u_int8_t ndpi_detection_get_l4_internal(struct ndpi_detection_module_stru iph = (const struct ndpi_iphdr *) l3; - if(iph->version == IPVERSION && iph->ihl >= 5) { - NDPI_LOG_DBG2(ndpi_str, "ipv4 header\n"); + if((iph->version == 4 /* IPVERSION */) && (iph->ihl >= 5)) { + NDPI_LOG_DBG2(ndpi_str, "IPv4 header\n"); } else if(iph->version == 6 && l3_len >= sizeof(struct ndpi_ipv6hdr)) { NDPI_LOG_DBG2(ndpi_str, "ipv6 header\n"); @@ -6731,7 +6731,7 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str, if(packet->iph != NULL) decaps_iph = packet->iph; - if(decaps_iph && decaps_iph->version == IPVERSION && decaps_iph->ihl >= 5) { + if(decaps_iph && (decaps_iph->version == 4 /* IPVERSION */) && (decaps_iph->ihl >= 5)) { NDPI_LOG_DBG2(ndpi_str, "ipv4 header\n"); } else if(decaps_iph && decaps_iph->version == 6 && l3len >= sizeof(struct ndpi_ipv6hdr) && (ndpi_str->ip_version_limit & NDPI_DETECTION_ONLY_IPV4) == 0) { |