diff options
author | Luca Deri <deri@ntop.org> | 2020-01-08 22:01:45 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-01-08 22:01:45 +0100 |
commit | 3ba7667887f2b9fb3754e15b9fb8fc25d6568475 (patch) | |
tree | b3145aee95f9d9d6029ed0be9e4f33842d2ca8e0 /src/lib/protocols/rtp.c | |
parent | fd943d6000316cdab5588558090bce0b2242f2f3 (diff) |
Various ethereum improvements
Diffstat (limited to 'src/lib/protocols/rtp.c')
-rw-r--r-- | src/lib/protocols/rtp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/protocols/rtp.c b/src/lib/protocols/rtp.c index 8074779dd..acea41b54 100644 --- a/src/lib/protocols/rtp.c +++ b/src/lib/protocols/rtp.c @@ -124,12 +124,17 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct, void ndpi_search_rtp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; - + u_int16_t source = ntohs(packet->udp->source); + u_int16_t dest = ntohs(packet->udp->dest); + + // printf("==> %s()\n", __FUNCTION__); + /* printf("*** %s(pkt=%d)\n", __FUNCTION__, flow->packet_counter); */ if((packet->udp != NULL) - /* && (ntohs(packet->udp->source) > 1023) */ - && (ntohs(packet->udp->dest) > 1023)) + && (source != 30303) && (dest != 30303 /* Avoid to mix it with Ethereum that looks alike */) + && (dest > 1023) + ) ndpi_rtp_search(ndpi_struct, flow, packet->payload, packet->payload_packet_len); } |