Flag the last flow timeout pseudo packet so that we can force
TX logging w/o setting both app-layer flags.
Case this fixes:
1. flow times out when only TS TCP data received, but non of it is ACK'd.
So there is no app-layer proto yet, or app state or Flow::alparser. So
EOF flags can't be set.
2. Flow timeout sees no reason to create pseudo packet in TC direction.
3. TS pseudo packet finds HTTP, creates HTTP state, flag EOF TS.
4. TX logging skips HTTP logging because:
- TC progress not reached
- EOF TC flag not set.
The solution has been to flag the very last packet for the flow as such
and use it has a master-EOF flag.
When the stream engine has data ready for the app-layer it will call
this API from a loop instead of just once. The loop is to ensure that
if we have a very lossy stream where between 'app_progress' and
'last_ack' there are multiple chunks of data and multiple gaps we
process all the chunks.
Elastic search didn't accept the 'hassh' and 'hassh.string'. It would
see the first 'hassh' as a string and split the second key into a
object 'hassh' with a string member 'string'. So two different types
for 'hassh', so it rejected it.
This patch mimics the ja3(s) logging by creating a 'hassh' object
with 2 members: 'hash', which holds the md5 representation, and
'string' which holds the string representation.
In case of lossy connections the NFS state would properly clean up
transactions, including file transactions. However for files the
state was never set to 'truncated', leading to files to stay 'active'.
This would lead these files staying in the NFS's state. In long running
sessions with lots of files this would lead to performance and memory
use issues.
This patch cleans truncates the file that was being transmitted when
a file transaction is being closed.
Based on 65e9a7c31c