aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-07-15 23:53:28 +0200
committerLuca Deri <deri@ntop.org>2019-07-15 23:53:28 +0200
commitf570eccf8143a07475cbd2dd3f4fd9b7261d1298 (patch)
tree0361fb44f0e51cbf700296762555326d44f0ee80 /src/lib/protocols
parent67dfddd0659916c9b477a09df284eff764c845f5 (diff)
Fixes #741
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/hangout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/protocols/hangout.c b/src/lib/protocols/hangout.c
index fc94aad5f..a9b63a021 100644
--- a/src/lib/protocols/hangout.c
+++ b/src/lib/protocols/hangout.c
@@ -62,8 +62,12 @@ static u_int8_t is_google_flow(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_packet_struct *packet = &flow->packet;
if(packet->iph) {
- if(google_ptree_match(ndpi_struct, (struct in_addr *)&packet->iph->saddr)
- || google_ptree_match(ndpi_struct, (struct in_addr *)&packet->iph->daddr)) {
+ struct in_addr saddr, daddr;
+
+ saddr.s_addr = packet->iph->saddr, daddr.s_addr = packet->iph->daddr;
+
+ if(google_ptree_match(ndpi_struct, &saddr)
+ || google_ptree_match(ndpi_struct, &daddr)) {
return(1);
}
}