From: Mike Stepanek (mstepane) Date: Fri, 7 Feb 2020 15:53:19 +0000 (+0000) Subject: Merge pull request #1987 in SNORT/snort3 from ~THOPETER/snort3:nhttp132 to master X-Git-Tag: 3.0.0-268~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11788cfd9c0bf9fe9fc3898878a7ad90141e28e7;p=thirdparty%2Fsnort3.git Merge pull request #1987 in SNORT/snort3 from ~THOPETER/snort3:nhttp132 to master Squashed commit of the following: commit fcc1bd432f77302b8e39012725841b813abb7ca1 Author: Tom Peters Date: Tue Feb 4 15:50:27 2020 -0500 http_inspect: gzip splitting fix --- diff --git a/src/service_inspectors/http_inspect/http_enum.h b/src/service_inspectors/http_inspect/http_enum.h index 40719bdda..ed61be746 100644 --- a/src/service_inspectors/http_inspect/http_enum.h +++ b/src/service_inspectors/http_inspect/http_enum.h @@ -27,6 +27,7 @@ namespace HttpEnums static const int MAX_OCTETS = 63780; static const int GZIP_BLOCK_SIZE = 2048; static const int MAX_SECTION_STRETCH = 1460; +static const int MIN_FILE_BLOCK_SIZE = 1; static const uint32_t HTTP_GID = 119; static const int GZIP_WINDOW_BITS = 31; diff --git a/src/service_inspectors/http_inspect/http_msg_section.cc b/src/service_inspectors/http_inspect/http_msg_section.cc index 1fab8dfc6..5aca2b809 100644 --- a/src/service_inspectors/http_inspect/http_msg_section.cc +++ b/src/service_inspectors/http_inspect/http_msg_section.cc @@ -101,8 +101,8 @@ void HttpMsgSection::update_depth() const } else { - // Just for file processing - session_data->section_size_target[source_id] = SnortConfig::get_conf()->max_pdu; + // Just for file processing. Split on packet boundaries. + session_data->section_size_target[source_id] = MIN_FILE_BLOCK_SIZE; session_data->stretch_section_to_packet[source_id] = true; } return;