]> git.ipfire.org Git - thirdparty/suricata.git/commit
nfs: implement post-GAP transaction cleanup
authorVictor Julien <victor@inliniac.net>
Tue, 11 Feb 2020 10:55:18 +0000 (11:55 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 11 Feb 2020 19:38:13 +0000 (20:38 +0100)
commitf68c255f090a94162df1fcd7e7262548a2119c50
treeeb4be326faed98b306b801d48100b13ecd449f8d
parent7709b90c168afb20e53e5f4f1a4546f62585b459
nfs: implement post-GAP transaction cleanup

Close all prior transactions in the direction of the GAP, except the
file xfers. Those use their own logic described below.

After a GAP all normal transactions are closed. File transactions
are left open as they can handle GAPs in principle. However, the
GAP might have contained the closing of a file and therefore it
may remain active until the end of the flow.

This patch introduces a time based heuristic for these transactions.
After the GAP all file transactions are stamped with the current
timestamp. If 60 seconds later a file has seen no update, its marked
as closed.

This is meant to fix resource starvation issues observed in long
running SMB sessions where packet loss was causing GAPs. Due to the
similarity of the NFS and SMB parsers, this issue is fixed for NFS
as well in this patch.

Bug #3424.
Bug #3425.
rust/src/nfs/nfs.rs