[CORD-1984] Multicast flows get into wrong table in hardware switches

Change-Id: I06ec1d75fdef5bfdf28f1cc70f002f70a943ba4f
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
index c0c6639..b18081c 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
@@ -1098,7 +1098,14 @@
             if (buildIpv6Selector(filteredSelector, fwd) < 0) {
                 return Collections.emptyList();
             }
-            forTableId = UNICAST_ROUTING_TABLE;
+            //We need to set the proper next table
+            IpPrefix ipv6Dst = ((IPCriterion) selector.getCriterion(Criterion.Type.IPV6_DST)).ip();
+            if (ipv6Dst.isMulticast()) {
+                forTableId = MULTICAST_ROUTING_TABLE;
+            } else {
+                forTableId = UNICAST_ROUTING_TABLE;
+            }
+
             if (fwd.treatment() != null) {
                 for (Instruction instr : fwd.treatment().allInstructions()) {
                     if (instr instanceof L3ModificationInstruction &&