]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: break out of loop in linux profile when able to 3479/head
authorJason Ish <ish@unx.ca>
Fri, 14 Sep 2018 05:11:14 +0000 (23:11 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 17 Sep 2018 06:28:11 +0000 (08:28 +0200)
src/defrag.c

index 317e3dcba011c9b9600911291a9ebaa02593276c..95c12422fe4220c59413914e953b92cccda30789 100644 (file)
@@ -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. */