]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pcap-log: always pass 'comp' to PcapWrite
authorVictor Julien <vjulien@oisf.net>
Mon, 20 May 2024 18:40:22 +0000 (20:40 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 22 May 2024 18:18:57 +0000 (20:18 +0200)
The variable is always available.

src/log-pcap.c

index dc146728533590578ce73dfafb30ddcfa15ca51c..a275eb38040243226338ec0b17a221c408772900 100644 (file)
@@ -650,11 +650,8 @@ static int PcapLog (ThreadVars *t, void *thread_data, const Packet *p)
     if ((p->flags & PKT_FIRST_ALERTS) && (td->pcap_log->conditional != LOGMODE_COND_ALL)) {
         if (PacketIsTCP(p)) {
             /* dump fake packets for all segments we have on acked by packet */
-#ifdef HAVE_LIBLZ4
             PcapLogDumpSegments(td, comp, p);
-#else
-            PcapLogDumpSegments(td, NULL, p);
-#endif
+
             if (p->flags & PKT_PSEUDO_STREAM_END) {
                 PcapLogUnlock(pl);
                 return TM_ECODE_OK;
@@ -678,17 +675,9 @@ static int PcapLog (ThreadVars *t, void *thread_data, const Packet *p)
 
     if (p->ttype == PacketTunnelChild) {
         rp = p->root;
-#ifdef HAVE_LIBLZ4
         ret = PcapWrite(pl, comp, GET_PKT_DATA(rp), len);
-#else
-        ret = PcapWrite(pl, NULL, GET_PKT_DATA(rp), len);
-#endif
     } else {
-#ifdef HAVE_LIBLZ4
         ret = PcapWrite(pl, comp, GET_PKT_DATA(p), len);
-#else
-        ret = PcapWrite(pl, NULL, GET_PKT_DATA(p), len);
-#endif
     }
     if (ret != TM_ECODE_OK) {
         PCAPLOG_PROFILE_END(pl->profile_write);