Skip to content

Commit

Permalink
modbus: abort flow parsing on flood
Browse files Browse the repository at this point in the history
Ticket: 6987

Let's not spend more resources for a flow which is trying to
make us do it...
  • Loading branch information
catenacyber authored and victorjulien committed Jun 25, 2024
1 parent ce727cf commit 37509e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/modbus/modbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl ModbusState {
None => {
let mut tx = match self.new_tx() {
Some(tx) => tx,
None => return AppLayerResult::ok(),
None => return AppLayerResult::err(),
};
tx.set_events_from_flags(&msg.error_flags);
tx.request = Some(msg);
Expand All @@ -215,7 +215,7 @@ impl ModbusState {
None => {
let mut tx = match self.new_tx() {
Some(tx) => tx,
None => return AppLayerResult::ok(),
None => return AppLayerResult::err(),
};
if msg
.access_type
Expand Down

0 comments on commit 37509e8

Please sign in to comment.