This commit adds logic checking if the sticky buffer in effect provides
the required content.
If the sticky buffer doesn't, the rule will not load and a diagnostic
message with follow-on steps is displayed.
int sm_list = -1;
if (s->init_data->list != DETECT_SM_LIST_NOTSET) {
+ if (parsed_sm_list != DETECT_SM_LIST_NOTSET && parsed_sm_list != s->init_data->list) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE,
+ "Expression seen with a sticky buffer still set; either (1) reset sticky "
+ "buffer with pkt_data or (2) use a sticky buffer providing \"%s\".",
+ DetectBufferTypeGetDescriptionById(de_ctx, parsed_sm_list));
+ goto error;
+ }
if (DetectBufferGetActiveList(de_ctx, s) == -1)
goto error;