@ -507,6 +507,7 @@ static int TCPProtoDetect(ThreadVars *tv,
int r = AppLayerParserParse ( tv , app_tctx - > alp_tctx , f , f - > alproto ,
flags , data , data_len ) ;
PACKET_PROFILING_APP_END ( app_tctx , f - > alproto ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
if ( r ! = 1 ) {
StreamTcpUpdateAppLayerProgress ( ssn , direction , data_len ) ;
}
@ -580,6 +581,7 @@ static int TCPProtoDetect(ThreadVars *tv,
f - > alproto , flags ,
data , data_len ) ;
PACKET_PROFILING_APP_END ( app_tctx , f - > alproto ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
if ( r ! = 1 ) {
StreamTcpUpdateAppLayerProgress ( ssn , direction , data_len ) ;
}
@ -684,6 +686,7 @@ int AppLayerHandleTCPData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
r = AppLayerParserParse ( tv , app_tctx - > alp_tctx , f , f - > alproto ,
flags , data , data_len ) ;
PACKET_PROFILING_APP_END ( app_tctx , f - > alproto ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
/* ignore parser result for gap */
StreamTcpUpdateAppLayerProgress ( ssn , direction , data_len ) ;
if ( r < 0 ) {
@ -767,6 +770,7 @@ int AppLayerHandleTCPData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
r = AppLayerParserParse ( tv , app_tctx - > alp_tctx , f , f - > alproto ,
flags , data , data_len ) ;
PACKET_PROFILING_APP_END ( app_tctx , f - > alproto ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
if ( r ! = 1 ) {
StreamTcpUpdateAppLayerProgress ( ssn , direction , data_len ) ;
if ( r < 0 ) {
@ -891,6 +895,7 @@ int AppLayerHandleUdp(ThreadVars *tv, AppLayerThreadCtx *tctx, Packet *p, Flow *
r = AppLayerParserParse ( tv , tctx - > alp_tctx , f , f - > alproto ,
flags , p - > payload , p - > payload_len ) ;
PACKET_PROFILING_APP_END ( tctx , f - > alproto ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
}
PACKET_PROFILING_APP_STORE ( tctx , p ) ;
/* we do only inspection in one direction, so flag both
@ -907,6 +912,7 @@ int AppLayerHandleUdp(ThreadVars *tv, AppLayerThreadCtx *tctx, Packet *p, Flow *
flags , p - > payload , p - > payload_len ) ;
PACKET_PROFILING_APP_END ( tctx , f - > alproto ) ;
PACKET_PROFILING_APP_STORE ( tctx , p ) ;
p - > flags | = PKT_APPLAYER_UPDATE ;
}
if ( r < 0 ) {
ExceptionPolicyApply ( p , g_applayerparser_error_policy , PKT_DROP_REASON_APPLAYER_ERROR ) ;