[qca-nss-netlink] add multicast mac_addr support

Added support for getting mac address when multicast IP
address based rules pushed

Change-Id: I767fb7593defd1c2744de85f5df6508f012ebc37
Signed-off-by: Samarjeet Banerjee <banerjee@codeaurora.org>
diff --git a/netlink/nss_nlipv4.c b/netlink/nss_nlipv4.c
index 0608ab5..a1cbbb4 100755
--- a/netlink/nss_nlipv4.c
+++ b/netlink/nss_nlipv4.c
@@ -32,6 +32,7 @@
 #include <linux/vmalloc.h>
 #include <linux/completion.h>
 #include <linux/semaphore.h>
+#include <linux/in.h>
 
 #include <net/genetlink.h>
 #include <net/route.h>
@@ -167,6 +168,28 @@
 {
 	struct neighbour *neigh;
 
+	/*
+	 * handle multicast IP address seperately
+	 */
+	if (ipv4_is_multicast(htonl(ip_addr))) {
+		/*
+		 * fixed
+		 */
+		mac_addr[0] = 0x01;
+		mac_addr[1] = 0x00;
+		mac_addr[2] = 0x5e;
+
+		/*
+		 * from ip_addr
+		 */
+		mac_addr[3] = (htonl(ip_addr) & 0x7f0000) >> 16;
+		mac_addr[4] = (htonl(ip_addr) & 0xff00) >> 8;
+		mac_addr[5] = (htonl(ip_addr) & 0xff);
+
+		return 0;
+	}
+
+
 	rcu_read_lock();
 
 	/*