]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/address: Expose DetectAddressCopy function
authorJeff Lucovsky <jeff@lucovsky.org>
Mon, 29 Mar 2021 12:26:40 +0000 (08:26 -0400)
committerJeff Lucovsky <jeff@lucovsky.org>
Thu, 29 Apr 2021 13:51:38 +0000 (09:51 -0400)
(cherry picked from commit 11f9cc6524958d11b6d9ab1f0785bfe16237096f)

src/detect-engine-address.c
src/detect-engine-address.h

index b0315451c15a0711132cbefe41b30c151589bd30..51445852cf7d0344b936de8edac0c36ffbd9f59e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2020 Open Information Security Foundation
+/* Copyright (C) 2007-2021 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
@@ -120,7 +120,7 @@ static void DetectAddressHeadFree(DetectAddressHead *gh)
  * \retval ag Pointer to the new instance of DetectAddress that contains the
  *            copied address.
  */
-static DetectAddress *DetectAddressCopy(DetectAddress *orig)
+DetectAddress *DetectAddressCopy(DetectAddress *orig)
 {
     DetectAddress *ag = DetectAddressInit();
     if (ag == NULL)
@@ -829,7 +829,7 @@ static int DetectAddressParse2(const DetectEngineCtx *de_ctx,
                     }
                     DetectAddressHeadCleanup(&tmp_ghn);
 
-                    SCLogDebug("merged succesfully");
+                    SCLogDebug("merged successfully");
 
                     /* insert the IPv4 addresses into the negated list */
                     for (tmp_ad = tmp_gh.ipv4_head; tmp_ad; tmp_ad = tmp_ad->next) {
@@ -1501,7 +1501,7 @@ void DetectAddressHeadCleanup(DetectAddressHead *gh)
  *        explanations on what these functions do.
  *
  * \param de_ctx Pointer to the DetectEngineCtx.
- * \param a      Pointer the the first address to be cut.
+ * \param a      Pointer to the first address to be cut.
  * \param b      Pointer to the second address to be cut.
  * \param c      Pointer to a pointer to a third DetectAddressData, in case the
  *               ranges from a and b, demand a third address range.
index c137f2b0f204cdddacf3fe2bd2d4c3971a338ca5..3c8221e630b4351081a94d998453be791e2c4357 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2010 Open Information Security Foundation
+/* Copyright (C) 2007-2021 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
@@ -28,6 +28,7 @@
 
 DetectAddress *DetectAddressInit(void);
 void DetectAddressFree(DetectAddress *);
+DetectAddress *DetectAddressCopy(DetectAddress *);
 int DetectAddressParse(const DetectEngineCtx *, DetectAddressHead *, const char *);
 void DetectAddressHeadCleanup(DetectAddressHead *);