From: Shivani Bhardwaj Date: Sat, 20 Feb 2021 06:31:20 +0000 (+0530) Subject: rust/applayer: split EOF flag per direction X-Git-Tag: suricata-6.0.2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8f0c2534ee682855c7d94d19bcd5443e9088e28;p=thirdparty%2Fsuricata.git rust/applayer: split EOF flag per direction (cherry picked from commit d7a3523b12d0280f6fd8cdadc14118d1ede31fd5) --- diff --git a/rust/src/applayer.rs b/rust/src/applayer.rs index 8eacadcc00..9e10a64261 100644 --- a/rust/src/applayer.rs +++ b/rust/src/applayer.rs @@ -298,7 +298,8 @@ extern { } // Defined in app-layer-parser.h -pub const APP_LAYER_PARSER_EOF : u8 = 0b0; +pub const APP_LAYER_PARSER_EOF_TS : u8 = 0b0101; +pub const APP_LAYER_PARSER_EOF_TC : u8 = 0b0110; pub const APP_LAYER_PARSER_NO_INSPECTION : u8 = 0b1; pub const APP_LAYER_PARSER_NO_REASSEMBLY : u8 = 0b10; pub const APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD : u8 = 0b100; diff --git a/rust/src/applayertemplate/template.rs b/rust/src/applayertemplate/template.rs index 25576b51c4..c82e49bf05 100644 --- a/rust/src/applayertemplate/template.rs +++ b/rust/src/applayertemplate/template.rs @@ -316,7 +316,7 @@ pub extern "C" fn rs_template_parse_request( _flags: u8, ) -> AppLayerResult { let eof = unsafe { - if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF) > 0 { + if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TS) > 0 { true } else { false @@ -352,7 +352,7 @@ pub extern "C" fn rs_template_parse_response( _flags: u8, ) -> AppLayerResult { let _eof = unsafe { - if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF) > 0 { + if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TC) > 0 { true } else { false