]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
enip: register on default 44818/tcp port
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 22 Dec 2023 09:05:17 +0000 (10:05 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 17 Apr 2024 05:17:02 +0000 (07:17 +0200)
if no config option is found,
as is done for udp

Ticket: 6304

src/app-layer-enip.c

index 2fbe898d4e63ac34a61dac08c45ee1ed241cade3..9de79579f8bfddf14edd8f7c94ce4518916dc2e6 100644 (file)
@@ -597,6 +597,14 @@ void RegisterENIPTCPParsers(void)
                     proto_name, ALPROTO_ENIP, 0, sizeof(ENIPEncapHdr),
                     ENIPProbingParser, ENIPProbingParser))
             {
+                SCLogDebug("no ENIP TCP config found enabling ENIP detection on port 44818.");
+
+                AppLayerProtoDetectPPRegister(IPPROTO_TCP, "44818", ALPROTO_ENIP, 0,
+                        sizeof(ENIPEncapHdr), STREAM_TOSERVER, ENIPProbingParser, NULL);
+
+                AppLayerProtoDetectPPRegister(IPPROTO_TCP, "44818", ALPROTO_ENIP, 0,
+                        sizeof(ENIPEncapHdr), STREAM_TOCLIENT, ENIPProbingParser, NULL);
+
                 return;
             }
         }