return 0;
}
-void checkSandboxDetection(AppId appId)
-{
- if (AppIdConfig::get_appid_config()->mod_config->instance_id)
- {
- auto entry = AppInfoManager::get_instance().get_app_info_entry(appId);
- if ( entry && ( entry->flags & APPINFO_FLAG_ACTIVE ) )
- {
- DebugFormat(DEBUG_APPID, "Detected application %d is active.\n", entry->appId);
- }
- else if( appId != 0 )
- {
- if(entry)
- {
- DebugFormat(DEBUG_APPID, "Detected application %d is not active.\n", appId);
- }
- else
- {
- DebugFormat(DEBUG_APPID,
- "No entry in application info table for detected application %d.\n",
- appId);
- }
- }
- }
-}
-
AppInfoTableEntry* AppInfoManager::get_app_info_entry(AppId appId, const AppInfoTable& lookup_table)
{
AppId tmp;
void AppIdSession::add_payload(AppIdSession* asd, AppId payload_id)
{
- checkSandboxDetection(payload_id);
asd->payload_app_id = payload_id;
}
unsigned prev_priority = app_info_mgr->get_app_info_priority(client_app_id);
unsigned curr_priority = app_info_mgr->get_app_info_priority(id);
- checkSandboxDetection(id);
-
if ((client_app_id) && (prev_priority > curr_priority ))
return;
client_app_id = id;
return;
if (referred_payload_app_id != id)
- {
- checkSandboxDetection(id);
referred_payload_app_id = id;
- }
}
void AppIdSession::set_payload_app_id_data(ApplicationId id, char** version)
unsigned prev_priority = app_info_mgr->get_app_info_priority(payload_app_id);
unsigned curr_priority = app_info_mgr->get_app_info_priority(id);
- checkSandboxDetection(id);
-
if ((payload_app_id ) && (prev_priority > curr_priority ))
return;
if (serviceAppId != id)
{
serviceAppId = id;
- checkSandboxDetection(id);
/* Clear out previous values of vendor & version */
if (serviceVendor)
memset(&hmp, 0, sizeof(hmp));
if (serviceAppId == APP_ID_NONE)
- {
serviceAppId = APP_ID_HTTP;
- checkSandboxDetection(APP_ID_HTTP);
- }
if (session_logging_enabled)
LogMessage("AppIdDbg %s chp_finished %d chp_hold_flow %d\n", session_logging_id,
else
appId = config->ip_protocol[(uint16_t)proto];
- checkSandboxDetection(appId);
-
return appId;
}
}
asd->set_session_flags(APPID_SESSION_SERVICE_DETECTED);
asd->serviceAppId = appId;
- checkSandboxDetection(appId);
if (asd->get_session_flags(APPID_SESSION_IGNORE_HOST))
return SERVICE_SUCCESS;