From 3d73538a5b543eded3f6963b18b76e9dbac273b0 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Thu, 10 Aug 2023 17:46:41 +0530 Subject: [PATCH] af-packet: check out_iface not NULL --- src/runmode-af-packet.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index b45b0dad7e..fff1bd45b9 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -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); } }