From: Russ Combs (rucombs) Date: Fri, 3 Jun 2016 18:35:31 +0000 (-0400) Subject: Merge pull request #499 in SNORT/snort3 from build_199 to master X-Git-Tag: 3.0.0-233~380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc1982df61e7a2d100012e2f5d872c2ad5a91aab;p=thirdparty%2Fsnort3.git Merge pull request #499 in SNORT/snort3 from build_199 to master Squashed commit of the following: commit a68639da5f58501b492c5e6f3c0f74cd6298b85b Author: snorty Date: Fri Jun 3 13:51:57 2016 -0400 build 199, fix warnings --- diff --git a/ChangeLog b/ChangeLog index 262f9f716..d3f4727e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +16/06/03 - build 199 + +-- add new http_inspect alerts abusive content-length and transfer-encodings +-- add \b matching to sensitive data +-- add obfuscation for sensitive data +-- add support for unprivileged operation +-- fix link with dynamic DAQ +-- convert legacy allocations to memory manager for better memory profiling + 16/05/27 - build 198 -- add double-decoding to new_http_inspect diff --git a/src/detection/detect.cc b/src/detection/detect.cc index 0393053a8..1ba081b09 100644 --- a/src/detection/detect.cc +++ b/src/detection/detect.cc @@ -337,7 +337,7 @@ static int CheckAddrPort( } } - DebugFormat(DEBUG_DETECT, "addr %lx, port %d ", pkt_addr, pkt_port); + DebugFormat(DEBUG_DETECT, "addr %s, port %d ", sfip_to_str(pkt_addr), pkt_port); if (!rule_addr) goto bail; diff --git a/src/detection/treenodes.cc b/src/detection/treenodes.cc index b08a79eb2..d1e7ddbfb 100644 --- a/src/detection/treenodes.cc +++ b/src/detection/treenodes.cc @@ -61,7 +61,7 @@ OptFpList* AddOptFuncToList(RuleOptEvalFunc ro_eval_func, OptTreeNode* otn) tmp->next = ofp; } - DebugFormat(DEBUG_CONFIGRULES,"Set OptTestFunc to %p\n", (void*) ro_eval_func); + DebugFormat(DEBUG_CONFIGRULES,"Set OptTestFunc to %p\n", (void*)ro_eval_func); ofp->OptTestFunc = ro_eval_func; diff --git a/src/main/build.h b/src/main/build.h index cb8f96dd9..40fd6712f 100644 --- a/src/main/build.h +++ b/src/main/build.h @@ -10,7 +10,7 @@ // // //-----------------------------------------------// -#define BUILD "198" +#define BUILD "199" #endif diff --git a/src/stream/tcp/tcp_session.cc b/src/stream/tcp/tcp_session.cc index 6d4ac7fc4..e7a50f384 100644 --- a/src/stream/tcp/tcp_session.cc +++ b/src/stream/tcp/tcp_session.cc @@ -1099,10 +1099,17 @@ int TcpSession::process(Packet* p) ( char flagbuf[9]; CreateTCPFlagString(p->ptrs.tcph, flagbuf); + + char src_addr[INET6_ADDRSTRLEN]; + char dst_addr[INET6_ADDRSTRLEN]; + + sfip_ntop(p->ptrs.ip_api.get_src(), src_addr, sizeof(src_addr)); + sfip_ntop(p->ptrs.ip_api.get_dst(), dst_addr, sizeof(dst_addr)); + DebugFormat((DEBUG_STREAM|DEBUG_STREAM_STATE), - "Got TCP Packet 0x%X:%d -> 0x%X:%d %s\nseq: 0x%X ack:0x%X dsize: %u\n", - p->ptrs.ip_api.get_src(), p->ptrs.sp, p->ptrs.ip_api.get_dst(), p->ptrs.dp, flagbuf, - p->ptrs.tcph->seq(), p->ptrs.tcph->ack(), p->dsize); + "Got TCP Packet %s:%d -> %s:%d %s\nseq: 0x%X ack:0x%X dsize: %u\n", + src_addr, p->ptrs.sp, dst_addr, p->ptrs.dp, flagbuf, + p->ptrs.tcph->seq(), p->ptrs.tcph->ack(), p->dsize); ); assert(flow->ssn_server);