]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Use PACKET_* macro instead of UPDATE
authorEric Leblond <eric@regit.org>
Mon, 24 Jun 2013 07:58:42 +0000 (09:58 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 27 Jun 2013 08:30:52 +0000 (10:30 +0200)
Setting the ACTION_DROP flag can be done via PACKET_DROP instead
of using PACKET_UPDATE_ACTION.

src/detect.c
src/stream-tcp.c

index d297b55300ab43aedce03fc3da87bbb8fc423746..1e397101561689c5ab40c66c6725c1e674364a12 100644 (file)
@@ -1342,7 +1342,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
             if (p->flow->flags & FLOW_ACTION_DROP)
             {
                 alert_flags = PACKET_ALERT_FLAG_DROP_FLOW;
-                PACKET_UPDATE_ACTION(p, ACTION_DROP);
+                PACKET_DROP(p);
             }
         }
 
index aa96de3abef073a892dae7b6650256a99379ea75..1aee65c480f290970fe5654986b4d0a900f89547 100644 (file)
@@ -4165,7 +4165,7 @@ static int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt,
         FlowSetNoPacketInspectionFlag(p->flow);
         DecodeSetNoPacketInspectionFlag(p);
         FlowSetSessionNoApplayerInspectionFlag(p->flow);
-        PACKET_UPDATE_ACTION(p, ACTION_DROP);
+        PACKET_DROP(p);
         /* return the segments to the pool */
         StreamTcpSessionPktFree(p);
         SCReturnInt(0);
@@ -4377,7 +4377,7 @@ error:
     }
 
     if (StreamTcpInlineMode()) {
-        PACKET_UPDATE_ACTION(p, ACTION_DROP);
+        PACKET_DROP(p);
     }
     SCReturnInt(-1);
 }