Index: head/security/suricata/Makefile =================================================================== --- head/security/suricata/Makefile (revision 305641) +++ head/security/suricata/Makefile (revision 305642) @@ -1,119 +1,119 @@ # New ports collection makefile for: suricata # Date created: Sun Aug 29 16:39:08 BRT 2010 # Whom: Patrick Tracanelli # # $FreeBSD$ # PORTNAME= suricata -PORTVERSION= 1.3.1 +PORTVERSION= 1.3.2 CATEGORIES= security MASTER_SITES= http://www.openinfosecfoundation.org/download/ \ http://mirrors.rit.edu/zi/ MAINTAINER= zi@FreeBSD.org COMMENT= Open Source next generation IDS/IPS engine by OISF LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre \ yaml:${PORTSDIR}/textproc/libyaml \ htp:${PORTSDIR}/devel/libhtp BUILD_DEPENDS+= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet USE_AUTOTOOLS= automake autoconf libtool USE_PKGCONFIG= yes USE_RC_SUBR= suricata LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config OPTIONS_DEFINE= IPFW PRELUDE PORTS_PCAP DAG OPTIONS_DEFAULT=IPFW IPFW_DESC= Enable ipfw/ipdivert for IPS usage PRELUDE_DESC= Enable Prelude NIDS integration PORTS_PCAP_DESC=Use libpcap from ports DAG_DESC= Enable Endace DAG Support .include SUB_FILES= pkg-message HAS_CONFIGURE= yes USE_GMAKE= yes USE_LDCONFIG= yes CONFIGURE_ARGS+=--enable-non-bundled-htp --enable-gccprotect \ --with-libpcre-includes=${LOCALBASE}/include \ --with-libpcre-libraries=${LOCALBASE}/lib \ --with-libyaml-includes=${LOCALBASE}/include \ --with-libyaml-libraries=${LOCALBASE}/lib \ --with-libnet-includes=${LOCALBASE}/include/libnet11 \ --with-libnet-libraries=${LOCALBASE}/lib/libnet11 CONFIG_DIR?= ${PREFIX}/etc/suricata CONFIG_FILES= suricata.yaml classification.config reference.config RULES_DIR= ${PREFIX}/etc/suricata/rules LOGS_DIR= /var/log/suricata .include .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" BROKEN= Does not compile on ia64, powerpc, or sparc64 .endif .if ${CC} == "clang" || ${CXX} == "clang++" BROKEN= Does not build when compiled with clang .endif .if ${PORT_OPTIONS:MPRELUDE} LIB_DEPENDS+= prelude:${PORTSDIR}/security/libprelude CONFIGURE_ARGS+= --enable-prelude \ --with-libprelude-prefix=${LOCALBASE} PLIST_SUB+= PRELUDE="" .endif .if ${PORT_OPTIONS:MIPFW} CONFIGURE_ARGS+= --enable-ipfw .endif .if ${PORT_OPTIONS:MPORTS_PCAP} LIB_DEPENDS+= pcap:${PORTSDIR}/net/libpcap CONFIGURE_ARGS+= --with-libpcap-includes=${LOCALBASE}/include \ --with-libpcap-libraries=${LOCALBASE}/lib .else CONFIGURE_ARGS+= --with-libpcap-includes=/usr/include \ --with-libpcap-libraries=/usr/lib .endif .if ${PORT_OPTIONS:MDAG} CONFIGURE_ARGS+= --enable-dag \ --with-dag-includes=${LOCALBASE}/include \ --with-dag-libraries=${LOCALBASE}/lib .endif AUTOTOOLSFILES= aclocal.m4 libhtp/aclocal.m4 post-patch: @${REINPLACE_CMD} -Ee 's|^(install-data-am: )install-pkgconfigDATA|\1|' ${WRKSRC}/libhtp/Makefile.in .for f in ${AUTOTOOLSFILES} @${REINPLACE_CMD} -e 's|1.11.3|%%AUTOMAKE_APIVER%%|g' ${WRKSRC}/${f} .endfor pre-install: @${REINPLACE_CMD} -e 's|/etc/suricata|${PREFIX}/etc/suricata|g' ${WRKSRC}/suricata.yaml post-install: [ -d ${CONFIG_DIR} ] || ${MKDIR} ${CONFIG_DIR} [ -d ${RULES_DIR} ] || ${MKDIR} ${RULES_DIR} [ -d ${LOGS_DIR} ] || ${MKDIR} ${LOGS_DIR} .for f in ${CONFIG_FILES} ${INSTALL_DATA} ${WRKSRC}/${f} ${CONFIG_DIR}/${f}-sample @if [ ! -f ${CONFIG_DIR}/${f} ]; then \ ${CP} -p ${CONFIG_DIR}/${f}-sample ${CONFIG_DIR}/${f} ; \ fi .endfor @${CAT} ${PKGMESSAGE} .include Index: head/security/suricata/distinfo =================================================================== --- head/security/suricata/distinfo (revision 305641) +++ head/security/suricata/distinfo (revision 305642) @@ -1,2 +1,2 @@ -SHA256 (suricata-1.3.1.tar.gz) = 6fe35cca4e3eba34c95ed972ab1157e95c9f3d6ac9c9bb0996344db5a7107e8d -SIZE (suricata-1.3.1.tar.gz) = 2345619 +SHA256 (suricata-1.3.2.tar.gz) = 6fc3b417368069bc8e7901967600c66c8324fdd5bb4cd5bc684e8063e0164b5a +SIZE (suricata-1.3.2.tar.gz) = 2346849 Index: head/security/suricata/files/patch-src__app-layer-htp.c =================================================================== --- head/security/suricata/files/patch-src__app-layer-htp.c (nonexistent) +++ head/security/suricata/files/patch-src__app-layer-htp.c (revision 305642) @@ -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; + } + Property changes on: head/security/suricata/files/patch-src__app-layer-htp.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/suricata/files/patch-src__suricata-common.h =================================================================== --- head/security/suricata/files/patch-src__suricata-common.h (revision 305641) +++ head/security/suricata/files/patch-src__suricata-common.h (revision 305642) @@ -1,11 +1,13 @@ ---- ./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 #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 */ #define xstr(s) str(s)