]> 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, 21 Jul 2020 14:50:26 +0000 (16:50 +0200)
commitbcd416e6baf8475fc4a41830c16488a4225b8eba
tree84bc7be38de2a94bbc51cc33b2786189fa2c3676
parentfc7cecb4ae820c098322bb1098cd20902fd84604
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
rust/src/nfs/nfs.rs