]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Add a comment for DetectReplaceList
authorKen Steele <ken@tilera.com>
Thu, 6 Feb 2014 15:12:24 +0000 (10:12 -0500)
committerVictor Julien <victor@inliniac.net>
Thu, 7 May 2015 15:42:26 +0000 (17:42 +0200)
Reworded a quote in PR 742 by Regit from Inliniac to explain why adding
the head of the list (really a FIFO) is the correct behavior.

src/detect-replace.c

index 0d1b2725765d24f1b4bd18727b827693e1085a17..8e39004c630b905b57eeef204123793c7e2f3749 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2013 Open Information Security Foundation
+/* Copyright (C) 2011-2014 Open Information Security Foundation
  *
  * You can copy, redistribute or modify this Program under the terms of
  * the GNU General Public License version 2 as published by the Free
@@ -151,6 +151,14 @@ error:
     return -1;
 }
 
+/* Add to the head of the replace-list.
+ *
+ * The first to add to the replace-list has the highest priority. So,
+ * adding the the head of the list results in the newest modifications
+ * of content being applied first, so later changes can over ride
+ * earlier changes. Thus the highest priority modifications should be
+ * applied last.
+ */
 DetectReplaceList * DetectReplaceAddToList(DetectReplaceList *replist, uint8_t *found, DetectContentData *cd)
 {
     DetectReplaceList *newlist;