Let travis use pcap files from nDPI to produce some JSON output. (disabled, needs further testing..)

* Added pcap diff script
 * Added \n to JSON string end (useful for debugging and readability)
 * Use first host/server name character for hash calculation as well
 * Removed error'ing EPOLLHUP handling in nDPIsrvd (connection closing will be detected via read())

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2020-11-19 19:34:11 +01:00
parent a9b87e5739
commit f8692c6be1
374 changed files with 59285 additions and 47 deletions

View File

@@ -90,7 +90,8 @@ int main(void)
break;
}
if (buf[json_bytes - 1] != '}')
if (buf[json_bytes - 2] != '}' ||
buf[json_bytes - 1] != '\n')
{
fprintf(stderr, "BUG: Invalid JSON string: %.*s\n", (int)json_bytes, buf);
exit(1);