]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #3109 in SNORT/snort3 from ~CLJUDGE/snort3:snort3_change_efp_api_n...
authorShravan Rangarajuvenkata (shrarang) <shrarang@cisco.com>
Mon, 18 Oct 2021 17:48:30 +0000 (17:48 +0000)
committerShravan Rangarajuvenkata (shrarang) <shrarang@cisco.com>
Mon, 18 Oct 2021 17:48:30 +0000 (17:48 +0000)
Squashed commit of the following:

commit 688e16cf8b054340cea70ad844a2b59de72f1680
Author: cljudge <cljudge@cisco.com>
Date:   Wed Oct 13 22:50:23 2021 -0400

    appid: Update the name of the lua API function that adds process name to client app mappings.

src/network_inspectors/appid/lua_detector_api.cc

index 18b09e9a0086904835c68a3aa3551db2b6f626cf..b0946b529d47038c0cb376ec5bc8ed2bf408bf30 100644 (file)
@@ -992,7 +992,7 @@ static int client_add_payload(lua_State* L)
  *  @param process_name/stack - encrypted fingerprint process name
  *  @param process_score - encrypted fingerprint process_score
  */
-static int client_add_fingerprint_process(lua_State* L)
+static int add_process_to_client_mapping(lua_State* L)
 {
     auto& ud = *UserData<LuaObject>::check(L, DETECTOR, 1);
     // Verify detector user data and that we are NOT in packet context
@@ -1352,14 +1352,14 @@ static int register_callback(lua_State* L, LuaObject& ud, AppInfoFlags flag)
 
 static int detector_register_client_callback(lua_State* L)
 {
-    auto& ud = *UserData<LuaClientObject>::check(L, DETECTOR, 1);
+    const auto& ud = *UserData<LuaClientObject>::check(L, DETECTOR, 1);
 
     return register_callback(L, *ud, APPINFO_FLAG_CLIENT_DETECTOR_CALLBACK);
 }
 
 static int detector_register_service_callback(lua_State* L)
 {
-    auto& ud = *UserData<LuaServiceObject>::check(L, DETECTOR, 1);
+    const auto& ud = *UserData<LuaServiceObject>::check(L, DETECTOR, 1);
 
     return register_callback(L, *ud, APPINFO_FLAG_SERVICE_DETECTOR_CALLBACK);
 }
@@ -2719,7 +2719,7 @@ static const luaL_Reg detector_methods[] =
     { "client_addPayload",        client_add_payload },
 
     /* add client mapping for process name derived by fingerprinting */
-    { "client_addFingerprintProcess", client_add_fingerprint_process },
+    { "addProcessToClientMapping", add_process_to_client_mapping },
 
     //HTTP Multi Pattern engine
     { "CHPCreateApp",             detector_chp_create_application },