protodetect: debug validation when multiple patterns match

pull/5774/head
Philippe Antoine 6 years ago committed by Victor Julien
parent 00d7c9034b
commit f5d8e953a8

@ -41,6 +41,7 @@
#include "util-pool.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-validate.h"
#include "flow.h"
#include "flow-util.h"
@ -1551,6 +1552,7 @@ AppProto AppLayerProtoDetectGetProto(AppLayerProtoDetectThreadCtx *tctx,
uint16_t pm_matches = AppLayerProtoDetectPMGetProto(tctx, f,
buf, buflen, direction, pm_results, reverse_flow);
if (pm_matches > 0) {
DEBUG_VALIDATE_BUG_ON(pm_matches > 1);
alproto = pm_results[0];
// rerun probing parser for other direction if it is unknown

Loading…
Cancel
Save