From c969294fef84d49e31c42c0c11eadb436e17fc6a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 30 Dec 2009 16:28:44 +0100 Subject: [PATCH] Make sure icmp rules also apply to icmpv6 --- src/detect-engine-proto.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/detect-engine-proto.c b/src/detect-engine-proto.c index bc6fe4c8a4..7a4a7fde2a 100644 --- a/src/detect-engine-proto.c +++ b/src/detect-engine-proto.c @@ -80,20 +80,22 @@ int DetectProtoParse(DetectProto *dp, char *str) if (strcasecmp(str, "tcp") == 0) { proto = IPPROTO_TCP; dp->proto[proto / 8] |= 1 << (proto % 8); - SCLogDebug("DetectProtoParse: TCP protocol detected"); + SCLogDebug("TCP protocol detected"); } else if (strcasecmp(str, "udp") == 0) { proto = IPPROTO_UDP; dp->proto[proto / 8] |= 1 << (proto % 8); - SCLogDebug("DetectProtoParse: UDP protocol detected"); + SCLogDebug("UDP protocol detected"); } else if (strcasecmp(str, "icmp") == 0) { proto = IPPROTO_ICMP; dp->proto[proto / 8] |= 1 << (proto % 8); - SCLogDebug("DetectProtoParse: ICMP protocol detected"); + proto = IPPROTO_ICMPV6; + dp->proto[proto / 8] |= 1 << (proto % 8); + SCLogDebug("ICMP protocol detected, sig applies both to ICMPv4 and ICMPv6"); } else if (strcasecmp(str,"ip") == 0) { /* Proto "ip" is treated as an "any" */ dp->flags |= DETECT_PROTO_ANY; memset(dp->proto, 0xff, sizeof(dp->proto)); - SCLogDebug("DetectProtoParse: IP protocol detected"); + SCLogDebug("IP protocol detected"); } else { goto error;