]> 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>
Fri, 26 Feb 2021 12:33:39 +0000 (13:33 +0100)
src/app-layer-detect-proto.c

index f659b9b97f0918537252a4f6c99e33b9c61223f5..91080a15d43ca122096375ef088648c55bc4a05d 100644 (file)
@@ -477,7 +477,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)) {