When registing a detection engine, check that the app-layer
protocol supports tx detect flags. Exit with a fatal
error if it does not as this is a code implementation
error that should be resolved during development.
AppProto alproto, uint32_t dir,
int progress, InspectEngineFuncPtr Callback)
{
+ if (AppLayerParserIsTxAware(alproto)) {
+ if (!AppLayerParserSupportsTxDetectFlags(alproto)) {
+ FatalError(SC_ERR_INITIALIZATION,
+ "Inspect engine registered for app-layer protocol without "
+ "TX detect flag support: %s", AppProtoToString(alproto));
+ }
+ }
DetectBufferTypeRegister(name);
const int sm_list = DetectBufferTypeGetByName(name);
if (sm_list == -1) {