From: Shivani Bhardwaj Date: Thu, 10 Aug 2023 12:16:41 +0000 (+0530) Subject: af-packet: check out_iface not NULL X-Git-Tag: suricata-7.0.1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d73538a5b543eded3f6963b18b76e9dbac273b0;p=thirdparty%2Fsuricata.git af-packet: check out_iface not NULL --- 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); } }