TCP packet used in matching fixed

This commit is contained in:
Domingo Dirutigliano
2025-02-25 11:18:30 +01:00
parent a9472ba580
commit 7cc005dfb2

View File

@@ -179,6 +179,8 @@ public:
static void on_data_recv(Stream& stream, RegexNfQueue* nfq, string data) { static void on_data_recv(Stream& stream, RegexNfQueue* nfq, string data) {
nfq->match_ctx.matching_has_been_called = true; nfq->match_ctx.matching_has_been_called = true;
nfq->match_ctx.already_closed = false; nfq->match_ctx.already_closed = false;
nfq->match_ctx.pkt->data = data.data();
nfq->match_ctx.pkt->data_size = data.size();
bool result = nfq->filter_action(nfq->match_ctx.pkt); bool result = nfq->filter_action(nfq->match_ctx.pkt);
if (!result){ if (!result){
nfq->sctx.clean_stream_by_id(nfq->match_ctx.pkt->sid); nfq->sctx.clean_stream_by_id(nfq->match_ctx.pkt->sid);
@@ -226,4 +228,4 @@ public:
}; };
}} }}
#endif // REGEX_FILTER_CLASS_CPP #endif // REGEX_FILTER_CLASS_CPP