aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/teredo.c
diff options
context:
space:
mode:
authorDaniele De Lorenzi <daniele.delorenzi@fastnetserv.net>2018-12-20 11:04:03 +0100
committerGitHub <noreply@github.com>2018-12-20 11:04:03 +0100
commit2aea4da9adc3ba87346d01d20bd815004016db4f (patch)
tree91c94e1645640407f32e0cf5b1097444f6f26271 /src/lib/protocols/teredo.c
parent3b1047b0c8136b85010554ac31f7845c68b5898b (diff)
parentd3be349fa0d03477be1c84fad23fcc37df9bcf67 (diff)
Merge pull request #10 from ntop/dev
Repo sync
Diffstat (limited to 'src/lib/protocols/teredo.c')
-rw-r--r--src/lib/protocols/teredo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/protocols/teredo.c b/src/lib/protocols/teredo.c
index 2439f997b..e377d09a4 100644
--- a/src/lib/protocols/teredo.c
+++ b/src/lib/protocols/teredo.c
@@ -1,7 +1,7 @@
/*
* teredo.c
*
- * Copyright (C) 2015 - ntop.org
+ * Copyright (C) 2015-18 - ntop.org
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,8 +20,6 @@
#include "ndpi_protocol_ids.h"
-#ifdef NDPI_PROTOCOL_TEREDO
-
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_TEREDO
#include "ndpi_api.h"
@@ -34,7 +32,7 @@ void ndpi_search_teredo(struct ndpi_detection_module_struct *ndpi_struct, struct
NDPI_LOG_DBG(ndpi_struct,"search teredo\n");
if(packet->udp
&& packet->iph
- && ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */)
+ && ((ntohl(packet->iph->daddr) & 0xF0000000) != 0xE0000000 /* Not a multicast address */)
&& ((ntohs(packet->udp->source) == 3544) || (ntohs(packet->udp->dest) == 3544))
&& (packet->payload_packet_len >= 40 /* IPv6 header */)) {
NDPI_LOG_INFO(ndpi_struct,"found teredo\n");
@@ -57,4 +55,3 @@ void init_teredo_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_i
*id += 1;
}
-#endif