From: Anoop Saldanha Date: Wed, 12 Dec 2012 12:18:21 +0000 (+0530) Subject: fix for 653. X-Git-Tag: suricata-1.4~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F245%2Fhead;p=thirdparty%2Fsuricata.git fix for 653. break out of afp readring loop if shutdown is initiated. --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 9305e7d364..1355c82038 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -697,6 +697,10 @@ int AFPReadFromRing(AFPThreadVars *ptv) /* Loop till we have packets available */ while (1) { + if (unlikely(suricata_ctl_flags != 0)) { + break; + } + /* Read packet from ring */ h.raw = (((union thdr **)ptv->frame_buf)[ptv->frame_offset]); if (h.raw == NULL) {