From ff518e5c644ff5769a5f69bb4d5c908d7a38da26 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 21 Jul 2018 16:59:26 +0200 Subject: [PATCH] nfs4: for putrootfh set 'mount root' as name --- rust/src/nfs/nfs4.rs | 6 ++++++ rust/src/nfs/types.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/rust/src/nfs/nfs4.rs b/rust/src/nfs/nfs4.rs index 34cae4a59f..f3a9a75212 100644 --- a/rust/src/nfs/nfs4.rs +++ b/rust/src/nfs/nfs4.rs @@ -296,6 +296,12 @@ impl NFSState { } } }, + &Nfs4ResponseContent::PutRootFH(s) => { + if s == NFS4_OK && xidmap.file_name.len() == 0 { + xidmap.file_name = b"".to_vec(); + SCLogDebug!("filename {:?}", xidmap.file_name); + } + }, &_ => { }, } } diff --git a/rust/src/nfs/types.rs b/rust/src/nfs/types.rs index e916fdc553..d3f313a39d 100644 --- a/rust/src/nfs/types.rs +++ b/rust/src/nfs/types.rs @@ -321,3 +321,6 @@ pub fn nfs4_procedure_string(procedure: u32) -> String { } }.to_string() } + +pub const NFS4_OK: u32 = 0; + -- 2.47.2