diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index ce5c8c2528..ccf3353d12 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1325,7 +1325,7 @@ void AppLayerProtoDetectPPRegister(uint8_t ipproto, SCReturn; } -void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, +int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, uint8_t ipproto, const char *alproto_name, AppProto alproto, @@ -1338,6 +1338,7 @@ void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, int r; ConfNode *node; ConfNode *port_node = NULL; + int config = 0; r = snprintf(param, sizeof(param), "%s%s%s", "app-layer.protocols.", alproto_name, ".detection-ports"); @@ -1386,8 +1387,9 @@ void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, } + config = 1; end: - SCReturn; + SCReturnInt(config); } /***** PM registration *****/ diff --git a/src/app-layer-detect-proto.h b/src/app-layer-detect-proto.h index 844736dca3..81b75fe392 100644 --- a/src/app-layer-detect-proto.h +++ b/src/app-layer-detect-proto.h @@ -66,7 +66,10 @@ void AppLayerProtoDetectPPRegister(uint8_t ipproto, uint16_t min_depth, uint16_t max_depth, uint8_t direction, ProbingParserFPtr ProbingParser); -void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, +/** + * \retval bool 0 if no config was found, 1 if config was found + */ +int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, uint8_t ipproto, const char *alproto_name, AppProto alproto,