From 227a5d75632465866fbd7e7da7b5aaad8c19381a Mon Sep 17 00:00:00 2001 From: "Mike Stepanek (mstepane)" Date: Mon, 2 Jul 2018 13:59:36 -0400 Subject: [PATCH] Merge pull request #1292 in SNORT/snort3 from appid_conf_flags to master Squashed commit of the following: commit 520a3f692baae1dbf979c6cdefa6455accd9a05e Author: Silviu Minut Date: Tue Jun 26 12:02:33 2018 -0400 appid: combine the two calls to get_app_info_flags() into a single one. --- src/network_inspectors/appid/tp_appid_utils.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/network_inspectors/appid/tp_appid_utils.cc b/src/network_inspectors/appid/tp_appid_utils.cc index bfe709c13..ed1207d37 100644 --- a/src/network_inspectors/appid/tp_appid_utils.cc +++ b/src/network_inspectors/appid/tp_appid_utils.cc @@ -671,7 +671,10 @@ bool do_tp_discovery(AppIdSession& asd, IpProtocol protocol, asd.is_http2 = true; } // if the third-party appId must be treated as a client, do it now - if (asd.app_info_mgr->get_app_info_flags(tp_app_id, APPINFO_FLAG_TP_CLIENT)) + unsigned app_info_flags = asd.app_info_mgr->get_app_info_flags(tp_app_id, + APPINFO_FLAG_TP_CLIENT | APPINFO_FLAG_IGNORE); + + if ( app_info_flags & APPINFO_FLAG_TP_CLIENT ) asd.client.set_id(tp_app_id); process_third_party_results(asd, tp_confidence, tp_proto_list, tp_attribute_data); @@ -682,7 +685,7 @@ bool do_tp_discovery(AppIdSession& asd, IpProtocol protocol, setSSLSquelch(p, 1, tp_app_id, asd.get_inspector()); } - if (asd.app_info_mgr->get_app_info_flags(tp_app_id, APPINFO_FLAG_IGNORE)) + if ( app_info_flags & APPINFO_FLAG_IGNORE ) { if (appidDebug->is_active()) LogMessage("AppIdDbg %s 3rd party ignored\n", @@ -733,7 +736,7 @@ bool do_tp_discovery(AppIdSession& asd, IpProtocol protocol, // Handle HTTP tunneling and SSL possibly then being used in that tunnel if (tp_app_id == APP_ID_HTTP_TUNNEL) - asd.set_payload_appid_data(APP_ID_HTTP_TUNNEL, NULL); + asd.set_payload_appid_data(APP_ID_HTTP_TUNNEL, NULL); else if ((asd.payload.get_id() == APP_ID_HTTP_TUNNEL) && (tp_app_id == APP_ID_SSL)) asd.set_payload_appid_data(APP_ID_HTTP_SSL_TUNNEL, NULL); @@ -832,3 +835,4 @@ bool do_tp_discovery(AppIdSession& asd, IpProtocol protocol, return isTpAppidDiscoveryDone; } + -- 2.47.3