From: Philippe Antoine Date: Wed, 29 May 2024 11:47:15 +0000 (+0200) Subject: websocket: add data frame X-Git-Tag: suricata-8.0.0-beta1~1183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9d5170ec0c7e5dece3c612a4f5d3a74bb41276d;p=thirdparty%2Fsuricata.git websocket: add data frame Ticket: 7051 --- diff --git a/rust/src/websocket/websocket.rs b/rust/src/websocket/websocket.rs index 8e5f24816b..c5e1720b31 100644 --- a/rust/src/websocket/websocket.rs +++ b/rust/src/websocket/websocket.rs @@ -41,6 +41,7 @@ static mut WEBSOCKET_MAX_PAYLOAD_SIZE: u32 = 0xFFFF; pub enum WebSocketFrameType { Header, Pdu, + Data, } #[derive(AppLayerEvent)] @@ -175,6 +176,14 @@ impl WebSocketState { WebSocketFrameType::Pdu as u8, Some(tx.tx_id), ); + let _pdu = Frame::new( + flow, + &stream_slice, + &start[(start.len() - rem.len() - pdu.payload.len())..], + pdu.payload.len() as i64, + WebSocketFrameType::Data as u8, + Some(tx.tx_id), + ); start = rem; if pdu.to_skip > 0 { if direction == Direction::ToClient {