From: Jason Ish Date: Fri, 14 Sep 2018 05:11:14 +0000 (-0600) Subject: defrag: break out of loop in linux profile when able to X-Git-Tag: suricata-4.1.0-rc2~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b86c7c5c0babd73cfa02c7cebc51853e3194f62;p=thirdparty%2Fsuricata.git defrag: break out of loop in linux profile when able to --- diff --git a/src/defrag.c b/src/defrag.c index 317e3dcba0..95c12422fe 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -679,6 +679,7 @@ DefragInsertFrag(ThreadVars *tv, DecodeThreadVars *dtv, DefragTracker *tracker, frag_end > prev->offset + prev->ltrim) { prev->ltrim += frag_end - (prev->offset + prev->ltrim); overlap++; + goto insert; } /* If the new fragment completely overlaps the @@ -689,7 +690,9 @@ DefragInsertFrag(ThreadVars *tv, DecodeThreadVars *dtv, DefragTracker *tracker, if (frag_offset + ltrim <= prev->offset + prev->ltrim && frag_end >= prev->offset + prev->data_len) { prev->skip = 1; + goto insert; } + break; case DEFRAG_POLICY_WINDOWS: /* If new fragment fits inside a previous fragment, drop it. */