protodetect: run expected probing parser

When there is a protocol change, and a specific protocol is
expected, like WebSeocket, always run it, no matter the port.
pull/10873/head
Philippe Antoine 1 year ago committed by Victor Julien
parent 155d671b26
commit 78b766048e

@ -581,7 +581,10 @@ again_midstream:
}
}
if (dir == STREAM_TOSERVER && f->alproto_tc != ALPROTO_UNKNOWN) {
if (f->alproto_expect != ALPROTO_UNKNOWN) {
// needed for websocket which does not use ports
pe0 = AppLayerProtoDetectGetProbingParser(alpd_ctx.ctx_pp, ipproto, f->alproto_expect);
} else if (dir == STREAM_TOSERVER && f->alproto_tc != ALPROTO_UNKNOWN) {
pe0 = AppLayerProtoDetectGetProbingParser(alpd_ctx.ctx_pp, ipproto, f->alproto_tc);
} else if (dir == STREAM_TOCLIENT && f->alproto_ts != ALPROTO_UNKNOWN) {
pe0 = AppLayerProtoDetectGetProbingParser(alpd_ctx.ctx_pp, ipproto, f->alproto_ts);

Loading…
Cancel
Save