"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/network_inspectors/appid/appid_debug.cc" between
snort3-3.1.28.0.tar.gz and snort3-3.1.29.0.tar.gz

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

appid_debug.cc  (snort3-3.1.28.0):appid_debug.cc  (snort3-3.1.29.0)
skipping to change at line 38 skipping to change at line 38
#include "flow/flow_key.h" #include "flow/flow_key.h"
#include "log/messages.h" #include "log/messages.h"
#include "appid_config.h" #include "appid_config.h"
#include "appid_session.h" #include "appid_session.h"
using namespace snort; using namespace snort;
THREAD_LOCAL AppIdDebug* appidDebug = nullptr; THREAD_LOCAL AppIdDebug* appidDebug = nullptr;
void AppIdDebug::activate(const uint32_t* ip1, const uint32_t* ip2, uint16_t por t1, void AppIdDebug::activate(const uint32_t* ip1, const uint32_t* ip2, uint16_t por t1,
uint16_t port2, IpProtocol protocol, const int version, uint16_t address_spa ce_id, uint16_t port2, IpProtocol protocol, const int version, uint32_t address_spa ce_id,
const AppIdSession* session, bool log_all_sessions, int16_t group1, int16_t group2, const AppIdSession* session, bool log_all_sessions, int16_t group1, int16_t group2,
bool inter_group_flow) bool inter_group_flow)
{ {
if (!( log_all_sessions or if (!( log_all_sessions or
( info.proto_match(protocol) and ( info.proto_match(protocol) and
( (info.port_match(port1, port2) and info.ip_match(ip1, ip2)) or ( (info.port_match(port1, port2) and info.ip_match(ip1, ip2)) or
(info.port_match(port2, port1) and info.ip_match(ip2, ip1)) ) ) ) ) (info.port_match(port2, port1) and info.ip_match(ip2, ip1)) ) ) ) )
{ {
active = false; active = false;
return; return;
skipping to change at line 118 skipping to change at line 118
dgroup = group1; dgroup = group1;
} }
snort_inet_ntop(af, &sip->u6_addr32[(af == AF_INET)? 3 : 0], sipstr, sizeof( sipstr)); snort_inet_ntop(af, &sip->u6_addr32[(af == AF_INET)? 3 : 0], sipstr, sizeof( sipstr));
snort_inet_ntop(af, &dip->u6_addr32[(af == AF_INET)? 3 : 0], dipstr, sizeof( dipstr)); snort_inet_ntop(af, &dip->u6_addr32[(af == AF_INET)? 3 : 0], dipstr, sizeof( dipstr));
char gr_buf[32] = { '\0' }; char gr_buf[32] = { '\0' };
if (inter_group_flow) if (inter_group_flow)
snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", sgroup, dgroup); snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", sgroup, dgroup);
snprintf(debug_session, sizeof(debug_session), snprintf(debug_session, sizeof(debug_session),
"%s %hu -> %s %hu %hhu AS=%hu ID=%u%s", "%s %hu -> %s %hu %hhu AS=%u ID=%u%s",
sipstr, sport, dipstr, dport, static_cast<uint8_t>(protocol), sipstr, sport, dipstr, dport, static_cast<uint8_t>(protocol),
address_space_id, get_instance_id(), gr_buf); address_space_id, get_instance_id(), gr_buf);
} }
void AppIdDebug::activate(const Flow *flow, const AppIdSession* session, bool lo g_all_sessions) void AppIdDebug::activate(const Flow *flow, const AppIdSession* session, bool lo g_all_sessions)
{ {
if (flow == nullptr) if (flow == nullptr)
{ {
active = false; active = false;
return; return;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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