Squashed commit of the following:
commit
a40f41d770a0cee1d574dfb383a53f622decfad7
Author: krishnakanth <vkambala@cisco.com>
Date: Tue Aug 17 04:08:06 2021 -0400
smb: Invoke SMB debug in destructor when packet thread available
Dce2Smb2FileTracker::~Dce2Smb2FileTracker(void)
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL, GET_CURRENT_PACKET, "file tracker %" PRIu64
" file name hash %" PRIu64 " terminating\n", file_id, file_name_hash);
~Dce2Smb2RequestTracker()
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (snort::is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL, GET_CURRENT_PACKET, "request tracker terminating\n");
}
// Session Tracker is created and destroyed only from session cache
Dce2Smb2SessionTracker::~Dce2Smb2SessionTracker(void)
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (snort::is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID,
TRACE_DEBUG_LEVEL, GET_CURRENT_PACKET,
Dce2Smb2TreeTracker::~Dce2Smb2TreeTracker(void)
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL,
GET_CURRENT_PACKET, "tree tracker %" PRIu32 " terminating\n", tree_id);
if (active_requests.size())
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL,
GET_CURRENT_PACKET, "cleanup pending requests for below MIDs:\n");
}
for (auto it_request : active_requests)
{
- if (smb_module_is_up)
+ if (smb_module_is_up and (is_packet_thread()))
{
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL,
GET_CURRENT_PACKET, "mid %" PRIu64 "\n", it_request.first.mid);
"SMB - excessive tree connect requests with pending tree connect responses"
#define DCE2_SMB_EXCESSIVE_READS_STR "SMB - excessive read requests with pending read responses"
#define DCE2_SMB_EXCESSIVE_CHAINING_STR "SMB - excessive command chaining"
-#define DCE2_SMB_MULT_CHAIN_SS_STR "SMB - multiple chained tree connect requests"
-#define DCE2_SMB_MULT_CHAIN_TC_STR "SMB - multiple chained tree connect requests"
+#define DCE2_SMB_MULT_CHAIN_SS_STR "SMB - Multiple chained login requests"
+#define DCE2_SMB_MULT_CHAIN_TC_STR "SMB - Multiple chained tree connect requests"
#define DCE2_SMB_CHAIN_SS_LOGOFF_STR "SMB - chained/compounded login followed by logoff"
#define DCE2_SMB_CHAIN_TC_TDIS_STR \
"SMB - chained/compounded tree connect followed by tree disconnect"