Remove BUG_ON(1) in app layer event second stage preparation function.

This lets us single out and print rules that result in a failure, than
just post a core dump.
pull/763/merge
Anoop Saldanha 11 years ago committed by Victor Julien
parent 92a821cdd9
commit d06a193012

@ -149,7 +149,7 @@ static int DetectAppLayerEventParseAppP2(DetectAppLayerEventData *data,
} else if (ipproto_bitarray[IPPROTO_UDP / 8] & 1 << (IPPROTO_UDP % 8)) {
ipproto = IPPROTO_UDP;
} else {
BUG_ON(1);
return -1;
}
r = AppLayerParserGetEventInfo(ipproto, data->alproto,

@ -1367,7 +1367,8 @@ static Signature *SigInitHelper(DetectEngineCtx *de_ctx, char *sigstr,
AppLayerProtoDetectSupportedIpprotos(sig->alproto, sig->proto.proto);
}
DetectAppLayerEventPrepare(sig);
if (DetectAppLayerEventPrepare(sig) < 0)
goto error;
/* set mpm_content_len */

Loading…
Cancel
Save