fix and improved netflix detection by user-agent

This commit is contained in:
Campus
2017-02-22 17:14:52 +01:00
parent c2c92b2e9b
commit a787287bfa
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* ndpiReader.c
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-17 - 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
+6 -5
View File
@@ -1,8 +1,7 @@
/*
* http.c
*
* Copyright (C) 2009-2011 by ipoque GmbH
* Copyright (C) 2011-15 - ntop.org
* Copyright (C) 2011-17 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
@@ -326,8 +325,12 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
}
}
}
else if(memcmp(ua, "netflix-ios-app", 15) == 0) {
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETFLIX);
return;
}
}
NDPI_LOG(NDPI_PROTOCOL_HTTP, ndpi_struct, NDPI_LOG_DEBUG, "User Agent Type Line found %.*s\n",
packet->user_agent_line.len, packet->user_agent_line.ptr);
}
@@ -419,8 +422,6 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
(char*)packet->content_line.ptr, packet->content_line.len,
NDPI_PROTOCOL_HTTP);
}
/* check user agent here too */
}
static void check_http_payload(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)