From: Victor Julien Date: Sat, 6 Oct 2018 13:45:40 +0000 (+0200) Subject: smb/dcerpc: remove now unused ssn2maxsize_map X-Git-Tag: suricata-4.1.0-rc2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d5024255f5e2fd44d75e367a7a1dcfc0692f8ff;p=thirdparty%2Fsuricata.git smb/dcerpc: remove now unused ssn2maxsize_map --- diff --git a/rust/src/smb/debug.rs b/rust/src/smb/debug.rs index 64dcac02ab..f6589fdacd 100644 --- a/rust/src/smb/debug.rs +++ b/rust/src/smb/debug.rs @@ -73,6 +73,6 @@ impl SMBState { #[cfg(feature = "debug")] pub fn _debug_state_stats(&self) { - SCLogNotice!("ssn2vec_map {} guid2name_map {} ssn2vecoffset_map {} ssn2tree_map {} ssn2maxsize_map {} ssnguid2vec_map {} tcp_buffer_ts {} tcp_buffer_tc {} file_ts_guid {} file_tc_guid {} transactions {}", self.ssn2vec_map.len(), self.guid2name_map.len(), self.ssn2vecoffset_map.len(), self.ssn2tree_map.len(), self.ssn2maxsize_map.len(), self.ssnguid2vec_map.len(), self.tcp_buffer_ts.len(), self.tcp_buffer_tc.len(), self.file_ts_guid.len(), self.file_tc_guid.len(), self.transactions.len()); + SCLogNotice!("ssn2vec_map {} guid2name_map {} ssn2vecoffset_map {} ssn2tree_map {} ssnguid2vec_map {} tcp_buffer_ts {} tcp_buffer_tc {} file_ts_guid {} file_tc_guid {} transactions {}", self.ssn2vec_map.len(), self.guid2name_map.len(), self.ssn2vecoffset_map.len(), self.ssn2tree_map.len(), self.ssnguid2vec_map.len(), self.tcp_buffer_ts.len(), self.tcp_buffer_tc.len(), self.file_ts_guid.len(), self.file_tc_guid.len(), self.transactions.len()); } } diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index 0e4ddc3554..8c854dc04e 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -750,8 +750,8 @@ pub struct SMBState<> { pub ssn2tree_map: HashMap, - // track the max size we expect for TRANS responses - pub ssn2maxsize_map: HashMap, + // store partial data records that are transfered in multiple + // requests for DCERPC. pub ssnguid2vec_map: HashMap>, /// TCP segments defragmentation buffer @@ -801,7 +801,6 @@ impl SMBState { guid2name_map:HashMap::new(), ssn2vecoffset_map:HashMap::new(), ssn2tree_map:HashMap::new(), - ssn2maxsize_map:HashMap::new(), ssnguid2vec_map:HashMap::new(), tcp_buffer_ts:Vec::new(), tcp_buffer_tc:Vec::new(), diff --git a/rust/src/smb/smb1.rs b/rust/src/smb/smb1.rs index 14e0b7b1ba..0a7c38faad 100644 --- a/rust/src/smb/smb1.rs +++ b/rust/src/smb/smb1.rs @@ -817,17 +817,6 @@ pub fn smb1_trans_request_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>) } if pipe_dcerpc { - // trans request will tell us the max size of the response - // if there is more response data, it will first give a - // TRANS with 'max data cnt' worth of data, and the rest - // will be pulled by a 'READ'. So we setup an expectation - // here. - if rd.params.max_data_cnt > 0 { - // expect max max_data_cnt for this fid in the other dir - let ehdr = SMBCommonHdr::from1(r, SMBHDR_TYPE_MAX_SIZE); - state.ssn2maxsize_map.insert(ehdr, rd.params.max_data_cnt); - } - SCLogDebug!("SMBv1 TRANS TO PIPE"); let hdr = SMBCommonHdr::from1(r, SMBHDR_TYPE_HEADER); let vercmd = SMBVerCmdStat::new1(r.command);