diff options
author | Luca Deri <deri@ntop.org> | 2021-02-10 19:09:11 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-02-10 19:09:11 +0100 |
commit | ea0309d21b168d70b853986a342d08966012d07b (patch) | |
tree | 2b18956ccd7ab817ab23983c424b73de25495d3d /src/lib/protocols | |
parent | 76ac551ed385ad6e0e346b05b5c94dd7a00e693b (diff) |
Removed now obsolete NDPI_DETECTION_SUPPORT_IPV6: code is more readeable now
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/dns.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/non_tcp_udp.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/tcp_udp.c | 4 | ||||
-rw-r--r-- | src/lib/protocols/wsd.c | 2 |
4 files changed, 0 insertions, 10 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c index ef2a25597..01bea14ff 100644 --- a/src/lib/protocols/dns.c +++ b/src/lib/protocols/dns.c @@ -290,9 +290,7 @@ static int search_valid_dns(struct ndpi_detection_module_struct *ndpi_struct, } if((((rsp_type == 0x1) && (data_len == 4)) /* A */ -#ifdef NDPI_DETECTION_SUPPORT_IPV6 || ((rsp_type == 0x1c) && (data_len == 16)) /* AAAA */ -#endif )) { memcpy(&flow->protos.dns.rsp_addr, flow->packet.payload + x, data_len); } diff --git a/src/lib/protocols/non_tcp_udp.c b/src/lib/protocols/non_tcp_udp.c index 1784f11d2..46ff4e67b 100644 --- a/src/lib/protocols/non_tcp_udp.c +++ b/src/lib/protocols/non_tcp_udp.c @@ -43,9 +43,7 @@ void ndpi_search_in_non_tcp_udp(struct ndpi_detection_module_struct struct ndpi_packet_struct *packet = &flow->packet; if (packet->iph == NULL) { -#ifdef NDPI_DETECTION_SUPPORT_IPV6 if (packet->iphv6 == NULL) -#endif return; } diff --git a/src/lib/protocols/tcp_udp.c b/src/lib/protocols/tcp_udp.c index 3d6d14d13..b167b08e4 100644 --- a/src/lib/protocols/tcp_udp.c +++ b/src/lib/protocols/tcp_udp.c @@ -73,11 +73,7 @@ void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, st proto = ndpi_search_tcp_or_udp_raw(ndpi_struct, flow, flow->packet.iph ? flow->packet.iph->protocol : -#ifdef NDPI_DETECTION_SUPPORT_IPV6 flow->packet.iphv6->ip6_hdr.ip6_un1_nxt, -#else - 0, -#endif ntohl(packet->iph->saddr), ntohl(packet->iph->daddr), sport, dport); diff --git a/src/lib/protocols/wsd.c b/src/lib/protocols/wsd.c index 8732675b1..c557c7c52 100644 --- a/src/lib/protocols/wsd.c +++ b/src/lib/protocols/wsd.c @@ -37,10 +37,8 @@ void ndpi_search_wsd(struct ndpi_detection_module_struct *ndpi_struct, if(packet->udp && ( (packet->iph && ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */)) -#ifdef NDPI_DETECTION_SUPPORT_IPV6 || (packet->iphv6 && ntohl(packet->iphv6->ip6_dst.u6_addr.u6_addr32[0]) == 0xFF020000) -#endif ) && (ntohs(packet->udp->dest) == WSD_PORT) && (packet->payload_packet_len >= 40) |