Fix compilation and sync unit tests results (#1445)

'strcasestr' is not defined in all enviroments: quicker fix is to use
'ndpi_strncasestr' instead.
This commit is contained in:
Ivan Nardi
2022-02-19 19:18:02 +01:00
committed by GitHub
parent a2878af1ee
commit f28a3b293e
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -464,8 +464,8 @@ static void ndpi_check_user_agent(struct ndpi_detection_module_struct *ndpi_stru
*/
if((strstr(ua, "+http") != NULL)
|| (strstr(ua, " http") != NULL)
|| strcasestr(ua, "Crawler")
|| strcasestr(ua, "Bot") /* bot/robot */
|| ndpi_strncasestr(ua, "Crawler", strlen(ua))
|| ndpi_strncasestr(ua, "Bot", strlen(ua)) /* bot/robot */
) {
ndpi_set_risk(ndpi_struct, flow, NDPI_HTTP_CRAWLER_BOT);
}