From: Victor Julien Date: Mon, 23 Jul 2018 09:47:39 +0000 (+0200) Subject: nfs4: create tx for CREATE procedure X-Git-Tag: suricata-4.1.0-rc2~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3432%2Fhead;p=thirdparty%2Fsuricata.git nfs4: create tx for CREATE procedure --- diff --git a/rust/src/nfs/nfs4.rs b/rust/src/nfs/nfs4.rs index 14b1f8a3bd..5036c9aadc 100644 --- a/rust/src/nfs/nfs4.rs +++ b/rust/src/nfs/nfs4.rs @@ -198,6 +198,14 @@ impl NFSState { &Nfs4RequestContent::Close(ref rd) => { SCLogDebug!("CLOSEv4: {:?}", rd); } + &Nfs4RequestContent::Create(ref rd) => { + SCLogDebug!("CREATEv4: {:?}", rd); + if let Some(fh) = last_putfh { + xidmap.file_handle = fh.to_vec(); + } + xidmap.file_name = rd.filename.to_vec(); + main_opcode = NFSPROC4_CREATE; + } &Nfs4RequestContent::Remove(ref rd) => { SCLogDebug!("REMOVEv4: {:?}", rd); xidmap.file_name = rd.to_vec(); @@ -308,6 +316,11 @@ impl NFSState { main_opcode_status = s; main_opcode_status_set = true; }, + &Nfs4ResponseContent::Create(s) => { + SCLogDebug!("CREATE4: status {}", s); + main_opcode_status = s; + main_opcode_status_set = true; + }, &Nfs4ResponseContent::Read(s, ref rd) => { if let &Some(ref rd) = rd { SCLogDebug!("READ4: xidmap {:?} status {} data {}", xidmap, s, rd.data.len());