aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/ubntac2.c
diff options
context:
space:
mode:
authorCampus <campus@ntop.org>2016-09-16 02:05:14 +0200
committerCampus <campus@ntop.org>2016-09-16 02:05:14 +0200
commitdbb3d8280ea2a5a5697ad8133973838451ef1d6d (patch)
tree88abb4590f5bca528c86bdbe7f0ffea0c1ee599f /src/lib/protocols/ubntac2.c
parent36956ebf683580ca9612975524f15024ff9a3acd (diff)
fix and merge mssql and tds in unique dissector mssql_tds due to latest release + minor fixes
Diffstat (limited to 'src/lib/protocols/ubntac2.c')
-rw-r--r--src/lib/protocols/ubntac2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/protocols/ubntac2.c b/src/lib/protocols/ubntac2.c
index 3015f4211..b465e0a30 100644
--- a/src/lib/protocols/ubntac2.c
+++ b/src/lib/protocols/ubntac2.c
@@ -35,14 +35,16 @@ void ndpi_search_ubntac2(struct ndpi_detection_module_struct *ndpi_struct, struc
NDPI_LOG(NDPI_PROTOCOL_UBNTAC2, ndpi_struct, NDPI_LOG_TRACE, "UBNTAC2 detection... plen:%i %i:%i\n", packet->payload_packet_len, ntohs(packet->udp->source), ntohs(packet->udp->dest));
- if (packet->udp != NULL && packet->payload_packet_len >= 135 &&
- (packet->udp->source == htons(10001) || packet->udp->dest == htons(10001)) &&
- memcmp(&(packet->payload[36]), "UBNT", 4) == 0) {
-
- NDPI_LOG(NDPI_PROTOCOL_UBNTAC2, ndpi_struct, NDPI_LOG_DEBUG, "UBNT AirControl 2 request\n");
-
- ndpi_int_ubntac2_add_connection(ndpi_struct, flow);
- return;
+ if(packet->udp) {
+ if(packet->payload_packet_len >= 135 &&
+ (packet->udp->source == htons(10001) || packet->udp->dest == htons(10001)) &&
+ memcmp(&(packet->payload[36]), "UBNT", 4) == 0) {
+
+ NDPI_LOG(NDPI_PROTOCOL_UBNTAC2, ndpi_struct, NDPI_LOG_DEBUG, "UBNT AirControl 2 request\n");
+
+ ndpi_int_ubntac2_add_connection(ndpi_struct, flow);
+ return;
+ }
}
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_UBNTAC2);