@ -2700,8 +2700,21 @@ static int SigValidateCheckBuffers(
const DetectEngineAppInspectionEngine * app = de_ctx - > app_inspect_engines ;
for ( ; app ! = NULL ; app = app - > next ) {
if ( app - > sm_list = = b - > id & &
( AppProtoEquals ( s - > alproto , app - > alproto ) | | s - > alproto = = 0 ) ) {
if ( app - > sm_list ! = b - > id )
continue ;
if ( s - > init_data - > hook . type = = SIGNATURE_HOOK_TYPE_APP ) {
/* only allow rules to use the hook for engines at that
* exact progress for now . */
if ( app - > alproto ! = s - > alproto ) {
continue ;
}
} else {
if ( ! ( AppProtoEquals ( s - > alproto , app - > alproto ) | | s - > alproto = = 0 ) ) {
continue ;
}
}
SCLogDebug ( " engine %s dir %d alproto %d " ,
DetectEngineBufferTypeGetNameById ( de_ctx , app - > sm_list ) , app - > dir ,
app - > alproto ) ;
@ -2718,8 +2731,6 @@ static int SigValidateCheckBuffers(
bufdir [ b - > id ] . tc + = ( app - > dir = = 1 ) ;
}
/* only allow rules to use the hook for engines at that
* exact progress for now . */
if ( s - > init_data - > hook . type = = SIGNATURE_HOOK_TYPE_APP ) {
if ( ( s - > flags & SIG_FLAG_TOSERVER ) & & ( app - > dir = = 0 ) & &
app - > progress ! = s - > init_data - > hook . t . app . app_progress ) {
@ -2734,7 +2745,6 @@ static int SigValidateCheckBuffers(
}
}
}
}
if ( ! DetectEngineBufferRunValidateCallback ( de_ctx , b - > id , s , & de_ctx - > sigerror ) ) {
SCReturnInt ( 0 ) ;