]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smb/dcerpc: remove now unused ssn2maxsize_map 3498/head
authorVictor Julien <victor@inliniac.net>
Sat, 6 Oct 2018 13:45:40 +0000 (15:45 +0200)
committerVictor Julien <victor@inliniac.net>
Sun, 7 Oct 2018 08:36:38 +0000 (10:36 +0200)
rust/src/smb/debug.rs
rust/src/smb/smb.rs
rust/src/smb/smb1.rs

index 64dcac02ab7a0c85e098622289d3d2841b7ee6ad..f6589fdacd8f7373146f0d6f6ca74e44f3826d98 100644 (file)
@@ -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());
     }
 }
index 0e4ddc35545313a20c928935506b05634d9efa69..8c854dc04e14bbeca314f11a396c64c3e801424f 100644 (file)
@@ -750,8 +750,8 @@ pub struct SMBState<> {
 
     pub ssn2tree_map: HashMap<SMBCommonHdr, SMBTree>,
 
-    // track the max size we expect for TRANS responses
-    pub ssn2maxsize_map: HashMap<SMBCommonHdr, u16>,
+    // store partial data records that are transfered in multiple
+    // requests for DCERPC.
     pub ssnguid2vec_map: HashMap<SMBHashKeyHdrGuid, Vec<u8>>,
 
     /// 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(),
index 14e0b7b1ba06a86cca3bd91fa8d0b96a105b0cda..0a7c38faad0f127245e12e991df1bc25eca87ea5 100644 (file)
@@ -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);