"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/preprocessors/spp_httpinspect.c" between
snort-2.9.16.1.tar.gz and snort-2.9.17.tar.gz

About: Snort is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

spp_httpinspect.c  (snort-2.9.16.1):spp_httpinspect.c  (snort-2.9.17)
skipping to change at line 341 skipping to change at line 341
LogMessage(" Gzip Compressed Data Processed: %-10s\n", "n/a"); LogMessage(" Gzip Compressed Data Processed: %-10s\n", "n/a");
LogMessage(" Gzip Decompressed Data Processed: %-10s\n", "n/a"); LogMessage(" Gzip Decompressed Data Processed: %-10s\n", "n/a");
} }
else else
{ {
LogMessage(" Gzip Compressed Data Processed: %-10.2f\n", (double)hi _stats.compr_bytes_read); LogMessage(" Gzip Compressed Data Processed: %-10.2f\n", (double)hi _stats.compr_bytes_read);
LogMessage(" Gzip Decompressed Data Processed: %-10.2f\n", (double)hi _stats.decompr_bytes_read); LogMessage(" Gzip Decompressed Data Processed: %-10.2f\n", (double)hi _stats.decompr_bytes_read);
} }
LogMessage(" Http/2 Rebuilt Packets: %-10I64u\n", hi_stats. h2_rebuilt_packets); LogMessage(" Http/2 Rebuilt Packets: %-10I64u\n", hi_stats. h2_rebuilt_packets);
LogMessage(" Total packets processed: %-10I64u\n", hi_stats. total); LogMessage(" Total packets processed: %-10I64u\n", hi_stats. total);
LogMessage(" Non-mempool session memory: %-10I64u\n", hi_stats.
mem_used +
(hi_paf_get_size() * hi_s
tats.session_count));
LogMessage(" http_mempool used: %-10I64u\n",
http_mempool ? http_mempo
ol->used_memory:0);
LogMessage(" hi_gzip_mempool used: %-10I64u\n",
hi_gzip_mempool ? hi_gzip
_mempool->used_memory:0);
LogMessage(" mime_decode_mempool used: %-10I64u\n",
mime_decode_mempool ? mim
e_decode_mempool->used_memory:0);
LogMessage(" mime_log_mempool used: %-10I64u\n",
mime_log_mempool ? mime_l
og_mempool->used_memory:0);
LogMessage(" Current active session: %-10I64u\n", hi_stats.
session_count);
#else #else
LogMessage(" POST methods: "FMTu64("-10")"\n", hi _stats.post); LogMessage(" POST methods: "FMTu64("-10")"\n", hi _stats.post);
LogMessage(" GET methods: "FMTu64("-10")"\n", hi _stats.get); LogMessage(" GET methods: "FMTu64("-10")"\n", hi _stats.get);
LogMessage(" HTTP Request Headers extracted: "FMTu64("-10")"\n", hi _stats.req_headers); LogMessage(" HTTP Request Headers extracted: "FMTu64("-10")"\n", hi _stats.req_headers);
#ifdef DEBUG #ifdef DEBUG
if (hi_stats.req_headers == 0) if (hi_stats.req_headers == 0)
LogMessage(" Avg Request Header length: %-10s\n", "n/a"); LogMessage(" Avg Request Header length: %-10s\n", "n/a");
else else
LogMessage(" Avg Request Header length: %-10.2f\n", (double)hi _stats.req_header_len / (double)hi_stats.req_headers); LogMessage(" Avg Request Header length: %-10.2f\n", (double)hi _stats.req_header_len / (double)hi_stats.req_headers);
#endif #endif
skipping to change at line 392 skipping to change at line 403
LogMessage(" Gzip Compressed Data Processed: %-10s\n", "n/a"); LogMessage(" Gzip Compressed Data Processed: %-10s\n", "n/a");
LogMessage(" Gzip Decompressed Data Processed: %-10s\n", "n/a"); LogMessage(" Gzip Decompressed Data Processed: %-10s\n", "n/a");
} }
else else
{ {
LogMessage(" Gzip Compressed Data Processed: %-10.2f\n", (double)hi _stats.compr_bytes_read); LogMessage(" Gzip Compressed Data Processed: %-10.2f\n", (double)hi _stats.compr_bytes_read);
LogMessage(" Gzip Decompressed Data Processed: %-10.2f\n", (double)hi _stats.decompr_bytes_read); LogMessage(" Gzip Decompressed Data Processed: %-10.2f\n", (double)hi _stats.decompr_bytes_read);
} }
LogMessage(" Http/2 Rebuilt Packets: "FMTu64("-10")"\n", hi _stats.h2_rebuilt_packets); LogMessage(" Http/2 Rebuilt Packets: "FMTu64("-10")"\n", hi _stats.h2_rebuilt_packets);
LogMessage(" Total packets processed: "FMTu64("-10")"\n", hi _stats.total); LogMessage(" Total packets processed: "FMTu64("-10")"\n", hi _stats.total);
LogMessage(" Non-mempool session memory: "FMTu64("-10")"\n", hi
_stats.mem_used +
(hi_paf_get_size() * hi_s
tats.session_count));
LogMessage(" http_mempool used: "FMTu64("-10")"\n",
http_mempool ? http_mempo
ol->used_memory:0);
LogMessage(" hi_gzip_mempool used: "FMTu64("-10")"\n",
hi_gzip_mempool ? hi_gzip
_mempool->used_memory:0);
LogMessage(" mime_decode_mempool used: "FMTu64("-10")"\n",
mime_decode_mempool ? mim
e_decode_mempool->used_memory:0);
LogMessage(" mime_log_mempool used: "FMTu64("-10")"\n",
mime_log_mempool ? mime_l
og_mempool->used_memory:0);
LogMessage(" Current active session: "FMTu64("-10")"\n", hi
_stats.session_count);
#endif #endif
} }
static void HttpInspectCleanExit(int signal, void *data) static void HttpInspectCleanExit(int signal, void *data)
{ {
(void)File_Decomp_CleanExit(); (void)File_Decomp_CleanExit();
hi_paf_term(); hi_paf_term();
HI_SearchFree(); HI_SearchFree();
skipping to change at line 994 skipping to change at line 1016
int num_toks, num_toks1; int num_toks, num_toks1;
int i; int i;
char *etype; char *etype;
char *btype; char *btype;
char *findStr1, *findStr2; char *findStr1, *findStr2;
int negate_flag = 0; int negate_flag = 0;
unsigned pos; unsigned pos;
HttpEncodeData *idx= NULL; HttpEncodeData *idx= NULL;
idx = (HttpEncodeData *) SnortAlloc(sizeof(HttpEncodeData)); idx = (HttpEncodeData *) SnortAlloc(sizeof(HttpEncodeData));
hi_stats.mem_used += sizeof(HttpEncodeData);
if(idx == NULL) if(idx == NULL)
{ {
FatalError("%s(%d): Failed allocate data for %s option\n", FatalError("%s(%d): Failed allocate data for %s option\n",
file_name, file_line, name); file_name, file_line, name);
} }
toks = mSplit(parameters, ",", 2, &num_toks, 0); toks = mSplit(parameters, ",", 2, &num_toks, 0);
if(num_toks != 2 ) if(num_toks != 2 )
skipping to change at line 1169 skipping to change at line 1192
return DETECTION_OPTION_NO_MATCH; return DETECTION_OPTION_NO_MATCH;
} }
static void HttpEncodeCleanup(void *dataPtr) static void HttpEncodeCleanup(void *dataPtr)
{ {
HttpEncodeData *idx = dataPtr; HttpEncodeData *idx = dataPtr;
if (idx) if (idx)
{ {
free(idx); free(idx);
hi_stats.mem_used -= sizeof(HttpEncodeData);
} }
} }
static int HttpInspectFileDecompIterate(void *data) static int HttpInspectFileDecompIterate(void *data)
{ {
HTTPINSPECT_CONF *server = (HTTPINSPECT_CONF *)data; HTTPINSPECT_CONF *server = (HTTPINSPECT_CONF *)data;
if (server == NULL) if (server == NULL)
return 0; return 0;
 End of changes. 4 change blocks. 
0 lines changed or deleted 38 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)