diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2012-10-10 11:42:04 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2012-10-10 11:42:04 +0000 |
commit | 7d73f0d5a1b48155d19d5f9ae6ce50e72a638b07 (patch) | |
tree | e82176291ca1eb27c40a119b4209875401095127 /security/suricata/files | |
parent | d9f83104398c4e67e897d42ed44872ec28e8cddf (diff) | |
download | ports-7d73f0d5a1b48155d19d5f9ae6ce50e72a638b07.tar.gz ports-7d73f0d5a1b48155d19d5f9ae6ce50e72a638b07.zip |
Notes
Diffstat (limited to 'security/suricata/files')
-rw-r--r-- | security/suricata/files/patch-src__app-layer-htp.c | 50 | ||||
-rw-r--r-- | security/suricata/files/patch-src__suricata-common.h | 8 |
2 files changed, 55 insertions, 3 deletions
diff --git a/security/suricata/files/patch-src__app-layer-htp.c b/security/suricata/files/patch-src__app-layer-htp.c new file mode 100644 index 000000000000..89d304555ec6 --- /dev/null +++ b/security/suricata/files/patch-src__app-layer-htp.c @@ -0,0 +1,50 @@ +--- ./src/app-layer-htp.c.orig 2012-10-03 09:44:25.000000000 -0400 ++++ ./src/app-layer-htp.c 2012-10-09 18:57:24.000000000 -0400 +@@ -657,14 +657,15 @@ + if (!(hstate->flags & HTP_FLAG_STATE_OPEN)) { + SCLogDebug("opening htp handle at %p", hstate->connp); + +- htp_connp_open(hstate->connp, NULL, f->sp, NULL, f->dp, 0); ++ htp_connp_open(hstate->connp, NULL, f->sp, NULL, f->dp, &f->startts); + hstate->flags |= HTP_FLAG_STATE_OPEN; + } else { + SCLogDebug("using existing htp handle at %p", hstate->connp); + } + ++ htp_time_t ts = { f->lastts_sec, 0 }; + /* pass the new data to the htp parser */ +- r = htp_connp_req_data(hstate->connp, 0, input, input_len); ++ r = htp_connp_req_data(hstate->connp, &ts, input, input_len); + + switch(r) { + case STREAM_STATE_ERROR: +@@ -693,7 +694,8 @@ + hstate->connp->in_status = STREAM_STATE_CLOSED; + // Call the parsers one last time, which will allow them + // to process the events that depend on stream closure +- htp_connp_req_data(hstate->connp, 0, NULL, 0); ++ htp_time_t ts = { f->lastts_sec, 0 }; ++ htp_connp_req_data(hstate->connp, &ts, NULL, 0); + hstate->flags |= HTP_FLAG_STATE_CLOSED_TS; + SCLogDebug("stream eof encountered, closing htp handle for ts"); + } +@@ -747,7 +749,8 @@ + * reactivate it if necessary) */ + hstate->flags &=~ HTP_FLAG_NEW_BODY_SET; + +- r = htp_connp_res_data(hstate->connp, 0, input, input_len); ++ htp_time_t ts = { f->lastts_sec, 0 }; ++ r = htp_connp_res_data(hstate->connp, &ts, input, input_len); + switch(r) { + case STREAM_STATE_ERROR: + HTPHandleError(hstate); +@@ -774,7 +777,8 @@ + hstate->connp->out_status = STREAM_STATE_CLOSED; + // Call the parsers one last time, which will allow them + // to process the events that depend on stream closure +- htp_connp_res_data(hstate->connp, 0, NULL, 0); ++ htp_time_t ts = { f->lastts_sec, 0 }; ++ htp_connp_res_data(hstate->connp, &ts, NULL, 0); + hstate->flags |= HTP_FLAG_STATE_CLOSED_TC; + } + diff --git a/security/suricata/files/patch-src__suricata-common.h b/security/suricata/files/patch-src__suricata-common.h index 5c294da203fe..97f537f7c838 100644 --- a/security/suricata/files/patch-src__suricata-common.h +++ b/security/suricata/files/patch-src__suricata-common.h @@ -1,10 +1,12 @@ ---- ./src/suricata-common.h.orig 2012-09-05 21:43:08.000000000 -0400 -+++ ./src/suricata-common.h 2012-09-05 21:46:28.000000000 -0400 -@@ -131,6 +131,8 @@ +--- ./src/suricata-common.h.orig 2012-08-21 02:35:15.000000000 -0400 ++++ ./src/suricata-common.h 2012-09-29 08:41:39.000000000 -0400 +@@ -131,6 +131,10 @@ #include <assert.h> #define BUG_ON(x) assert(!(x)) +#define table_getc(x, y) table_get_c(x, y) ++#define bstr_cmpc(x, y) bstr_cmp_c(x, y) ++#define bstr_tocstr(x) bstr_util_strdup_to_c(x) + /* we need this to stringify the defines which are supplied at compiletime see: http://gcc.gnu.org/onlinedocs/gcc-3.4.1/cpp/Stringification.html#Stringification */ |