Filestore can be used by UDP based protocols as well. NFSv2 is one
that Suricata supports.
Bug #3277.
#endif
}
- /* set filestore depth for stream reassembling */
- TcpSession *ssn = (TcpSession *)p->flow->protoctx;
- TcpSessionSetReassemblyDepth(ssn, FileReassemblyDepth());
-
+ if (p->proto == IPPROTO_TCP && p->flow->protoctx != NULL) {
+ /* set filestore depth for stream reassembling */
+ TcpSession *ssn = (TcpSession *)p->flow->protoctx;
+ TcpSessionSetReassemblyDepth(ssn, FileReassemblyDepth());
+ }
if (p->flowflags & FLOW_PKT_TOCLIENT)
flags |= STREAM_TOCLIENT;
else