config->allow_port_wildcard_host_cache = true;
}
}
+ else if (!(strcasecmp(conf_key, "recheck_for_portservice_appid")))
+ {
+ if (!(strcasecmp(conf_val, "enabled")))
+ {
+ config->recheck_for_portservice_appid = true;
+ }
+ }
else if (!(strcasecmp(conf_key, "bittorrent_aggressiveness")))
{
int aggressiveness = atoi(conf_val);
if (aggressiveness >= 50)
{
config->host_port_app_cache_lookup_interval = 5;
+ config->recheck_for_portservice_appid = true;
set_app_info_flags(APP_ID_BITTORRENT, APPINFO_FLAG_DEFER);
set_app_info_flags(APP_ID_BITTORRENT, APPINFO_FLAG_DEFER_PAYLOAD);
config->max_tp_flow_depth = 25;
LogMessage("AppId: host_port_app_cache_lookup_interval %d\n", config->host_port_app_cache_lookup_interval);
+ LogMessage("AppId: recheck_for_portservice_appid enabled\n");
LogMessage("AppId: defer_to_thirdparty %d\n", APP_ID_BITTORRENT);
LogMessage("AppId: defer_payload_to_thirdparty %d\n", APP_ID_BITTORRENT);
LogMessage("AppId: max_tp_flow_depth %d\n", config->max_tp_flow_depth);
uint32_t host_port_app_cache_lookup_range = 100000;
uint32_t http_response_version_enabled = 0;
bool allow_port_wildcard_host_cache = false;
+ bool recheck_for_portservice_appid = false;
};
typedef std::array<SF_LIST*, APP_ID_PORT_ARRAY_SIZE> AppIdPortExclusions;
misc_id = asd.pick_misc_app_id();;
bool is_http_tunnel = ((asd.payload.get_id() == APP_ID_HTTP_TUNNEL) || (asd.payload.get_id() == APP_ID_HTTP_SSL_TUNNEL)) ? true:false;
- if ((is_http_tunnel) or ((service_id == APP_ID_UNKNOWN_UI or service_id <= APP_ID_NONE ) and
- (client_id <= APP_ID_NONE and payload_id <= APP_ID_NONE and misc_id <= APP_ID_NONE)))
+ bool is_appid_none = (client_id <= APP_ID_NONE and payload_id <= APP_ID_NONE and misc_id <= APP_ID_NONE);
+ if ((is_appid_none and (service_id == APP_ID_UNKNOWN_UI or service_id <= APP_ID_NONE or
+ (asd.config->mod_config->recheck_for_portservice_appid and service_id == asd.service.get_port_service_id())))
+ or (is_http_tunnel))
{
if(is_http_tunnel)
{
}
if (do_host_port_based_discovery(p, asd, protocol, direction))
{
+ asd.service.set_port_service_id(APP_ID_NONE);
service_id = asd.pick_service_app_id();
client_id = asd.pick_client_app_id();
payload_id = asd.pick_payload_app_id();