From: Sreeja Athirkandathil Narayanan (sathirka) Date: Tue, 6 Dec 2022 17:07:35 +0000 (+0000) Subject: Pull request #3687: appid: appid_detector_builder.sh addPortPatternService call fixed X-Git-Tag: 3.1.49.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6d34e6afdaa8a1d93d0da8c3c31118435d759a2;p=thirdparty%2Fsnort3.git Pull request #3687: appid: appid_detector_builder.sh addPortPatternService call fixed Merge in SNORT/snort3 from ~OSTEPANO/snort3:appid_detector_builder_fix to master Squashed commit of the following: commit 176b01a35d7947d4d33819333078a275697a9e21 Author: Oleksandr Stepanov Date: Thu Dec 1 07:57:37 2022 -0500 appid: appid_detector_builder.sh addPortPatternService call fixed --- diff --git a/tools/appid_detector_builder.sh b/tools/appid_detector_builder.sh index 6ba2218c3..7fc7c5514 100755 --- a/tools/appid_detector_builder.sh +++ b/tools/appid_detector_builder.sh @@ -315,13 +315,13 @@ fi function output_port_pattern_server() { if [[ "$port" = "-1" ]]; then -echo -en "\t\tgDetector:addPortPatternServer($protocol_string,0,\"" >>"${INTERMEDIATEFILE_SERVER}" +echo -en "\t\tgDetector:addPortPatternService($protocol_string,0,\"" >>"${INTERMEDIATEFILE_SERVER}" echo -n "${pattern_string}" >>"${INTERMEDIATEFILE_SERVER}" echo -e "\",$pattern_offset, gAppId);" >>"${INTERMEDIATEFILE_SERVER}" else local i=0; while [[ "${port[i]}" != "" ]]; do -echo -en "\t\tgDetector:addPortPatternServer($protocol_string,${port[i]},\"" >>"${INTERMEDIATEFILE_SERVER}" +echo -en "\t\tgDetector:addPortPatternService($protocol_string,${port[i]},\"" >>"${INTERMEDIATEFILE_SERVER}" echo -n "${pattern_string}" >>"${INTERMEDIATEFILE_SERVER}" echo -e "\",$pattern_offset, gAppId);" >>"${INTERMEDIATEFILE_SERVER}" i=$(( $i + 1 )) @@ -331,7 +331,7 @@ fi function output_optional_server() { if [[ -f "$INTERMEDIATEFILE_SERVER" ]]; then - echo -e "\tif gDetector.addPortPatternServer then" >>"${OUTPUTFILE}" + echo -e "\tif gDetector.addPortPatternService then" >>"${OUTPUTFILE}" cat "${INTERMEDIATEFILE_SERVER}" >>"${OUTPUTFILE}" echo -e "\tend" >>"${OUTPUTFILE}" rm "${INTERMEDIATEFILE_SERVER}"