From 46ce75fa78b2bc12fc4cc0184ed5652c9edccab4 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 11 Jul 2011 12:44:48 -0500 Subject: [PATCH 1/2] Add git ignore for public trace testing repo path. To help prevent it from being accidentally added. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 378eac25d3..48023f31da 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +testing/external/bro-testing From f83650f14ad18093598b2f69c17a1b20b044a10c Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Mon, 11 Jul 2011 22:18:22 -0700 Subject: [PATCH 2/2] Fixing reporter's weird flow method. --- src/Reporter.cc | 4 ++-- src/Reporter.h | 4 ++-- src/Sessions.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Reporter.cc b/src/Reporter.cc index 17c6744a89..4a8e35e650 100644 --- a/src/Reporter.cc +++ b/src/Reporter.cc @@ -139,7 +139,7 @@ void Reporter::WeirdHelper(EventHandlerPtr event, Val* conn_val, const char* nam delete vl; } -void Reporter::WeirdFlowHelper(addr_type orig, addr_type resp, const char* name, ...) +void Reporter::WeirdFlowHelper(const uint32* orig, const uint32* resp, const char* name, ...) { val_list* vl = new val_list(2); vl->append(new AddrVal(orig)); @@ -168,7 +168,7 @@ void Reporter::Weird(Val* conn_val, const char* name, const char* addl) WeirdHelper(conn_weird, conn_val, name, addl); } -void Reporter::Weird(addr_type orig, addr_type resp, const char* name) +void Reporter::Weird(const uint32* orig, const uint32* resp, const char* name) { WeirdFlowHelper(orig, resp, name); } diff --git a/src/Reporter.h b/src/Reporter.h index 6cadd3fb5b..bc919d3908 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -47,7 +47,7 @@ public: void Weird(const char* name); // Raises net_weird(). void Weird(Connection* conn, const char* name, const char* addl = ""); // Raises conn_weird(). void Weird(Val* conn_val, const char* name, const char* addl = ""); // Raises conn_weird(). - void Weird(addr_type orig, addr_type resp, const char* name); // Raises flow_weird(). + void Weird(const uint32* orig, const uint32* resp, const char* name); // Raises flow_weird(). // Syslog a message. This methods does nothing if we're running // offline from a trace. @@ -90,7 +90,7 @@ private: void DoLog(const char* prefix, EventHandlerPtr event, FILE* out, Connection* conn, val_list* addl, bool location, bool time, const char* fmt, va_list ap); void WeirdHelper(EventHandlerPtr event, Val* conn_val, const char* name, const char* addl, ...); - void WeirdFlowHelper(addr_type orig, addr_type resp, const char* name, ...); + void WeirdFlowHelper(const uint32* orig, const uint32* resp, const char* name, ...); int errors; bool via_events; diff --git a/src/Sessions.cc b/src/Sessions.cc index c0ef2d7cab..1678f6798f 100644 --- a/src/Sessions.cc +++ b/src/Sessions.cc @@ -1276,7 +1276,7 @@ void NetSessions::Weird(const char* name, void NetSessions::Weird(const char* name, const IP_Hdr* ip) { - reporter->Weird(ip->SrcAddr4(), ip->DstAddr4(), name); + reporter->Weird(ip->SrcAddr(), ip->DstAddr(), name); } unsigned int NetSessions::ConnectionMemoryUsage()