]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
protodetect: only run ProbingParserTc if STREAM_TOCLIENT
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 17 Feb 2021 13:54:46 +0000 (14:54 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 27 Feb 2021 17:46:45 +0000 (18:46 +0100)
(cherry picked from commit 660e9e489b7d898509946d8a66f15c6107fd5a4e)

src/app-layer-detect-proto.c

index 13e2ca219bcb38c2a1945450b645cd84b16c57d0..f2562d016a15d1eaf93efa95d8cbb143ffea4f8b 100644 (file)
@@ -474,7 +474,7 @@ static inline AppProto PPGetProto(const AppLayerProtoDetectProbingParserElement
         AppProto alproto = ALPROTO_UNKNOWN;
         if (flags & STREAM_TOSERVER && pe->ProbingParserTs != NULL) {
             alproto = pe->ProbingParserTs(f, flags, buf, buflen, rdir);
-        } else if (pe->ProbingParserTc != NULL) {
+        } else if (flags & STREAM_TOCLIENT && pe->ProbingParserTc != NULL) {
             alproto = pe->ProbingParserTc(f, flags, buf, buflen, rdir);
         }
         if (AppProtoIsValid(alproto)) {