]> git.ipfire.org Git - people/ms/suricata.git/commit - rust/src/smb/smb.rs
smb: fix 'dangling' files in lossy sessions
authorVictor Julien <victor@inliniac.net>
Fri, 15 May 2020 07:57:42 +0000 (09:57 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 6 Jul 2020 20:50:05 +0000 (22:50 +0200)
commit65e9a7c31cc68bdb1fb3e1412b0a56260265c608
tree599cc8f408181204e45e894960a7ef6e5d2ba3b6
parent25f2efe97749611760e6e26d388b420091423732
smb: fix 'dangling' files in lossy sessions

In case of lossy connections the SMB state would properly clean up
transactions, including file transactions. However for files the
state was never set to 'truncated', leading to files to stay 'active'.

This would lead these files staying in the SMB's state. In long running
sessions with lots of files this would lead to performance and memory
use issues.

This patch cleans truncates the file that was being transmitted when
a file transaction is being closed.
rust/src/smb/smb.rs