[qca-nss-ecm] Fix multicast over pppoe.

pppoe packets destination MAC is not mulicast ethernet. So
acceleration function should check only on ip address to verify
packets of type multicast

Change-Id: I6b30ebe25f1fa61c56d3f716977fcedd56fee303
Signed-off-by: ratheesh kannoth <rkannoth@codeaurora.org>
diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c
index ad67997..0a97c26 100644
--- a/frontends/nss/ecm_nss_ipv4.c
+++ b/frontends/nss/ecm_nss_ipv4.c
@@ -1034,23 +1034,26 @@
 		}
 	}
 
-#ifdef ECM_MULTICAST_ENABLE
 	/*
 	 * Check for a multicast Destination address here.
 	 */
 	ECM_NIN4_ADDR_TO_IP_ADDR(ip_dest_addr, orig_tuple.dst.u3.ip);
-	if (ecm_ip_addr_is_multicast(ip_dest_addr)  && (skb->pkt_type == PACKET_MULTICAST)) {
-		DEBUG_TRACE("Multicast, Processing: %p\n", skb);
-		return ecm_nss_multicast_ipv4_connection_process(out_dev,
-				in_dev,
-				src_node_addr,
-				dest_node_addr,
-				can_accel, is_routed, skb,
-				&ip_hdr,
-				ct, sender,
-				&orig_tuple, &reply_tuple);
-	}
+	if (ecm_ip_addr_is_multicast(ip_dest_addr)) {
+#ifdef ECM_MULTICAST_ENABLE
+
+		if (unlikely(ecm_front_end_ipv4_mc_stopped)) {
+			DEBUG_TRACE("%p: Multicast disabled by ecm_front_end_ipv4_mc_stopped = %d\n", skb, ecm_front_end_ipv4_mc_stopped);
+			return NF_ACCEPT;
+		}
+
+		DEBUG_TRACE("%p: Multicast, Processing\n", skb);
+		return ecm_nss_multicast_ipv4_connection_process(out_dev, in_dev, src_node_addr, dest_node_addr,
+									can_accel, is_routed, skb, &ip_hdr, ct, sender,
+									&orig_tuple, &reply_tuple);
+#else
+		return NF_ACCEPT;
 #endif
+	}
 
 	/*
 	 * Work out if this packet involves NAT or not.
@@ -1433,18 +1436,6 @@
 		return NF_ACCEPT;
 	}
 
-#ifndef ECM_MULTICAST_ENABLE
-	if (skb->pkt_type == PACKET_MULTICAST) {
-		DEBUG_TRACE("Multicast, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#else
-	if ((skb->pkt_type == PACKET_MULTICAST) && unlikely(ecm_front_end_ipv4_mc_stopped)) {
-		DEBUG_TRACE("Multicast frontend stopped, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#endif
-
 #ifdef ECM_INTERFACE_PPP_ENABLE
 #ifndef ECM_INTERFACE_PPTP_ENABLE
 	/*
@@ -1581,18 +1572,6 @@
 		return NF_ACCEPT;
 	}
 
-#ifndef ECM_MULTICAST_ENABLE
-	if (skb->pkt_type == PACKET_MULTICAST) {
-		DEBUG_TRACE("Multicast, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#else
-	if ((skb->pkt_type == PACKET_MULTICAST) && unlikely(ecm_front_end_ipv4_mc_stopped)) {
-		DEBUG_TRACE("Multicast frontend stopped, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#endif
-
 #ifdef ECM_INTERFACE_PPP_ENABLE
 	/*
 	 * skip l2tp/pptp because we don't accelerate them
diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c
index 9685e6f..c6072c8 100644
--- a/frontends/nss/ecm_nss_ipv6.c
+++ b/frontends/nss/ecm_nss_ipv6.c
@@ -934,24 +934,27 @@
 		}
 	}
 
-#ifdef ECM_MULTICAST_ENABLE
 	/*
 	 * Check for a multicast Destination address here.
 	 */
 	ECM_NIN6_ADDR_TO_IP_ADDR(ip_dest_addr, orig_tuple.dst.u3.in6);
-	if (ecm_ip_addr_is_multicast(ip_dest_addr) && (skb->pkt_type == PACKET_MULTICAST)) {
+	if (ecm_ip_addr_is_multicast(ip_dest_addr)) {
 		DEBUG_TRACE("skb %p multicast daddr " ECM_IP_ADDR_OCTAL_FMT "\n", skb, ECM_IP_ADDR_TO_OCTAL(ip_dest_addr));
+#ifdef ECM_MULTICAST_ENABLE
 
-		return ecm_nss_multicast_ipv6_connection_process(out_dev,
-				in_dev,
-				src_node_addr,
-				dest_node_addr,
-				can_accel, is_routed, skb,
-				&ip_hdr,
-				ct, sender,
-				&orig_tuple, &reply_tuple);
-	}
+		if (unlikely(ecm_front_end_ipv6_mc_stopped)) {
+			DEBUG_TRACE("%p: Multicast disabled by ecm_front_end_ipv6_mc_stopped = %d\n", skb, ecm_front_end_ipv6_mc_stopped);
+			return NF_ACCEPT;
+		}
+
+		return ecm_nss_multicast_ipv6_connection_process(out_dev, in_dev, src_node_addr, dest_node_addr,
+								 can_accel, is_routed, skb, &ip_hdr, ct, sender,
+								 &orig_tuple, &reply_tuple);
+#else
+		return NF_ACCEPT;
 #endif
+	}
+
 	/*
 	 * Work out if this packet involves routing or not.
 	 */
@@ -1088,18 +1091,6 @@
 		return NF_ACCEPT;
 	}
 
-#ifndef ECM_MULTICAST_ENABLE
-	if (skb->pkt_type == PACKET_MULTICAST) {
-		DEBUG_TRACE("Multicast, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#else
-	if ((skb->pkt_type == PACKET_MULTICAST) && unlikely(ecm_front_end_ipv6_mc_stopped)) {
-		DEBUG_TRACE("Multicast frontend stopped, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#endif
-
 #ifdef ECM_INTERFACE_PPP_ENABLE
 #ifdef ECM_INTERFACE_L2TPV2_ENABLE
 	/*
@@ -1234,18 +1225,6 @@
 		return NF_ACCEPT;
 	}
 
-#ifndef ECM_MULTICAST_ENABLE
-	if (skb->pkt_type == PACKET_MULTICAST) {
-		DEBUG_TRACE("Multicast, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#else
-	if ((skb->pkt_type == PACKET_MULTICAST) && unlikely(ecm_front_end_ipv6_mc_stopped)) {
-		DEBUG_TRACE("Multicast frontend stopped, ignoring: %p\n", skb);
-		return NF_ACCEPT;
-	}
-#endif
-
 #ifdef ECM_INTERFACE_PPP_ENABLE
 	/*
 	 * skip l2tp/pptp because we don't accelerate them