aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/rx.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2016-05-31 12:20:25 +0200
committerLuca Deri <deri@ntop.org>2016-05-31 12:20:25 +0200
commit72efa329db996a45f394457238b218252bae3e00 (patch)
tree16f423dc903291adac3071417ba9cbec64228e68 /src/lib/protocols/rx.c
parenta79b338208566c48d74a453710fef02611f13b8f (diff)
Enhanced fragments support in ndpiReader
Improved RX protocol dissection and removed port guess as it caused false positives.
Diffstat (limited to 'src/lib/protocols/rx.c')
-rw-r--r--src/lib/protocols/rx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/protocols/rx.c b/src/lib/protocols/rx.c
index 505f0627b..9d27d5e18 100644
--- a/src/lib/protocols/rx.c
+++ b/src/lib/protocols/rx.c
@@ -109,7 +109,7 @@ void ndpi_check_rx(struct ndpi_detection_module_struct *ndpi_struct,
**/
/* TYPE field */
- if((header->type < DATA) && (header->type > VERSION)) {
+ if((header->type < DATA) || (header->type > VERSION)) {
NDPI_LOG(NDPI_PROTOCOL_RX, ndpi_struct, NDPI_LOG_DEBUG, "excluding RX\n");
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_RX);
return;
@@ -171,8 +171,7 @@ void ndpi_check_rx(struct ndpi_detection_module_struct *ndpi_struct,
security:
/* SECURITY field */
- if(header->security != 0 && header->security != 1 &&
- header->security != 2 && header->security != 3)
+ if(header->security > 3)
{
NDPI_LOG(NDPI_PROTOCOL_RX, ndpi_struct, NDPI_LOG_DEBUG, "excluding RX\n");
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_RX);