[qca-nss-drv] Fix IPv6 connection sync issue with new APIs.

- Do not return in the switch/case loop after calling the conn sync function.
At the end of the function IPv6 netdev callback is called to upadte the
ECM and conntrack connections.
- Fix some boundry type checks in both IPv4 and IPv6 files.

Change-Id: I995ab91e3b3327626277724a565e81604eb40a6a
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
diff --git a/nss_ipv6.c b/nss_ipv6.c
index 6437932..c1cd4c1 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -64,7 +64,6 @@
 			dev_put(pppoe_dev);
 		}
 	}
-
 }
 
 /*
@@ -116,7 +115,7 @@
 	/*
 	 * Is this a valid request/response packet?
 	 */
-	if (nim->cm.type >= NSS_IPV6_MAX_MSG_TYPES) {
+	if (ncm->type >= NSS_IPV6_MAX_MSG_TYPES) {
 		nss_warning("%p: received invalid message %d for IPv6 interface", nss_ctx, nim->cm.type);
 		return;
 	}
@@ -151,7 +150,7 @@
 		 * Update driver statistics on connection sync.
 		 */
 		nss_ipv6_driver_conn_sync_update(nss_ctx, &nim->msg.conn_stats);
-		return nss_rx_ipv6_sync(nss_ctx, &nim->msg.conn_stats);
+		nss_rx_ipv6_sync(nss_ctx, &nim->msg.conn_stats);
 		break;
 
 	case NSS_IPV6_TX_CREATE_RULE_MSG:
@@ -207,7 +206,7 @@
 		return NSS_TX_FAILURE;
 	}
 
-	if (ncm->type > NSS_IPV6_MAX_MSG_TYPES) {
+	if (ncm->type >= NSS_IPV6_MAX_MSG_TYPES) {
 		nss_warning("%p: message type out of range: %d", nss_ctx, ncm->type);
 		return NSS_TX_FAILURE;
 	}