]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: check out_iface not NULL
authorShivani Bhardwaj <shivani@oisf.net>
Thu, 10 Aug 2023 12:16:41 +0000 (17:46 +0530)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 10 Aug 2023 12:16:41 +0000 (17:46 +0530)
src/runmode-af-packet.c

index b45b0dad7ec9485105d8af544823785fbb829b5b..fff1bd45b98a7d53c0c6a8f4aae1fa88d81b31e7 100644 (file)
@@ -287,8 +287,12 @@ static void *ParseAFPConfig(const char *iface)
     }
 
     if (ConfGetChildValueWithDefault(if_root, if_default, "copy-iface", &out_iface) == 1) {
-        if (strlen(out_iface) > 0) {
-            aconf->out_iface = out_iface;
+        if (out_iface != NULL) {
+            if (strlen(out_iface) > 0) {
+                aconf->out_iface = out_iface;
+            }
+        } else {
+            SCLogWarning("copy-iface corresponding to %s interface cannot be NULL", iface);
         }
     }