filestore: don't assume flow is TCP

Filestore can be used by UDP based protocols as well. NFSv2 is one
that Suricata supports.

Bug #3277.
pull/4345/head
Victor Julien 7 years ago
parent 2a55afbd89
commit 0824b04134

@ -209,10 +209,11 @@ static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx,
#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

Loading…
Cancel
Save