smb2: improve write error handling

pull/3281/head
Victor Julien 8 years ago
parent b34392051d
commit ecbf10da70

@ -527,7 +527,9 @@ pub fn smb2_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
true
},
SMB2_COMMAND_WRITE => {
match parse_smb2_response_write(r.data) {
if r.nt_status == SMB_NTSTATUS_SUCCESS {
match parse_smb2_response_write(r.data)
{
IResult::Done(_, wr) => {
SCLogDebug!("SMBv2: Write response => {:?}", wr);
@ -547,6 +549,7 @@ pub fn smb2_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
events.push(SMBEvent::MalformedData);
},
}
}
false // the request may have created a generic tx, so handle that here
},
SMB2_COMMAND_READ => {
@ -686,9 +689,7 @@ pub fn smb2_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
tx.response_done = true;
true
},
None => {
false
},
None => { false },
};
found1 || found2
},

Loading…
Cancel
Save