]> git.ipfire.org Git - thirdparty/suricata.git/commit
modbus: tx iterator
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 7 Oct 2021 12:31:29 +0000 (14:31 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 11 Oct 2021 06:35:40 +0000 (08:35 +0200)
commit83887510a8994e0b5dfb3e4522507a3462fad58b
treebcabf18d9fe3936a92d7154d6e485030480ddc96
parentb34c025b5280cd9e708f1a2a3ee9e06fd90ada39
modbus: tx iterator

When there are a lot of open transactions, as is possible with
modbus, the default tx_iterator will loop for the whole
transacations vector to find each transaction, that means
quadratic complexity.

Reusing the tx_iterator from the template, and keeping as a state
the last index where to start looking avoids this quadratic
complexity.
rust/src/modbus/modbus.rs