]> git.ipfire.org Git - thirdparty/suricata.git/commit
flow-manager: fix off-by-one in flow_hash row allocation 7187/head
authorArne Welzel <arne.welzel@corelight.com>
Sat, 12 Feb 2022 16:49:07 +0000 (17:49 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 29 Mar 2022 14:47:29 +0000 (16:47 +0200)
commit8ef066318d7c4dd9b6686dbebd621c790828c384
tree53363720d781023d6c3500fe4459ae375d11fcdd
parent9537d119b94ae9e09de1389880806f9935c16639
flow-manager: fix off-by-one in flow_hash row allocation

The current code doesn't cover all rows when more than one flow manager is
used. It leaves a single row between ftd->max and ftd->min of the next
manager orphaned. As an example:

    hash_size=1000
    flowmgr_number=3
    range=333

    instance  ftd->min  ftd->max
    0         0         333
    1         334       666
    2         667       1000

    Rows not covered: 333, 666
src/flow-manager.c