From 0b63894c5d519586031f2b7e3daa7263a90594c2 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 26 Sep 2025 10:55:35 +0200 Subject: [PATCH] detect: remove ifdefed out code engine-proto accepting numerical values should be done with generic integer framework if wanted Ticket: 7889 --- src/detect-engine-proto.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/detect-engine-proto.c b/src/detect-engine-proto.c index 5ead3d8d93..95156de26b 100644 --- a/src/detect-engine-proto.c +++ b/src/detect-engine-proto.c @@ -100,26 +100,6 @@ int DetectProtoParse(DetectProto *dp, const char *str) SCLogDebug("IP protocol detected"); } else { goto error; - - /** \todo are numeric protocols even valid? */ -#if 0 - uint8_t proto_u8; /* Used to avoid sign extension */ - - /* Extract out a 0-256 value with validation checks */ - if (ByteExtractStringUint8(&proto_u8, 10, 0, str) == -1) { - // XXX - SCLogDebug("DetectProtoParse: Error in extracting byte string"); - goto error; - } - proto = (int)proto_u8; - - /* Proto 0 is the same as "ip" above */ - if (proto == IPPROTO_IP) { - dp->flags |= DETECT_PROTO_ANY; - } else { - dp->proto[proto / 8] |= 1<<(proto % 8); - } -#endif } return 0;