Skip to content

Commit

Permalink
output: skip files logging for ICMP packets
Browse files Browse the repository at this point in the history
Ticket: OISF#5408
(cherry picked from commit f8bf581)
  • Loading branch information
catenacyber authored and jasonish committed Jul 7, 2022
1 parent a71a474 commit 2c7c7cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/output-filedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ static TmEcode OutputFiledataLog(ThreadVars *tv, Packet *p, void *thread_data)
if (f == NULL || f->alstate == NULL) {
SCReturnInt(TM_ECODE_OK);
}
/* do not log for ICMP packets related to a TCP/UDP flow */
if (p->proto != IPPROTO_TCP && p->proto != IPPROTO_UDP) {
SCReturnInt(TM_ECODE_OK);
}

const bool file_trunc = StreamTcpReassembleDepthReached(p);
if (p->flowflags & FLOW_PKT_TOSERVER) {
Expand Down

0 comments on commit 2c7c7cf

Please sign in to comment.