I have a pcap for which stream isn't getting reassembled.
I think it would happen for cases, where you have some app payload which isn't supported by our engine(this is before we have detected the alproto for the flow), whose length exceeds AlpProtoDetectCtx.toserver.max_len.
For example, in case of the smb pcap, we start with the netbios payload, whose length is 72 bytes which exceeds the 64 byte max depth within which our engine currently searches for all app layer protos in the payload. Since we don't have a match here, we get ALPROTO_UNKNOWN and also the StreamMsg data length is greater than AlpProtoDetectCtx.toserver.max_len, because of which we set the no_stream_reassembly flag. You can have a look at app-layer.c:164.
We should have a match on the smb part of the stream, right? Is that not happening?
Can you attach (part of) the pcap?
Frame 4, we receive a netbios header without the smb data. The subsequent frames which have smb, have the netbios section(4 bytes) as well. But it is this first frame with the netbios header and without the smb part, that is setting the no_reassembly flag.
The 72 bytes Netbios packet is sent by the client in the start of the session. This makes the sig for SMB proto detection to fail and also as the max_len for the proto detection is 64, it passes that limit too and result in ALPROTO_UNKNOWN and also no reassembly flag has been set.
So I guess Kirby can suggest the exact modification needed for the SMB session detection in such a scenario. As far as stream reassembly is in question, it works fine.