fixed mdns and tcp/udp protocols after changes
This commit is contained in:
@@ -64,11 +64,11 @@ void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
|||||||
{
|
{
|
||||||
struct ndpi_packet_struct *packet = &flow->packet;
|
struct ndpi_packet_struct *packet = &flow->packet;
|
||||||
|
|
||||||
// struct ndpi_id_struct *src=ndpi_struct->src;
|
// struct ndpi_id_struct *src=ndpi_struct->src;
|
||||||
// struct ndpi_id_struct *dst=ndpi_struct->dst;
|
// struct ndpi_id_struct *dst=ndpi_struct->dst;
|
||||||
|
|
||||||
u_int16_t dport;
|
u_int16_t dport;
|
||||||
// const u_int16_t sport=ntohs(packet->udp->source);
|
// const u_int16_t sport=ntohs(packet->udp->source);
|
||||||
|
|
||||||
/* check if UDP and */
|
/* check if UDP and */
|
||||||
if (packet->udp != NULL) {
|
if (packet->udp != NULL) {
|
||||||
@@ -122,7 +122,7 @@ void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
|||||||
}
|
}
|
||||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||||
if (packet->iphv6 != NULL) {
|
if (packet->iphv6 != NULL) {
|
||||||
const u_int32_t *daddr = packet->iphv6->daddr.ndpi_v6_u.u6_addr32;
|
const u_int32_t *daddr = packet->iphv6->ip6_dst.u6_addr.u6_addr32;
|
||||||
if (daddr[0] == htonl(0xff020000) && daddr[1] == 0 && daddr[2] == 0 && daddr[3] == htonl(0xfb)) {
|
if (daddr[0] == htonl(0xff020000) && daddr[1] == 0 && daddr[2] == 0 && daddr[3] == htonl(0xfb)) {
|
||||||
|
|
||||||
NDPI_LOG(NDPI_PROTOCOL_MDNS, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_MDNS, ndpi_struct,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
proto = ndpi_search_tcp_or_udp_raw(ndpi_struct,
|
proto = ndpi_search_tcp_or_udp_raw(ndpi_struct,
|
||||||
flow->packet.iph ? flow->packet.iph->protocol :
|
flow->packet.iph ? flow->packet.iph->protocol :
|
||||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||||
flow->packet.iphv6->nexthdr,
|
flow->packet.iphv6->ip6_ctlun.ip6_un1.ip6_un1_nxt,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user