From: Eric Leblond Date: Mon, 23 Jan 2023 21:01:18 +0000 (+0100) Subject: sip: add TX orientation X-Git-Tag: suricata-7.0.0-rc2~460 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f4ca269620dd5f06b2ea42b6dd4b21276f62e67;p=thirdparty%2Fsuricata.git sip: add TX orientation Set no inspection in the opposite side of the transaction. Ticket: #5799 --- diff --git a/rust/src/sip/sip.rs b/rust/src/sip/sip.rs index a52f556068..7f4716f1e8 100755 --- a/rust/src/sip/sip.rs +++ b/rust/src/sip/sip.rs @@ -86,7 +86,7 @@ impl SIPState { self.transactions.clear(); } - fn new_tx(&mut self) -> SIPTransaction { + fn new_tx(&mut self, _direction: crate::core::Direction) -> SIPTransaction { self.tx_id += 1; SIPTransaction::new(self.tx_id) } @@ -127,7 +127,7 @@ impl SIPState { match sip_parse_request(input) { Ok((_, request)) => { sip_frames_ts(flow, &stream_slice, &request); - let mut tx = self.new_tx(); + let mut tx = self.new_tx(crate::core::Direction::ToServer); tx.request = Some(request); if let Ok((_, req_line)) = sip_take_line(input) { tx.request_line = req_line; @@ -155,7 +155,7 @@ impl SIPState { match sip_parse_response(input) { Ok((_, response)) => { sip_frames_tc(flow, &stream_slice, &response); - let mut tx = self.new_tx(); + let mut tx = self.new_tx(crate::core::Direction::ToClient); tx.response = Some(response); if let Ok((_, resp_line)) = sip_take_line(input) { tx.response_line = resp_line;