]> git.ipfire.org Git - thirdparty/suricata.git/commit
nfs: fix 'dangling' files in lossy sessions
authorVictor Julien <victor@inliniac.net>
Mon, 20 Jul 2020 12:49:59 +0000 (14:49 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Aug 2020 12:49:26 +0000 (14:49 +0200)
commit9c13d26adaa647074962e37a83abc021930802ed
tree0f5ea78dd0f42797eab7459a231943bcb4f6ce85
parent54d4a8ffb09ca04806b4bd420abd3955fdcf0417
nfs: fix 'dangling' files in lossy sessions

In case of lossy connections the NFS 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 NFS'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.

Based on 65e9a7c31cc68bdb1fb3e1412b0a56260265c608

(cherry picked from commit 44d7dd02b34a678972aeeadc03b68ba267531333)
rust/src/nfs/nfs.rs