]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
icmpv6: add multicast types
authorVictor Julien <victor@inliniac.net>
Sat, 8 Mar 2014 13:12:47 +0000 (14:12 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 26 Mar 2014 16:16:15 +0000 (17:16 +0100)
Only add them to check if the code is 0 and to make sure the default
case doesn't set an 'unknown type' event.

src/decode-icmpv6.c

index 89de9989bf0f95c9779f60ecb0e69f39968c7843..7819f254982d67d0f04c1116986541dbcd045195 100644 (file)
@@ -293,6 +293,24 @@ int DecodeICMPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
                 ENGINE_SET_EVENT(p, ICMPV6_UNKNOWN_CODE);
             }
             break;
+        case MLD_LISTENER_QUERY:
+            SCLogDebug("MLD_LISTENER_QUERY");
+            if (p->icmpv6h->code != 0) {
+                ENGINE_SET_EVENT(p, ICMPV6_UNKNOWN_CODE);
+            }
+            break;
+        case MLD_LISTENER_REPORT:
+            SCLogDebug("MLD_LISTENER_REPORT");
+            if (p->icmpv6h->code != 0) {
+                ENGINE_SET_EVENT(p, ICMPV6_UNKNOWN_CODE);
+            }
+            break;
+        case MLD_LISTENER_REDUCTION:
+            SCLogDebug("MLD_LISTENER_REDUCTION");
+            if (p->icmpv6h->code != 0) {
+                ENGINE_SET_EVENT(p, ICMPV6_UNKNOWN_CODE);
+            }
+            break;
         default:
             SCLogDebug("ICMPV6 Message type %" PRIu8 " not "
                        "implemented yet", ICMPV6_GET_TYPE(p));