None
}
- pub fn handle_bind_cache(&mut self, call_id: u32, is_response: bool) {
- if self.clear_bind_cache == true {
- self.bind = None;
- self.bindack = None;
- }
- if self.prev_tx_call_id == call_id && is_response == true {
- self.clear_bind_cache = true;
- } else {
- self.clear_bind_cache = false;
- }
- self.prev_tx_call_id = call_id;
- }
-
pub fn parse_data_gap(&mut self, direction: Direction) -> AppLayerResult {
match direction {
Direction::ToServer => {
if retval == -1 {
return AppLayerResult::err();
}
- self.handle_bind_cache(current_call_id, false);
}
DCERPC_TYPE_BINDACK | DCERPC_TYPE_ALTER_CONTEXT_RESP => {
retval = self.process_bindack_pdu(&buffer[parsed as usize..]);
if let Some(flow) = self.flow {
sc_app_layer_parser_trigger_raw_stream_reassembly(flow, Direction::ToClient as i32);
}
- self.handle_bind_cache(current_call_id, false);
}
DCERPC_TYPE_REQUEST => {
retval = self.process_request_pdu(&buffer[parsed as usize..]);
}
// In case the response came first, the transaction would complete later when
// the corresponding request also comes through
- self.handle_bind_cache(current_call_id, false);
}
DCERPC_TYPE_RESPONSE => {
let transaction = self.get_tx_by_call_id(current_call_id, Direction::ToClient);
if retval < 0 {
return AppLayerResult::err();
}
- self.handle_bind_cache(current_call_id, true);
}
_ => {
SCLogDebug!("Unrecognized packet type: {:?}", x);