Skip to content

Commit

Permalink
filestore: don't assume flow is TCP
Browse files Browse the repository at this point in the history
Filestore can be used by UDP based protocols as well. NFSv2 is one
that Suricata supports.

Bug OISF#3277.
  • Loading branch information
victorjulien committed Nov 2, 2019
1 parent 2a55afb commit 0824b04
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/detect-filestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0824b04

Please sign in to comment.