diff --git a/hal/Android.mk b/hal/Android.mk
index 67e9b07..6574682 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -1,29 +1,29 @@
-# LOCAL_PATH := $(call my-dir)
-# 
-# include $(CLEAR_VARS)
-# LOCAL_ARM_MODE := arm
-# LOCAL_SRC_FILES := src/CtUpdateAmbassador.cpp \
-#                 src/HAL.cpp \
-#                 src/IpaEventRelay.cpp \
-#                 src/LocalLogBuffer.cpp \
-#                 src/OffloadStatistics.cpp \
-#                 src/PrefixParser.cpp
-# LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
-# LOCAL_MODULE := liboffloadhal
-# LOCAL_CPP_FLAGS := -Wall -Werror
-# LOCAL_SHARED_LIBRARIES := libhwbinder \
-#                         libhidlbase \
-#                         libhidltransport \
-#                         liblog \
-#                         libcutils \
-#                         libdl \
-#                         libbase \
-#                         libutils \
-#                         libhardware_legacy \
-#                         libhardware \
-#                         android.hardware.tetheroffload.config@1.0 \
-#                         android.hardware.tetheroffload.control@1.0
-# LOCAL_VENDOR_MODULE := true
-# LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
-# LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
-# include $(BUILD_SHARED_LIBRARY)
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_ARM_MODE := arm
+LOCAL_SRC_FILES := src/CtUpdateAmbassador.cpp \
+                src/HAL.cpp \
+                src/IpaEventRelay.cpp \
+                src/LocalLogBuffer.cpp \
+                src/OffloadStatistics.cpp \
+                src/PrefixParser.cpp
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
+LOCAL_MODULE := liboffloadhal
+#LOCAL_CPP_FLAGS := -Wall -Werror
+LOCAL_SHARED_LIBRARIES := libhwbinder \
+                        libhidlbase \
+                        libhidltransport \
+                        liblog \
+                        libcutils \
+                        libdl \
+                        libbase \
+                        libutils \
+                        libhardware_legacy \
+                        libhardware \
+                        android.hardware.tetheroffload.config@1.0 \
+                        android.hardware.tetheroffload.control@1.0
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
+LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
+include $(BUILD_SHARED_LIBRARY)
diff --git a/hal/src/HAL.cpp b/hal/src/HAL.cpp
index 18249a5..0dd79e2 100644
--- a/hal/src/HAL.cpp
+++ b/hal/src/HAL.cpp
@@ -41,6 +41,7 @@
 /* External Includes */
 #include <cutils/log.h>
 #include <string>
+#include <sys/socket.h>
 #include <sys/types.h>
 #include <vector>
 
@@ -87,7 +88,7 @@
     status_t ret = 0;
 
     ret = IOffloadControl::registerAsService();
-    if (ret != 0) ALOGE("Failed to register IOffloadControl (%d)", ret);
+    if (ret != 0) ALOGE("Failed to register IOffloadControl (%d) name(%s)", ret, name);
     else if (DBG) {
         ALOGI("Successfully registered IOffloadControl");
     }
@@ -399,15 +400,26 @@
     const hidl_vec<hidl_string>& prefixes,
     setLocalPrefixes_cb hidl_cb
 ) {
+    BoolResult res;
+    PrefixParser parser;
+    vector<string> prefixesStr = convertHidlStrToStdStr(prefixes);
+
     LocalLogBuffer::FunctionLog fl(__func__);
-    fl.addArg("prefixes", "unused");
-    #pragma unused(prefixes)
+    fl.addArg("prefixes", prefixesStr);
 
-    /* Fake Success */
-    BoolResult res = ipaResultToBoolResult(RET::SUCCESS);
+    if (!isInitialized()) {
+        BoolResult res = makeInputCheckFailure("Not initialized");
+    } else if(prefixesStr.size() < 1) {
+        res = ipaResultToBoolResult(RET::FAIL_INPUT_CHECK);
+    } else if (!parser.add(prefixesStr)) {
+        res = makeInputCheckFailure(parser.getLastErrAsStr());
+    } else {
+        res = ipaResultToBoolResult(RET::SUCCESS);
+    }
+
     hidl_cb(res.success, res.errMsg);
-
     fl.setResult(res.success, res.errMsg);
+    mLogs.addLog(fl);
     return Void();
 } /* setLocalPrefixes */
 
@@ -451,11 +463,17 @@
     fl.addArg("upstream", upstream);
     fl.addArg("limit", limit);
 
-    RET ipaReturn = mIPA->setQuota(upstream.c_str(), limit);
-    BoolResult res = ipaResultToBoolResult(ipaReturn);
-    hidl_cb(res.success, res.errMsg);
+    if (!isInitialized()) {
+        BoolResult res = makeInputCheckFailure("Not initialized (setDataLimit)");
+        hidl_cb(res.success, res.errMsg);
+        fl.setResult(res.success, res.errMsg);
+    } else {
+        RET ipaReturn = mIPA->setQuota(upstream.c_str(), limit);
+        BoolResult res = ipaResultToBoolResult(ipaReturn);
+        hidl_cb(res.success, res.errMsg);
+        fl.setResult(res.success, res.errMsg);
+    }
 
-    fl.setResult(res.success, res.errMsg);
     mLogs.addLog(fl);
     return Void();
 } /* setDataLimit */
@@ -484,7 +502,12 @@
      * qualified here.  But then, how do we allow them to be empty/null as well
      * while still preserving a sane API on PrefixParser?
      */
-    if (!v4AddrParser.addV4(v4Addr) && !v4Addr.empty()) {
+    if (!isInitialized()) {
+        BoolResult res = makeInputCheckFailure("Not initialized (setUpstreamParameters)");
+        hidl_cb(res.success, res.errMsg);
+        fl.setResult(res.success, res.errMsg);
+    }
+    else if (!v4AddrParser.addV4(v4Addr) && !v4Addr.empty()) {
         BoolResult res = makeInputCheckFailure(v4AddrParser.getLastErrAsStr());
         hidl_cb(res.success, res.errMsg);
         fl.setResult(res.success, res.errMsg);
@@ -496,19 +519,6 @@
         BoolResult res = makeInputCheckFailure(v6GwParser.getLastErrAsStr());
         hidl_cb(res.success, res.errMsg);
         fl.setResult(res.success, res.errMsg);
-    } else if (v6GwParser.size() > 1) {
-        RET ipaReturn = mIPA->stopAllOffload();
-        if (ipaReturn != RET::SUCCESS) {
-            BoolResult res =
-                    makeInputCheckFailure("Cannot accept more than 1 IPv6 Gateway.  Offload still running and may result in data path errors");
-            hidl_cb(res.success, res.errMsg);
-            fl.setResult(res.success, res.errMsg);
-        } else {
-            BoolResult res =
-                    makeInputCheckFailure("Cannot accept more than 1 IPv6 Gateway.  In an effort to avoid any data path errors, offload has been stopped");
-            hidl_cb(res.success, res.errMsg);
-            fl.setResult(res.success, res.errMsg);
-        }
     } else {
         RET ipaReturn = mIPA->setUpstream(
                 iface.c_str(),
@@ -535,7 +545,12 @@
 
     PrefixParser prefixParser;
 
-    if (!prefixParser.add(prefix)) {
+    if (!isInitialized()) {
+        BoolResult res = makeInputCheckFailure("Not initialized (setUpstreamParameters)");
+        hidl_cb(res.success, res.errMsg);
+        fl.setResult(res.success, res.errMsg);
+    }
+    else if (!prefixParser.add(prefix)) {
         BoolResult res = makeInputCheckFailure(prefixParser.getLastErrAsStr());
         hidl_cb(res.success, res.errMsg);
         fl.setResult(res.success, res.errMsg);
@@ -564,7 +579,12 @@
 
     PrefixParser prefixParser;
 
-    if (!prefixParser.add(prefix)) {
+    if (!isInitialized()) {
+        BoolResult res = makeInputCheckFailure("Not initialized (setUpstreamParameters)");
+        hidl_cb(res.success, res.errMsg);
+        fl.setResult(res.success, res.errMsg);
+    }
+    else if (!prefixParser.add(prefix)) {
         BoolResult res = makeInputCheckFailure(prefixParser.getLastErrAsStr());
         hidl_cb(res.success, res.errMsg);
         fl.setResult(res.success, res.errMsg);
diff --git a/hal/src/PrefixParser.cpp b/hal/src/PrefixParser.cpp
index 60aae08..d38bec0 100644
--- a/hal/src/PrefixParser.cpp
+++ b/hal/src/PrefixParser.cpp
@@ -118,6 +118,9 @@
 
 /* ------------------------------ PRIVATE ----------------------------------- */
 bool PrefixParser::add(vector<string> in, IP_FAM famHint) {
+    if (in.size() == 0)
+        return false;
+
     for (size_t i = 0; i < in.size(); i++) {
         if (!add(in[i], famHint))
             return false;
@@ -126,6 +129,11 @@
 } /* add */
 
 bool PrefixParser::add(string in, IP_FAM famHint) {
+    if (in.length() == 0) {
+        mLastErr = "Failed to parse string, length = 0...";
+        return false;
+    }
+
     if (famHint == IP_FAM::INVALID)
         famHint = guessIPFamily(in);
 
@@ -138,8 +146,10 @@
     }
 
     int mask = parseSubnetMask(subnet, famHint);
-    if (!isMaskValid(mask, famHint))
+    if (!isMaskValid(mask, famHint)) {
+        mLastErr = "Invalid mask";
         return false;
+    }
 
     Prefix pre = makeBlankPrefix(famHint);
 
diff --git a/ipacm/inc/IPACM_Defs.h b/ipacm/inc/IPACM_Defs.h
index 39c7298..fe252c9 100644
--- a/ipacm/inc/IPACM_Defs.h
+++ b/ipacm/inc/IPACM_Defs.h
@@ -187,14 +187,14 @@
 	IPA_ETH_BRIDGE_CLIENT_DEL,                /* ipacm_event_eth_bridge*/
 	IPA_ETH_BRIDGE_WLAN_SCC_MCC_SWITCH,       /* ipacm_event_eth_bridge*/
 	IPA_LAN_DELETE_SELF,                      /* ipacm_event_data_fid */
-	IPA_DOWNSTREAM_ADD,                       /* ipacm_event_ipahal_stream */
-	IPA_DOWNSTREAM_DEL,                       /* ipacm_event_ipahal_stream */
+#ifdef FEATURE_L2TP
 	IPA_ADD_VLAN_IFACE,                       /* ipa_ioc_vlan_iface_info */
 	IPA_DEL_VLAN_IFACE,                       /* ipa_ioc_vlan_iface_info */
 	IPA_ADD_L2TP_VLAN_MAPPING,                /* ipa_ioc_l2tp_vlan_mapping_info */
 	IPA_DEL_L2TP_VLAN_MAPPING,                /* ipa_ioc_l2tp_vlan_mapping_info */
 	IPA_HANDLE_VLAN_CLIENT_INFO,              /* ipacm_event_data_all */
 	IPA_HANDLE_VLAN_IFACE_INFO,               /* ipacm_event_data_all */
+#endif
 	IPACM_EVENT_MAX
 } ipa_cm_event_id;
 
diff --git a/ipacm/inc/IPACM_Iface.h b/ipacm/inc/IPACM_Iface.h
index 0469699..2e18f51 100644
--- a/ipacm/inc/IPACM_Iface.h
+++ b/ipacm/inc/IPACM_Iface.h
@@ -97,7 +97,7 @@
 	bool softwarerouting_act;
 
 	/* IPACM number of default route rules for ipv6*/
-	int num_dft_rt_v6;
+	uint32_t num_dft_rt_v6;
 
 	uint32_t dft_v4fl_rule_hdl[IPV4_DEFAULT_FILTERTING_RULES];
 	uint32_t dft_v6fl_rule_hdl[IPV6_DEFAULT_FILTERTING_RULES + IPV6_DEFAULT_LAN_FILTERTING_RULES];
diff --git a/ipacm/inc/IPACM_Lan.h b/ipacm/inc/IPACM_Lan.h
index cb63e34..0f50ae7 100644
--- a/ipacm/inc/IPACM_Lan.h
+++ b/ipacm/inc/IPACM_Lan.h
@@ -169,6 +169,7 @@
 	/* delete header processing context */
 	int eth_bridge_del_hdr_proc_ctx(uint32_t hdr_proc_ctx_hdl);
 
+#ifdef FEATURE_L2TP
 	/* add l2tp rt rule for l2tp client */
 	int add_l2tp_rt_rule(ipa_ip_type iptype, uint8_t *dst_mac, ipa_hdr_l2_type peer_l2_hdr_type,
 		uint32_t l2tp_session_id, uint32_t vlan_id, uint8_t *vlan_client_mac, uint32_t *vlan_iface_ipv6_addr,
@@ -198,6 +199,7 @@
 
 	/* delete l2tp flt rule on non l2tp interface */
 	int del_l2tp_flt_rule(ipa_ip_type iptype, uint32_t first_pass_flt_rule_hdl, uint32_t second_pass_flt_rule_hdl);
+#endif
 
 protected:
 
@@ -209,15 +211,16 @@
 	void eth_bridge_post_event(ipa_cm_event_id evt, ipa_ip_type iptype, uint8_t *mac,
 		uint32_t *ipv6_addr, char *iface_name);
 
+#ifdef FEATURE_L2TP
 	/* check if the event is associated with vlan interface */
 	bool is_vlan_event(char *event_iface_name);
-
 	/* check if the event is associated with l2tp interface */
 	bool is_l2tp_event(char *event_iface_name);
 
 	/* check if the IPv6 address is unique local address */
 	bool is_unique_local_ipv6_addr(uint32_t *ipv6_addr);
 
+#endif
 	virtual int add_dummy_private_subnet_flt_rule(ipa_ip_type iptype);
 
 	int handle_private_subnet_android(ipa_ip_type iptype);
@@ -294,7 +297,7 @@
 
 	int header_name_count;
 
-	int num_eth_client;
+	uint32_t num_eth_client;
 
 	NatApp *Nat_App;
 
diff --git a/ipacm/inc/IPACM_LanToLan.h b/ipacm/inc/IPACM_LanToLan.h
index b055cdd..e517e97 100644
--- a/ipacm/inc/IPACM_LanToLan.h
+++ b/ipacm/inc/IPACM_LanToLan.h
@@ -160,7 +160,7 @@
 	void increment_ref_cnt_peer_l2_hdr_type(ipa_hdr_l2_type peer_l2_type);
 
 	void decrement_ref_cnt_peer_l2_hdr_type(ipa_hdr_l2_type peer_l2_type);
-
+#ifdef FEATURE_L2TP
 	void switch_to_l2tp_iface();
 
 	bool set_l2tp_iface(char *vlan_iface_name);
@@ -170,7 +170,7 @@
 	void handle_l2tp_enable();
 
 	void handle_l2tp_disable();
-
+#endif
 private:
 
 	IPACM_Lan *m_p_iface;
@@ -223,7 +223,9 @@
 
 	static IPACM_LanToLan* p_instance;
 	static IPACM_LanToLan* get_instance();
+#ifdef FEATURE_L2TP
 	bool has_l2tp_iface();
+#endif
 
 private:
 
@@ -251,6 +253,7 @@
 
 	void handle_wlan_scc_mcc_switch(ipacm_event_eth_bridge *data);
 
+#ifdef FEATURE_L2TP
 	void handle_add_vlan_iface(ipa_ioc_vlan_iface_info *data);
 
 	void handle_del_vlan_iface(ipa_ioc_vlan_iface_info *data);
@@ -262,6 +265,7 @@
 	void handle_vlan_client_info(ipacm_event_data_all *data);
 
 	void handle_vlan_iface_info(ipacm_event_data_all *data);
+#endif
 
 	void handle_new_iface_up(IPACM_LanToLan_Iface *new_iface, IPACM_LanToLan_Iface *exist_iface);
 
diff --git a/ipacm/inc/IPACM_OffloadManager.h b/ipacm/inc/IPACM_OffloadManager.h
index 9d94253..72070dd 100644
--- a/ipacm/inc/IPACM_OffloadManager.h
+++ b/ipacm/inc/IPACM_OffloadManager.h
@@ -29,7 +29,7 @@
 #ifndef _IPACM_OFFLOAD_MANAGER_H_
 #define _IPACM_OFFLOAD_MANAGER_H_
 
-
+#include <list>
 #include <stdint.h>
 #include <IOffloadManager.h>
 #include "IPACM_Defs.h"
@@ -96,6 +96,8 @@
 
 private:
 
+	std::list<const char *> valid_ifaces;
+
 	bool upstream_v4_up;
 
 	bool upstream_v6_up;
diff --git a/ipacm/inc/IPACM_Wan.h b/ipacm/inc/IPACM_Wan.h
index c60612c..a4d0557 100644
--- a/ipacm/inc/IPACM_Wan.h
+++ b/ipacm/inc/IPACM_Wan.h
@@ -107,9 +107,11 @@
 	{
 #ifdef FEATURE_IPA_ANDROID
 #ifdef FEATURE_IPACM_HAL
+		/*To avoid -Wall -Werror error */
+		IPACMDBG_H("ipa_if_num_tether: %d\n",ipa_if_num_tether);
 		return wan_up;
 #else
-		int i;
+		uint32_t i;
 		for (i=0; i < ipa_if_num_tether_v4_total;i++)
 		{
 			if (ipa_if_num_tether_v4[i] == ipa_if_num_tether)
@@ -156,7 +158,7 @@
 #ifdef FEATURE_IPA_ANDROID
 	static int delete_tether_iface(ipa_ip_type iptype, int ipa_if_num_tether)
 	{
-		int i, j;
+		uint32_t i, j;
 
 		if (iptype == IPA_IP_v4)
 		{
@@ -245,9 +247,9 @@
 	}
 #ifdef FEATURE_IPA_ANDROID
 	/* IPACM interface id */
-	static int ipa_if_num_tether_v4_total;
+	static uint32_t ipa_if_num_tether_v4_total;
 	static int ipa_if_num_tether_v4[IPA_MAX_IFACE_ENTRIES];
-	static int ipa_if_num_tether_v6_total;
+	static uint32_t ipa_if_num_tether_v6_total;
 	static int ipa_if_num_tether_v6[IPA_MAX_IFACE_ENTRIES];
 #endif
 
@@ -301,7 +303,7 @@
 	int wan_client_len;
 	ipa_wan_client *wan_client;
 	int header_name_count;
-	int num_wan_client;
+	uint32_t num_wan_client;
 	uint8_t invalid_mac[IPA_MAC_ADDR_SIZE];
 	bool is_xlat;
 
diff --git a/ipacm/inc/IPACM_Wlan.h b/ipacm/inc/IPACM_Wlan.h
index eb911ac..5fee0fa 100644
--- a/ipacm/inc/IPACM_Wlan.h
+++ b/ipacm/inc/IPACM_Wlan.h
@@ -101,7 +101,7 @@
 	ipa_wlan_client *wlan_client;
 
 	int header_name_count;
-	int num_wifi_client;
+	uint32_t num_wifi_client;
 
 	int wlan_ap_index;
 
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index 262f8c4..01715f8 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -1,7 +1,8 @@
 BOARD_PLATFORM_LIST := test
 BOARD_IPAv3_LIST := msm8998
 BOARD_IPAv3_LIST += sdm845
-ifeq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true)
+BOARD_IPAv3_LIST += sdm670
+ifneq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true)
 ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM)))
 ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH)))
 
@@ -28,7 +29,7 @@
 
 LOCAL_CFLAGS := -v
 LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
-LOCAL_CFLAGS += -DFEATURE_IPACM_HAL
+LOCAL_CFLAGS += -DFEATURE_IPACM_HAL -Wall -Werror -Wno-error=macro-redefined
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
 LOCAL_CFLAGS += -DDEBUG
 endif
diff --git a/ipacm/src/IPACM_CmdQueue.cpp b/ipacm/src/IPACM_CmdQueue.cpp
index a17fb08..c612b7f 100644
--- a/ipacm/src/IPACM_CmdQueue.cpp
+++ b/ipacm/src/IPACM_CmdQueue.cpp
@@ -122,6 +122,8 @@
 	MessageQueue *MsgQueueInternal = NULL;
 	MessageQueue *MsgQueueExternal = NULL;
 	Message *item = NULL;
+	param = NULL;
+
 	IPACMDBG("MessageQueue::Process()\n");
 
 	MsgQueueInternal = MessageQueue::getInstanceInternal();
diff --git a/ipacm/src/IPACM_Config.cpp b/ipacm/src/IPACM_Config.cpp
index 64534ee..d3fa58d 100644
--- a/ipacm/src/IPACM_Config.cpp
+++ b/ipacm/src/IPACM_Config.cpp
@@ -107,12 +107,14 @@
 	__stringify(IPA_ETH_BRIDGE_CLIENT_DEL),                /* ipacm_event_eth_bridge*/
 	__stringify(IPA_ETH_BRIDGE_WLAN_SCC_MCC_SWITCH),       /* ipacm_event_eth_bridge*/
 	__stringify(IPA_LAN_DELETE_SELF),                      /* ipacm_event_data_fid */
+#ifdef FEATURE_L2TP
 	__stringify(IPA_ADD_VLAN_IFACE),                       /* ipa_ioc_vlan_iface_info */
 	__stringify(IPA_DEL_VLAN_IFACE),                       /* ipa_ioc_vlan_iface_info */
 	__stringify(IPA_ADD_L2TP_VLAN_MAPPING),                /* ipa_ioc_l2tp_vlan_mapping_info */
 	__stringify(IPA_DEL_L2TP_VLAN_MAPPING),                /* ipa_ioc_l2tp_vlan_mapping_info */
 	__stringify(IPA_VLAN_CLIENT_INFO),                     /* ipacm_event_data_all */
 	__stringify(IPA_VLAN_IFACE_INFO),                      /* ipacm_event_data_all */
+#endif
 	__stringify(IPACM_EVENT_MAX),
 };
 
diff --git a/ipacm/src/IPACM_ConntrackClient.cpp b/ipacm/src/IPACM_ConntrackClient.cpp
index ffb0088..d8f7f73 100644
--- a/ipacm/src/IPACM_ConntrackClient.cpp
+++ b/ipacm/src/IPACM_ConntrackClient.cpp
@@ -104,6 +104,7 @@
 	ipacm_cmd_q_data evt_data;
 	ipacm_ct_evt_data *ct_data;
 	uint8_t ip_type = 0;
+	data = NULL;
 
 	IPACMDBG("Event callback called with msgtype: %d\n",type);
 
@@ -175,7 +176,7 @@
 
 	if(strlen(IPACM_Iface::ipacmcfg->ipa_virtual_iface_name) >= sizeof(ifr.ifr_name))
 	{
-		IPACMERR("interface name overflows: len %d\n",
+		IPACMERR("interface name overflows: len %zu\n",
 			strlen(IPACM_Iface::ipacmcfg->ipa_virtual_iface_name));
 		close(fd);
 		return -1;
@@ -388,6 +389,7 @@
 {
 
 	NatApp *nat_inst = NULL;
+	ptr = NULL;
 #ifdef IPACM_DEBUG
 	IPACMDBG("\n");
 #endif
@@ -601,7 +603,6 @@
 /* Thread to initialize TCP Conntrack Filters*/
 void IPACM_ConntrackClient::UNRegisterWithConnTrack(void)
 {
-	int ret;
 	IPACM_ConntrackClient *pClient = NULL;
 
 	IPACMDBG("\n");
diff --git a/ipacm/src/IPACM_ConntrackListener.cpp b/ipacm/src/IPACM_ConntrackListener.cpp
index de0e7e7..4f83b3d 100644
--- a/ipacm/src/IPACM_ConntrackListener.cpp
+++ b/ipacm/src/IPACM_ConntrackListener.cpp
@@ -142,7 +142,7 @@
 int IPACM_ConntrackListener::CheckNatIface(
    ipacm_event_data_all *data, bool *NatIface)
 {
-	int fd = 0, len = 0, cnt, i, j;
+	int fd = 0, len = 0, cnt, i;
 	struct ifreq ifr;
 	*NatIface = false;
 
diff --git a/ipacm/src/IPACM_Conntrack_NATApp.cpp b/ipacm/src/IPACM_Conntrack_NATApp.cpp
index 533fb53..c13c48e 100644
--- a/ipacm/src/IPACM_Conntrack_NATApp.cpp
+++ b/ipacm/src/IPACM_Conntrack_NATApp.cpp
@@ -403,17 +403,16 @@
 
 void NatApp::UpdateCTUdpTs(nat_table_entry *rule, uint32_t new_ts)
 {
-	int ret;
 #ifdef FEATURE_IPACM_HAL
 	IOffloadManager::ConntrackTimeoutUpdater::natTimeoutUpdate_t entry;
 	IPACM_OffloadManager* OffloadMng;
 #endif
-
 	iptodot("Private IP:", rule->private_ip);
 	iptodot("Target IP:",  rule->target_ip);
 	IPACMDBG("Private Port: %d, Target Port: %d\n", rule->private_port, rule->target_port);
 
 #ifndef FEATURE_IPACM_HAL
+	int ret;
 	if(!ct_hdl)
 	{
 		ct_hdl = nfct_open(CONNTRACK, 0);
diff --git a/ipacm/src/IPACM_Filtering.cpp b/ipacm/src/IPACM_Filtering.cpp
index 22eb19c..411fe90 100644
--- a/ipacm/src/IPACM_Filtering.cpp
+++ b/ipacm/src/IPACM_Filtering.cpp
@@ -142,6 +142,9 @@
 		return false;
 	}
 	IPACMDBG("Added Filtering rule %p\n", ruleTable);
+#else
+	if (ruleTable)
+	IPACMERR("Not support adding Filtering rule %p\n", ruleTable);
 #endif
 	return true;
 }
@@ -264,6 +267,7 @@
 	ipa_install_fltr_rule_req_ex_msg_v01 qmi_rule_ex_msg;
 #endif
 
+	memset(&qmi_rule_msg, 0, sizeof(qmi_rule_msg));
 	int fd_wwan_ioctl = open(WWAN_QMI_IOCTL_DEVICE_NAME, O_RDWR);
 	if(fd_wwan_ioctl < 0)
 	{
@@ -292,8 +296,6 @@
 	}
 	else
 	{
-		memset(&qmi_rule_msg, 0, sizeof(qmi_rule_msg));
-
 		if (num_rules > 0)
 		{
 			qmi_rule_msg.filter_spec_list_valid = true;
diff --git a/ipacm/src/IPACM_Iface.cpp b/ipacm/src/IPACM_Iface.cpp
index 7ff5e4c..36e2141 100644
--- a/ipacm/src/IPACM_Iface.cpp
+++ b/ipacm/src/IPACM_Iface.cpp
@@ -237,8 +237,6 @@
 int IPACM_Iface::handle_software_routing_disable(void)
 {
 	int res = IPACM_SUCCESS;
-	ipa_ip_type ip;
-	uint32_t flt_hdl;
 
 	if (rx_prop == NULL)
 	{
@@ -964,7 +962,7 @@
 
 	if(strlen(if_name) >= sizeof(ifr.ifr_name))
 	{
-		IPACMERR("interface name overflows: len %d\n", strlen(if_name));
+		IPACMERR("interface name overflows: len %zu\n", strlen(if_name));
 		close(fd);
 		return IPACM_FAILURE;
 	}
diff --git a/ipacm/src/IPACM_IfaceManager.cpp b/ipacm/src/IPACM_IfaceManager.cpp
index eab43fd..17f546d 100644
--- a/ipacm/src/IPACM_IfaceManager.cpp
+++ b/ipacm/src/IPACM_IfaceManager.cpp
@@ -72,7 +72,9 @@
 	ipacm_event_data_fid *evt_data = (ipacm_event_data_fid *)param;
 	ipacm_event_data_mac *StaData = (ipacm_event_data_mac *)param;
 	ipacm_event_data_all *data_all = (ipacm_event_data_all *)param;
-	ipacm_ifacemgr_data ifmgr_data = {0};
+	ipacm_ifacemgr_data ifmgr_data;
+
+	memset(&ifmgr_data,0,sizeof(ifmgr_data));
 
 	switch(event)
 	{
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index b39c678..7acb668 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -67,7 +67,8 @@
 	odu_route_rule_v4_hdl = NULL;
 	odu_route_rule_v6_hdl = NULL;
 	eth_client = NULL;
-	int i, m_fd_odu, ret = IPACM_SUCCESS;
+	int m_fd_odu, ret = IPACM_SUCCESS;
+	uint32_t i;
 
 	Nat_App = NatApp::GetInstance();
 	if (Nat_App == NULL)
@@ -225,7 +226,6 @@
 
 	int ipa_interface_index;
 	ipacm_ext_prop* ext_prop;
-	ipacm_event_iface_up* data_wan;
 	ipacm_event_iface_up_tehter* data_wan_tether;
 
 	switch (event)
@@ -330,6 +330,21 @@
 				}
 			}
 #endif
+
+#ifdef FEATURE_ETH_BRIDGE_LE
+			if(rx_prop != NULL)
+			{
+				free(rx_prop);
+			}
+			if(tx_prop != NULL)
+			{
+				free(tx_prop);
+			}
+			if(iface_query != NULL)
+			{
+				free(iface_query);
+			}
+#endif
 			delete this;
 		}
 		break;
@@ -740,7 +755,7 @@
 	case IPA_HANDLE_WAN_UP:
 		IPACMDBG_H("Received IPA_HANDLE_WAN_UP event\n");
 
-		data_wan = (ipacm_event_iface_up*)param;
+		ipacm_event_iface_up* data_wan = (ipacm_event_iface_up*)param;
 		if (data_wan == NULL)
 		{
 			IPACMERR("No event data is found.\n");
@@ -856,8 +871,12 @@
 				}
 			}
 
-			if (ipa_interface_index == ipa_if_num || is_vlan_event(data->iface_name)
-				|| (is_l2tp_event(data->iface_name) && ipa_if_cate == ODU_IF))
+			if (ipa_interface_index == ipa_if_num
+#ifdef FEATURE_L2TP
+				|| is_vlan_event(data->iface_name)
+				|| (is_l2tp_event(data->iface_name) && ipa_if_cate == ODU_IF)
+#endif
+				)
 			{
 				IPACMDBG_H("ETH iface got client \n");
 				if(ipa_interface_index == ipa_if_num)
@@ -916,7 +935,10 @@
 			}
 
 			if (ipa_interface_index == ipa_if_num
-				|| (is_l2tp_event(data->iface_name) && ipa_if_cate == ODU_IF))
+#ifdef FEATURE_L2TP
+				|| (is_l2tp_event(data->iface_name) && ipa_if_cate == ODU_IF)
+#endif
+				)
 			{
 				if(ipa_interface_index == ipa_if_num)
 				{
@@ -1016,7 +1038,7 @@
 	if(data->iptype == IPA_IP_v6)
 	{
 		if ((data->ipv6_addr[0] != 0) || (data->ipv6_addr[1] != 0) ||
-				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] || 0))
+				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] != 0))
 		{
 			IPACMDBG_H("ipv6 address got: 0x%x:%x:%x:%x\n", data->ipv6_addr[0], data->ipv6_addr[1], data->ipv6_addr[2], data->ipv6_addr[3]);
 			for(num_v6=0;num_v6 < get_client_memptr(eth_client, clnt_indx)->ipv6_set;num_v6++)
@@ -1031,6 +1053,11 @@
 				}
 			}
 		}
+		else
+		{
+			IPACMDBG_H("Invalid ipv6 address\n");
+			return IPACM_FAILURE;
+		}
 		if (num_v6 == IPV6_NUM_ADDR)
 		{
 			IPACMDBG_H("ipv6 addr is not found. \n");
@@ -1055,7 +1082,7 @@
 				get_client_memptr(eth_client, clnt_indx)->ipv6_set--;
 				get_client_memptr(eth_client, clnt_indx)->route_rule_set_v6--;
 
-				for(num_v6;num_v6< get_client_memptr(eth_client, clnt_indx)->ipv6_set;num_v6++)
+				for(;num_v6< get_client_memptr(eth_client, clnt_indx)->ipv6_set;num_v6++)
 				{
 					get_client_memptr(eth_client, clnt_indx)->v6_addr[num_v6][0] =
 						get_client_memptr(eth_client, clnt_indx)->v6_addr[num_v6+1][0];
@@ -1112,6 +1139,12 @@
 
 		memset(&flt_index, 0, sizeof(flt_index));
 		flt_index.source_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[0].src_pipe);
+		if ((int)flt_index.source_pipe_index == -1)
+		{
+			IPACMERR("Error Query src pipe idx, aborting...\n");
+			close(fd);
+			return IPACM_FAILURE;
+		}
 		flt_index.install_status = IPA_QMI_RESULT_SUCCESS_V01;
 #ifndef FEATURE_IPA_V3
 		flt_index.filter_index_list_len = 0;
@@ -1121,6 +1154,12 @@
 #endif
 		flt_index.embedded_pipe_index_valid = 1;
 		flt_index.embedded_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, IPA_CLIENT_APPS_LAN_WAN_PROD);
+		if ((int)flt_index.embedded_pipe_index == -1)
+		{
+			IPACMERR("Error Query emb pipe idx, aborting...\n");
+			close(fd);
+			return IPACM_FAILURE;
+		}
 		flt_index.retain_header_valid = 1;
 		flt_index.retain_header = 0;
 		flt_index.embedded_call_mux_id_valid = 1;
@@ -1155,7 +1194,7 @@
 	struct ipa_ioc_add_rt_rule *rt_rule;
 	struct ipa_rt_rule_add *rt_rule_entry;
 	const int NUM_RULES = 1;
-	int num_ipv6_addr;
+	uint32_t num_ipv6_addr;
 	int res = IPACM_SUCCESS;
 #ifdef FEATURE_IPACM_HAL
 	IPACM_OffloadManager* OffloadMng;
@@ -1643,7 +1682,8 @@
 
 int IPACM_Lan::handle_wan_up_ex(ipacm_ext_prop *ext_prop, ipa_ip_type iptype, uint8_t xlat_mux_id)
 {
-	int fd, ret = IPACM_SUCCESS, cnt;
+	int fd, ret = IPACM_SUCCESS;
+	uint32_t cnt;
 	IPACM_Config* ipacm_config = IPACM_Iface::ipacmcfg;
 	struct ipa_ioc_write_qmapid mux;
 
@@ -1807,7 +1847,7 @@
 								pHeaderDescriptor->hdr[0].name[IPA_RESOURCE_NAME_MAX-1] = '\0';
 								if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_ETH_HDR_NAME_v4, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 								{
-									IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+									IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 									res = IPACM_FAILURE;
 									goto fail;
 								}
@@ -1815,7 +1855,7 @@
 								snprintf(index,sizeof(index), "%d", header_name_count);
 								if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 								{
-									IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+									IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 									res = IPACM_FAILURE;
 									goto fail;
 								}
@@ -1907,14 +1947,14 @@
 				pHeaderDescriptor->hdr[0].name[IPA_RESOURCE_NAME_MAX-1] = '\0';
 				if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_ETH_HDR_NAME_v6, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
 				snprintf(index,sizeof(index), "%d", header_name_count);
 				if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
@@ -2027,7 +2067,7 @@
 	else
 	{
 		if ((data->ipv6_addr[0] != 0) || (data->ipv6_addr[1] != 0) ||
-				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] || 0)) /* check if all 0 not valid ipv6 address */
+				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] != 0)) /* check if all 0 not valid ipv6 address */
 		{
 			IPACMDBG_H("ipv6 address: 0x%x:%x:%x:%x\n", data->ipv6_addr[0], data->ipv6_addr[1], data->ipv6_addr[2], data->ipv6_addr[3]);
 			if( (data->ipv6_addr[0] & ipv6_link_local_prefix_mask) != (ipv6_link_local_prefix & ipv6_link_local_prefix_mask) &&
@@ -2065,6 +2105,11 @@
 				return IPACM_FAILURE; /* not setup the RT rules*/
 		    }
 		}
+		else
+		{
+			IPACMDBG_H("Invalid IPV6 address\n");
+			return IPACM_FAILURE;
+		}
 	}
 
 	return IPACM_SUCCESS;
@@ -2144,7 +2189,7 @@
 		   	        continue;
 		    }
 
-  	   	    rt_rule_entry = &rt_rule->rules[0];
+			rt_rule_entry = &rt_rule->rules[0];
 			rt_rule_entry->at_rear = 0;
 
 			if (iptype == IPA_IP_v4)
@@ -2170,20 +2215,19 @@
 #ifdef FEATURE_IPA_V3
 				rt_rule_entry->rule.hashable = false;
 #endif
-			    if (false == m_routing.AddRoutingRule(rt_rule))
-  	            {
-  	          	            IPACMERR("Routing rule addition failed!\n");
-  	          	            free(rt_rule);
-  	          	            return IPACM_FAILURE;
-			    }
+				if (false == m_routing.AddRoutingRule(rt_rule))
+				{
+					IPACMERR("Routing rule addition failed!\n");
+					free(rt_rule);
+					return IPACM_FAILURE;
+				}
 
 			    /* copy ipv4 RT hdl */
 		        get_client_memptr(eth_client, eth_index)->eth_rt_hdl[tx_index].eth_rt_rule_hdl_v4 =
   	   	        rt_rule->rules[0].rt_rule_hdl;
 		        IPACMDBG_H("tx:%d, rt rule hdl=%x ip-type: %d\n", tx_index,
 		      	get_client_memptr(eth_client, eth_index)->eth_rt_hdl[tx_index].eth_rt_rule_hdl_v4, iptype);
-
-  	   	    } else {
+			} else {
 
 		        for(v6_num = get_client_memptr(eth_client, eth_index)->route_rule_set_v6;v6_num < get_client_memptr(eth_client, eth_index)->ipv6_set;v6_num++)
 			    {
@@ -2212,12 +2256,12 @@
 #ifdef FEATURE_IPA_V3
 					rt_rule_entry->rule.hashable = true;
 #endif
-   	                if (false == m_routing.AddRoutingRule(rt_rule))
-  	                {
-  	                	    IPACMERR("Routing rule addition failed!\n");
-  	                	    free(rt_rule);
-  	                	    return IPACM_FAILURE;
-			        }
+			if (false == m_routing.AddRoutingRule(rt_rule))
+			{
+				IPACMERR("Routing rule addition failed!\n");
+				free(rt_rule);
+				return IPACM_FAILURE;
+			}
 
 		            get_client_memptr(eth_client, eth_index)->eth_rt_hdl[tx_index].eth_rt_rule_hdl_v6[v6_num] = rt_rule->rules[0].rt_rule_hdl;
 		            IPACMDBG_H("tx:%d, rt rule hdl=%x ip-type: %d\n", tx_index,
@@ -2257,7 +2301,7 @@
 			    }
 			}
 
-  	    } /* end of for loop */
+		} /* end of for loop */
 
 		free(rt_rule);
 
@@ -2624,7 +2668,7 @@
 	{
 			IPACMDBG_H("Clean Nat Rules for ipv4:0x%x\n", get_client_memptr(eth_client, clt_indx)->v4_addr);
 			CtList->HandleNeighIpAddrDelEvt(get_client_memptr(eth_client, clt_indx)->v4_addr);
- 	}
+	}
 
 	if (delete_eth_rtrules(clt_indx, IPA_IP_v4))
 	{
@@ -2730,7 +2774,7 @@
 /*handle LAN iface down event*/
 int IPACM_Lan::handle_down_evt()
 {
-	int i;
+	uint32_t i;
 	int res = IPACM_SUCCESS;
 
 	IPACMDBG_H("lan handle_down_evt\n ");
@@ -3013,14 +3057,16 @@
 		IPACMDBG_H("depend Got pipe %d rm index : %d \n", rx_prop->rx[0].src_pipe, IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]);
 		IPACM_Iface::ipacmcfg->DelRmDepend(IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]);
 		IPACMDBG_H("Finished delete dependency \n ");
+#ifndef FEATURE_ETH_BRIDGE_LE
 		free(rx_prop);
+#endif
 	}
 
 	if (eth_client != NULL)
 	{
 		free(eth_client);
 	}
-
+#ifndef FEATURE_ETH_BRIDGE_LE
 	if (tx_prop != NULL)
 	{
 		free(tx_prop);
@@ -3029,7 +3075,7 @@
 	{
 		free(iface_query);
 	}
-
+#endif
 	is_active = false;
 	post_del_self_evt();
 
@@ -3076,6 +3122,13 @@
 
 	memset(&flt_index, 0, sizeof(flt_index));
 	flt_index.source_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[0].src_pipe);
+	if ((int)flt_index.source_pipe_index == -1)
+	{
+		IPACMERR("Error Query src pipe idx, aborting...\n");
+		close(fd);
+		return IPACM_FAILURE;
+	}
+
 	flt_index.install_status = IPA_QMI_RESULT_SUCCESS_V01;
 #ifndef FEATURE_IPA_V3
 	flt_index.filter_index_list_len = prop->num_ext_props;
@@ -3085,6 +3138,13 @@
 #endif
 	flt_index.embedded_pipe_index_valid = 1;
 	flt_index.embedded_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, IPA_CLIENT_APPS_LAN_WAN_PROD);
+	if ((int)flt_index.embedded_pipe_index == -1)
+	{
+		IPACMERR("Error Query emb pipe idx, aborting...\n");
+		close(fd);
+		return IPACM_FAILURE;
+	}
+
 	flt_index.retain_header_valid = 1;
 	flt_index.retain_header = 0;
 	flt_index.embedded_call_mux_id_valid = 1;
@@ -3370,6 +3430,12 @@
 
 		memset(&flt_index, 0, sizeof(flt_index));
 		flt_index.source_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[0].src_pipe);
+		if ((int)flt_index.source_pipe_index == -1)
+		{
+			IPACMERR("Error Query src pipe idx, aborting...\n");
+			close(fd);
+			return IPACM_FAILURE;
+		}
 		flt_index.install_status = IPA_QMI_RESULT_SUCCESS_V01;
 #ifndef FEATURE_IPA_V3
 		flt_index.filter_index_list_len = 0;
@@ -3379,6 +3445,13 @@
 #endif
 		flt_index.embedded_pipe_index_valid = 1;
 		flt_index.embedded_pipe_index = ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, IPA_CLIENT_APPS_LAN_WAN_PROD);
+		if ((int)flt_index.embedded_pipe_index == -1)
+		{
+			IPACMERR("Error Query emb pipe idx, aborting...\n");
+			close(fd);
+			return IPACM_FAILURE;
+		}
+
 		flt_index.retain_header_valid = 1;
 		flt_index.retain_header = 0;
 		flt_index.embedded_call_mux_id_valid = 1;
@@ -3530,7 +3603,8 @@
 /*handle reset usb-client rt-rules */
 int IPACM_Lan::handle_lan_client_reset_rt(ipa_ip_type iptype)
 {
-	int i, res = IPACM_SUCCESS;
+	uint32_t i;
+	int res = IPACM_SUCCESS;
 
 	/* clean eth-client routing rules */
 	IPACMDBG_H("left %d eth clients need to be deleted \n ", num_eth_client);
@@ -4096,7 +4170,8 @@
 /*handle reset usb-client rt-rules */
 int IPACM_Lan::handle_tethering_stats_event(ipa_get_data_stats_resp_msg_v01 *data)
 {
-	int cnt, pipe_len, fd;
+	int fd;
+	uint32_t pipe_len, cnt;
 	uint64_t num_ul_packets, num_ul_bytes;
 	uint64_t num_dl_packets, num_dl_bytes;
 	bool ul_pipe_found, dl_pipe_found;
@@ -4127,7 +4202,7 @@
 				for (cnt=0; cnt<tx_prop->num_tx_props; cnt++)
 				{
 					IPACMDBG_H("Check Tx_prop_entry(%d) pipe(%d)\n", cnt, ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, tx_prop->tx[cnt].dst_pipe));
-					if(ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, tx_prop->tx[cnt].dst_pipe) == data->dl_dst_pipe_stats_list[pipe_len].pipe_index)
+					if(ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, tx_prop->tx[cnt].dst_pipe) == (int)data->dl_dst_pipe_stats_list[pipe_len].pipe_index)
 					{
 						/* update the DL stats */
 						dl_pipe_found = true;
@@ -4154,7 +4229,8 @@
 				for (cnt=0; cnt < rx_prop->num_rx_props; cnt++)
 				{
 					IPACMDBG_H("Check Rx_prop_entry(%d) pipe(%d)\n", cnt, ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[cnt].src_pipe));
-					if(ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[cnt].src_pipe) == data->ul_src_pipe_stats_list[pipe_len].pipe_index)
+					//Typecasting to avoid -Wall -Werror errors
+					if(ioctl(fd, IPA_IOC_QUERY_EP_MAPPING, rx_prop->rx[cnt].src_pipe) == (int)data->ul_src_pipe_stats_list[pipe_len].pipe_index)
 					{
 						/* update the UL stats */
 						ul_pipe_found = true;
@@ -4204,7 +4280,8 @@
 /*handle tether client */
 int IPACM_Lan::handle_tethering_client(bool reset, ipacm_client_enum ipa_client)
 {
-	int cnt, fd, ret = IPACM_SUCCESS;
+	int fd, ret = IPACM_SUCCESS;
+	uint32_t cnt;
 	int fd_wwan_ioctl = open(WWAN_QMI_IOCTL_DEVICE_NAME, O_RDWR);
 	wan_ioctl_set_tether_client_pipe tether_client;
 
@@ -4266,11 +4343,18 @@
 {
 	ipacm_cmd_q_data eth_bridge_evt;
 	ipacm_event_eth_bridge *evt_data_eth_bridge;
+#ifdef FEATURE_L2TP
 	ipacm_event_data_all *evt_data_all;
-
+#endif
+	if(ipv6_addr)
+	{
+		IPACMDBG_H("IPv6 addr: %08x:%08x:%08x:%08x \n", ipv6_addr[0],
+			ipv6_addr[1], ipv6_addr[2], ipv6_addr[3]);
+	}
 	memset(&eth_bridge_evt, 0, sizeof(ipacm_cmd_q_data));
 	eth_bridge_evt.event = evt;
 
+#ifdef FEATURE_L2TP
 	if(evt == IPA_HANDLE_VLAN_CLIENT_INFO || evt == IPA_HANDLE_VLAN_IFACE_INFO)
 	{
 		evt_data_all = (ipacm_event_data_all*)malloc(sizeof(*evt_data_all));
@@ -4301,6 +4385,7 @@
 		eth_bridge_evt.evt_data = (void*)evt_data_all;
 	}
 	else
+#endif
 	{
 		evt_data_eth_bridge = (ipacm_event_eth_bridge*)malloc(sizeof(*evt_data_eth_bridge));
 		if(evt_data_eth_bridge == NULL)
@@ -4326,7 +4411,6 @@
 		}
 		eth_bridge_evt.evt_data = (void*)evt_data_eth_bridge;
 	}
-
 	IPACMDBG_H("Posting event %s\n",
 		IPACM_Iface::ipacmcfg->getEventName(evt));
 	IPACM_EvtDispatcher::PostEvt(&eth_bridge_evt);
@@ -4377,10 +4461,10 @@
 int IPACM_Lan::eth_bridge_add_rt_rule(uint8_t *mac, char *rt_tbl_name, uint32_t hdr_proc_ctx_hdl,
 		ipa_hdr_l2_type peer_l2_hdr_type, ipa_ip_type iptype, uint32_t *rt_rule_hdl, int *rt_rule_count)
 {
-	int i, len, res = IPACM_SUCCESS;
+	int len, res = IPACM_SUCCESS;
+	uint32_t i, position, num_rt_rule;
 	struct ipa_ioc_add_rt_rule* rt_rule_table = NULL;
 	struct ipa_rt_rule_add rt_rule;
-	int position, num_rt_rule;
 
 	IPACMDBG_H("Received client MAC 0x%02x%02x%02x%02x%02x%02x.\n",
 			mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
@@ -4473,7 +4557,8 @@
 {
 	struct ipa_ioc_mdfy_rt_rule *rt_rule = NULL;
 	struct ipa_rt_rule_mdfy *rt_rule_entry;
-	int len, index, res = IPACM_SUCCESS;
+	int len, res = IPACM_SUCCESS;
+	uint32_t index;
 
 	if(tx_prop == NULL)
 	{
@@ -4572,11 +4657,12 @@
 
 int IPACM_Lan::eth_bridge_add_flt_rule(uint8_t *mac, uint32_t rt_tbl_hdl, ipa_ip_type iptype, uint32_t *flt_rule_hdl)
 {
-	int len, res = IPACM_SUCCESS;
+	int res = IPACM_SUCCESS;
+#ifdef FEATURE_IPA_V3
+	int len;
 	struct ipa_flt_rule_add flt_rule_entry;
 	struct ipa_ioc_add_flt_rule_after *pFilteringTable = NULL;
 
-#ifdef FEATURE_IPA_V3
 	if (rx_prop == NULL || tx_prop == NULL)
 	{
 		IPACMDBG_H("No rx or tx properties registered for iface %s\n", dev_name);
@@ -4635,6 +4721,9 @@
 
 end:
 	free(pFilteringTable);
+#else
+	IPACMDBG_H("Received client MAC 0x%02x%02x%02x%02x%02x%02x.\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+	IPACMDBG_H("Not support rt_tbl_hdl %d flt_rule_hdl %p ip-type %d\n", rt_tbl_hdl, flt_rule_hdl, iptype);
 #endif
 	return res;
 }
@@ -4670,6 +4759,7 @@
 	return IPACM_SUCCESS;
 }
 
+#ifdef FEATURE_L2TP
 /* check if the event is associated with vlan interface */
 bool IPACM_Lan::is_vlan_event(char *event_iface_name)
 {
@@ -4717,6 +4807,7 @@
 	uint32_t *second_pass_hdr_hdl, int *num_rt_hdl, uint32_t *first_pass_rt_rule_hdl, uint32_t *second_pass_rt_rule_hdl)
 {
 	int i, size, position;
+	uint32_t tx_index;
 	uint32_t vlan_iface_ipv6_addr_network[4], vlan_client_ipv6_addr_network[4];
 	ipa_ioc_add_hdr *hdr_table;
 	ipa_hdr_add *hdr;
@@ -4837,9 +4928,9 @@
 	rt_rule_table->rt_tbl_name[IPA_RESOURCE_NAME_MAX-1] = 0;
 
 	position = 0;
-	for(i = 0; i < iface_query->num_tx_props; i++)
+	for(tx_index = 0; tx_index < iface_query->num_tx_props; tx_index++)
 	{
-		if(tx_prop->tx[i].ip == iptype)
+		if(tx_prop->tx[tx_index].ip == iptype)
 		{
 			if(position >= *num_rt_hdl || position >= MAX_NUM_PROP)
 			{
@@ -4857,7 +4948,7 @@
 			rt_rule->rule.hdr_proc_ctx_hdl = *first_pass_hdr_proc_ctx_hdl;
 			rt_rule->rule.dst = IPA_CLIENT_DUMMY_CONS;
 
-			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[i].attrib, sizeof(rt_rule->rule.attrib));
+			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[tx_index].attrib, sizeof(rt_rule->rule.attrib));
 			if(peer_l2_hdr_type == IPA_HDR_L2_ETHERNET_II)
 				rt_rule->rule.attrib.attrib_mask |= IPA_FLT_MAC_DST_ADDR_ETHER_II;
 			else
@@ -4909,14 +5000,14 @@
 		}
 		hdr->type = IPA_HDR_L2_ETHERNET_II;
 		hdr->is_partial = 0;
-		for(i = 0; i < tx_prop->num_tx_props; i++)
+		for(tx_index = 0; tx_index < tx_prop->num_tx_props; tx_index++)
 		{
-			if(tx_prop->tx[i].ip == IPA_IP_v6)
+			if(tx_prop->tx[tx_index].ip == IPA_IP_v6)
 			{
 				memset(&copy_hdr, 0, sizeof(copy_hdr));
-				strlcpy(copy_hdr.name, tx_prop->tx[i].hdr_name,
+				strlcpy(copy_hdr.name, tx_prop->tx[tx_index].hdr_name,
 					sizeof(copy_hdr.name));
-				IPACMDBG_H("Header name: %s in tx:%d\n", copy_hdr.name, i);
+				IPACMDBG_H("Header name: %s in tx:%d\n", copy_hdr.name, tx_index);
 				if(m_header.CopyHeader(&copy_hdr) == false)
 				{
 					IPACMERR("Failed to get partial header.\n");
@@ -4969,9 +5060,9 @@
 	rt_rule_table->rt_tbl_name[IPA_RESOURCE_NAME_MAX-1] = 0;
 
 	position = 0;
-	for(i = 0; i < iface_query->num_tx_props; i++)
+	for(tx_index = 0; tx_index < iface_query->num_tx_props; tx_index++)
 	{
-		if(tx_prop->tx[i].ip == IPA_IP_v6)
+		if(tx_prop->tx[tx_index].ip == IPA_IP_v6)
 		{
 			if(position >= *num_rt_hdl || position >= MAX_NUM_PROP)
 			{
@@ -4987,9 +5078,9 @@
 			rt_rule->rule.hashable = false;	//WLAN->ETH direction rules are set to non-hashable to keep consistent with the other direction
 			rt_rule->rule.hdr_hdl = *second_pass_hdr_hdl;
 			rt_rule->rule.hdr_proc_ctx_hdl = 0;
-			rt_rule->rule.dst = tx_prop->tx[i].dst_pipe;
+			rt_rule->rule.dst = tx_prop->tx[tx_index].dst_pipe;
 
-			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[i].attrib, sizeof(rt_rule->rule.attrib));
+			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[tx_index].attrib, sizeof(rt_rule->rule.attrib));
 			rt_rule->rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR;
 			memcpy(rt_rule->rule.attrib.u.v6.dst_addr, vlan_client_ipv6_addr,
 				sizeof(rt_rule->rule.attrib.u.v6.dst_addr));
@@ -5073,6 +5164,7 @@
 	int *num_rt_hdl, uint32_t *rt_rule_hdl)
 {
 	int i, size, position;
+	uint32_t tx_index;
 	ipa_ioc_add_hdr_proc_ctx *hdr_proc_ctx_table;
 	ipa_hdr_proc_ctx_add *hdr_proc_ctx;
 	ipa_ioc_add_rt_rule* rt_rule_table;
@@ -5086,11 +5178,11 @@
 	}
 
 	memset(&hdr, 0, sizeof(hdr));
-	for(i = 0; i < tx_prop->num_tx_props; i++)
+	for(tx_index = 0; tx_index < tx_prop->num_tx_props; tx_index++)
 	{
-		if(tx_prop->tx[i].ip == iptype)
+		if(tx_prop->tx[tx_index].ip == iptype)
 		{
-			strlcpy(hdr.name, tx_prop->tx[i].hdr_name,
+			strlcpy(hdr.name, tx_prop->tx[tx_index].hdr_name,
 				sizeof(hdr.name));
 			break;
 		}
@@ -5160,9 +5252,9 @@
 	rt_rule_table->rt_tbl_name[IPA_RESOURCE_NAME_MAX-1] = 0;
 
 	position = 0;
-	for(i = 0; i < iface_query->num_tx_props; i++)
+	for(tx_index = 0; tx_index < iface_query->num_tx_props; tx_index++)
 	{
-		if(tx_prop->tx[i].ip == iptype)
+		if(tx_prop->tx[tx_index].ip == iptype)
 		{
 			if(position >= *num_rt_hdl || position >= MAX_NUM_PROP)
 			{
@@ -5179,9 +5271,9 @@
 
 			rt_rule->rule.hdr_hdl = 0;
 			rt_rule->rule.hdr_proc_ctx_hdl = *hdr_proc_ctx_hdl;
-			rt_rule->rule.dst = tx_prop->tx[i].dst_pipe;
+			rt_rule->rule.dst = tx_prop->tx[tx_index].dst_pipe;
 
-			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[i].attrib, sizeof(rt_rule->rule.attrib));
+			memcpy(&rt_rule->rule.attrib, &tx_prop->tx[tx_index].attrib, sizeof(rt_rule->rule.attrib));
 
 			rt_rule->rule.attrib.attrib_mask |= IPA_FLT_MAC_DST_ADDR_L2TP;
 			memset(rt_rule->rule.attrib.dst_mac_addr_mask, 0xFF, sizeof(rt_rule->rule.attrib.dst_mac_addr_mask));
@@ -5489,6 +5581,7 @@
 	}
 	return false;
 }
+#endif
 
 /* add tcp syn flt rule */
 int IPACM_Lan::add_tcp_syn_flt_rule(ipa_ip_type iptype)
diff --git a/ipacm/src/IPACM_LanToLan.cpp b/ipacm/src/IPACM_LanToLan.cpp
index 799dfee..2902268 100644
--- a/ipacm/src/IPACM_LanToLan.cpp
+++ b/ipacm/src/IPACM_LanToLan.cpp
@@ -94,15 +94,15 @@
 	IPACM_EvtDispatcher::registr(IPA_ETH_BRIDGE_CLIENT_ADD, this);
 	IPACM_EvtDispatcher::registr(IPA_ETH_BRIDGE_CLIENT_DEL, this);
 	IPACM_EvtDispatcher::registr(IPA_ETH_BRIDGE_WLAN_SCC_MCC_SWITCH, this);
+#ifdef FEATURE_L2TP
 	IPACM_EvtDispatcher::registr(IPA_ADD_VLAN_IFACE, this);
 	IPACM_EvtDispatcher::registr(IPA_DEL_VLAN_IFACE, this);
 	IPACM_EvtDispatcher::registr(IPA_ADD_L2TP_VLAN_MAPPING, this);
 	IPACM_EvtDispatcher::registr(IPA_DEL_L2TP_VLAN_MAPPING, this);
 	IPACM_EvtDispatcher::registr(IPA_HANDLE_VLAN_CLIENT_INFO, this);
 	IPACM_EvtDispatcher::registr(IPA_HANDLE_VLAN_IFACE_INFO, this);
-
+#endif
 	m_has_l2tp_iface = false;
-
 	return;
 }
 
@@ -122,6 +122,7 @@
 	return p_instance;
 }
 
+#ifdef FEATURE_L2TP
 bool IPACM_LanToLan::has_l2tp_iface()
 {
 	list<IPACM_LanToLan_Iface>::iterator it;
@@ -137,12 +138,16 @@
 	}
 	return has_l2tp_iface;
 }
+#endif
 
 void IPACM_LanToLan::event_callback(ipa_cm_event_id event, void* param)
 {
 	ipacm_event_eth_bridge *eth_bridge_data;
 	ipa_ioc_vlan_iface_info *vlan_iface_data;
+
+#ifdef FEATURE_L2TP
 	ipa_ioc_l2tp_vlan_mapping_info *l2tp_vlan_mapping_data;
+#endif
 	ipacm_event_data_all *vlan_data;
 
 	IPACMDBG_H("Get %s event.\n", IPACM_Iface::ipacmcfg->getEventName(event));
@@ -184,6 +189,7 @@
 			break;
 		}
 
+#ifdef FEATURE_L2TP
 		case IPA_ADD_VLAN_IFACE:
 		{
 			vlan_iface_data = (ipa_ioc_vlan_iface_info*)param;
@@ -197,14 +203,12 @@
 			handle_del_vlan_iface(vlan_iface_data);
 			break;
 		}
-
 		case IPA_ADD_L2TP_VLAN_MAPPING:
 		{
 			l2tp_vlan_mapping_data = (ipa_ioc_l2tp_vlan_mapping_info*)param;
 			handle_add_l2tp_vlan_mapping(l2tp_vlan_mapping_data);
 			break;
 		}
-
 		case IPA_DEL_L2TP_VLAN_MAPPING:
 		{
 			l2tp_vlan_mapping_data = (ipa_ioc_l2tp_vlan_mapping_info*)param;
@@ -223,6 +227,7 @@
 			handle_vlan_iface_info(vlan_data);
 			break;
 		}
+#endif
 		default:
 			break;
 	}
@@ -377,7 +382,6 @@
 			break;
 		}
 	}
-
 	if(m_has_l2tp_iface == true && has_l2tp_iface == false)
 	{
 		IPACMDBG_H("There is no l2tp iface now, delete rt rules for l2tp iface.\n");
@@ -525,6 +529,7 @@
 	return;
 }
 
+#ifdef FEATURE_L2TP
 void IPACM_LanToLan::handle_add_vlan_iface(ipa_ioc_vlan_iface_info *data)
 {
 	list<vlan_iface_info>::iterator it_vlan;
@@ -588,12 +593,12 @@
 	}
 	return;
 }
-
 void IPACM_LanToLan::handle_add_l2tp_vlan_mapping(ipa_ioc_l2tp_vlan_mapping_info *data)
 {
 	list<l2tp_vlan_mapping_info>::iterator it_mapping;
 	list<vlan_iface_info>::iterator it_vlan;
 	list<IPACM_LanToLan_Iface>::iterator it_iface;
+	IPACM_LanToLan_Iface *l2tp_iface;
 	l2tp_vlan_mapping_info new_mapping;
 	bool has_l2tp_iface = false;
 
@@ -637,6 +642,8 @@
 		if(it_iface->set_l2tp_iface(data->vlan_iface_name) == true)
 		{
 			has_l2tp_iface = true;
+			l2tp_iface = &(*it_iface);
+			break;
 		}
 	}
 
@@ -651,6 +658,7 @@
 				it_iface->handle_l2tp_enable();
 			}
 		}
+		l2tp_iface->switch_to_l2tp_iface();
 	}
 	return;
 }
@@ -682,7 +690,6 @@
 	}
 	return;
 }
-
 void IPACM_LanToLan::handle_vlan_client_info(ipacm_event_data_all *data)
 {
 	list<l2tp_vlan_mapping_info>::iterator it_mapping;
@@ -759,6 +766,7 @@
 	}
 	return;
 }
+#endif
 
 void IPACM_LanToLan::handle_cached_client_add_event(IPACM_Lan *p_iface)
 {
@@ -813,6 +821,7 @@
 
 	IPACMDBG_H("Is there l2tp interface? %d\n", m_has_l2tp_iface);
 
+#ifdef FEATURE_L2TP
 	IPACMDBG_H("There are %d vlan interfaces.\n", m_vlan_iface.size());
 	for(it_vlan = m_vlan_iface.begin(); it_vlan != m_vlan_iface.end(); it_vlan++)
 	{
@@ -841,7 +850,7 @@
 		IPACMDBG_H("L2tp client mac: 0x%02x%02x%02x%02x%02x%02x\n", it_mapping->l2tp_client_mac[0], it_mapping->l2tp_client_mac[1],
 			it_mapping->l2tp_client_mac[2], it_mapping->l2tp_client_mac[3], it_mapping->l2tp_client_mac[4], it_mapping->l2tp_client_mac[5]);
 	}
-
+#endif
 	IPACMDBG_H("There are %d interfaces in total.\n", m_iface.size());
 	for(it = m_iface.begin(); it != m_iface.end(); it++)
 	{
@@ -952,6 +961,7 @@
 	return;
 }
 
+#ifdef FEATURE_L2TP
 void IPACM_LanToLan_Iface::add_l2tp_client_rt_rule(peer_iface_info *peer, client_info *client)
 {
 	ipa_hdr_l2_type peer_l2_hdr_type;
@@ -985,6 +995,7 @@
 	}
 	return;
 }
+#endif
 
 void IPACM_LanToLan_Iface::add_all_inter_interface_client_flt_rule(ipa_ip_type iptype)
 {
@@ -1068,18 +1079,22 @@
 		l2tp_second_pass_flt_rule_hdl = it_flt->l2tp_second_pass_flt_rule_hdl;
 	}
 
+#ifdef FEATURE_L2TP
 	if(m_is_l2tp_iface)
 	{
 		m_p_iface->add_l2tp_flt_rule(client->mac_addr, &l2tp_first_pass_flt_rule_hdl);
 	}
 	else
+#endif
 	{
+#ifdef FEATURE_L2TP
 		if(client->is_l2tp_client)
 		{
 			m_p_iface->add_l2tp_flt_rule(iptype, client->mac_addr, client->mapping_info->vlan_client_ipv6_addr,
 				&l2tp_first_pass_flt_rule_hdl, &l2tp_second_pass_flt_rule_hdl);
 		}
 		else
+#endif
 		{
 			rt_tbl.ip = iptype;
 			memcpy(rt_tbl.name, peer->rt_tbl_name_for_flt[iptype], sizeof(rt_tbl.name));
@@ -1151,6 +1166,7 @@
 				}
 				else
 				{
+#ifdef FEATURE_L2TP
 					if(client->is_l2tp_client)
 					{
 						m_p_iface->del_l2tp_flt_rule(IPA_IP_v4, it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v4],
@@ -1160,6 +1176,7 @@
 							it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v4], it_flt->l2tp_second_pass_flt_rule_hdl);
 					}
 					else
+#endif
 					{
 						m_p_iface->eth_bridge_del_flt_rule(it_flt->flt_rule_hdl[IPA_IP_v4], IPA_IP_v4);
 						IPACMDBG_H("Deleted IPv4 flt rule %d.\n", it_flt->flt_rule_hdl[IPA_IP_v4]);
@@ -1168,13 +1185,16 @@
 			}
 			if(m_is_ip_addr_assigned[IPA_IP_v6])
 			{
+#ifdef FEATURE_L2TP
 				if(m_is_l2tp_iface)
 				{
 					m_p_iface->del_l2tp_flt_rule(it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6]);
 					IPACMDBG_H("Deleted IPv6 flt rule %d.\n", it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6]);
 				}
 				else
+#endif
 				{
+#ifdef FEATURE_L2TP
 					if(client->is_l2tp_client)
 					{
 						m_p_iface->del_l2tp_flt_rule(IPA_IP_v6, it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6],
@@ -1183,6 +1203,7 @@
 							it_flt->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6], it_flt->l2tp_second_pass_flt_rule_hdl);
 					}
 					else
+#endif
 					{
 						m_p_iface->eth_bridge_del_flt_rule(it_flt->flt_rule_hdl[IPA_IP_v6], IPA_IP_v6);
 						IPACMDBG_H("Deleted IPv6 flt rule %d.\n", it_flt->flt_rule_hdl[IPA_IP_v6]);
@@ -1224,15 +1245,17 @@
 				IPACMDBG_H("IPv6 rt rule %d is deleted.\n", client->inter_iface_rt_rule_hdl[peer_l2_hdr_type].rule_hdl[IPA_IP_v6][i]);
 			}
 			client->inter_iface_rt_rule_hdl[peer_l2_hdr_type].num_hdl[IPA_IP_v6] = 0;
-
+#ifdef FEATURE_L2TP
 			if(IPACM_LanToLan::get_instance()->has_l2tp_iface() == true)
 			{
 				m_p_iface->del_l2tp_rt_rule(IPA_IP_v6, client->l2tp_rt_rule_hdl[peer_l2_hdr_type].num_rt_hdl[IPA_IP_v6],
 					client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_rt_rule_hdl[IPA_IP_v6]);
 			}
+#endif
 		}
 		else
 		{
+#ifdef FEATURE_L2TP
 			m_p_iface->del_l2tp_rt_rule(IPA_IP_v4, client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_hdr_hdl,
 				client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_hdr_proc_ctx_hdl[IPA_IP_v4], client->l2tp_rt_rule_hdl[peer_l2_hdr_type].second_pass_hdr_hdl,
 				client->l2tp_rt_rule_hdl[peer_l2_hdr_type].num_rt_hdl[IPA_IP_v4], client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_rt_rule_hdl[IPA_IP_v4],
@@ -1241,6 +1264,7 @@
 			m_p_iface->del_l2tp_rt_rule(IPA_IP_v6, 0, client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_hdr_proc_ctx_hdl[IPA_IP_v6],
 				0, client->l2tp_rt_rule_hdl[peer_l2_hdr_type].num_rt_hdl[IPA_IP_v6], client->l2tp_rt_rule_hdl[peer_l2_hdr_type].first_pass_rt_rule_hdl[IPA_IP_v6],
 				NULL);
+#endif
 		}
 	}
 	else
@@ -1344,6 +1368,7 @@
 			}
 			else
 			{
+#ifdef FEATURE_L2TP
 				if(it->p_client->is_l2tp_client)
 				{
 					m_p_iface->del_l2tp_flt_rule(IPA_IP_v4, it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v4],
@@ -1353,6 +1378,7 @@
 						it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v4], it->l2tp_second_pass_flt_rule_hdl);
 				}
 				else
+#endif
 				{
 					m_p_iface->eth_bridge_del_flt_rule(it->flt_rule_hdl[IPA_IP_v4], IPA_IP_v4);
 					IPACMDBG_H("Deleted IPv4 flt rule %d.\n", it->flt_rule_hdl[IPA_IP_v4]);
@@ -1361,13 +1387,16 @@
 		}
 		if(m_is_ip_addr_assigned[IPA_IP_v6])
 		{
+#ifdef FEATURE_L2TP
 			if(m_is_l2tp_iface)
 			{
 				m_p_iface->del_l2tp_flt_rule(it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6]);
 				IPACMDBG_H("Deleted IPv6 flt rule %d.\n", it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6]);
 			}
 			else
+#endif
 			{
+#ifdef FEATURE_L2TP
 				if(it->p_client->is_l2tp_client)
 				{
 					m_p_iface->del_l2tp_flt_rule(IPA_IP_v6, it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6],
@@ -1376,6 +1405,7 @@
 						it->l2tp_first_pass_flt_rule_hdl[IPA_IP_v6], it->l2tp_second_pass_flt_rule_hdl);
 				}
 				else
+#endif
 				{
 					m_p_iface->eth_bridge_del_flt_rule(it->flt_rule_hdl[IPA_IP_v6], IPA_IP_v6);
 					IPACMDBG_H("Deleted IPv6 flt rule %d.\n", it->flt_rule_hdl[IPA_IP_v6]);
@@ -1399,11 +1429,13 @@
 		{
 			del_client_rt_rule(peer, &(*it));
 		}
+#ifdef FEATURE_L2TP
 		if(IPACM_LanToLan::get_instance()->has_l2tp_iface() == true)
 		{
 			m_p_iface->eth_bridge_del_hdr_proc_ctx(hdr_proc_ctx_for_l2tp);
 			hdr_proc_ctx_for_l2tp = 0;
 		}
+#endif
 	}
 
 	return;
@@ -1646,12 +1678,14 @@
 				{
 					IPACMDBG_H("Delete client routing rule for peer interface.\n");
 					del_client_rt_rule(&(*it_peer_info), &(*it_client));
+#ifdef FEATURE_L2TP
 					if(it_client->is_l2tp_client == false && IPACM_LanToLan::get_instance()->has_l2tp_iface() == true
 						&& m_client_info.size() == 1)
 					{
 						m_p_iface->eth_bridge_del_hdr_proc_ctx(hdr_proc_ctx_for_l2tp);
 						hdr_proc_ctx_for_l2tp = 0;
 					}
+#endif
 					flag[it_peer_info->peer->get_iface_pointer()->tx_prop->tx[0].hdr_l2_type] = true;
 				}
 			}
@@ -1768,6 +1802,7 @@
 						IPACMDBG_H("%d\n", it_client->inter_iface_rt_rule_hdl[j].rule_hdl[IPA_IP_v6][k]);
 					}
 
+#ifdef FEATURE_L2TP
 					if(it_client->is_l2tp_client)
 					{
 						IPACMDBG_H("Printing l2tp hdr info for l2tp client.\n");
@@ -1815,6 +1850,7 @@
 							}
 						}
 					}
+#endif
 				}
 			}
 		}
@@ -1930,6 +1966,7 @@
 	return;
 }
 
+#ifdef FEATURE_L2TP
 bool IPACM_LanToLan_Iface::set_l2tp_iface(char *vlan_iface_name)
 {
 	IPACMDBG_H("Self iface %s, vlan iface %s\n", m_p_iface->dev_name,
@@ -1941,7 +1978,6 @@
 		{
 			IPACMDBG_H("This interface is l2tp interface.\n");
 			m_is_l2tp_iface = true;
-			switch_to_l2tp_iface();
 		}
 	}
 	return m_is_l2tp_iface;
@@ -1976,7 +2012,6 @@
 	}
 	return;
 }
-
 void IPACM_LanToLan_Iface::handle_l2tp_enable()
 {
 	int i;
@@ -2046,3 +2081,4 @@
 	}
 	return;
 }
+#endif
diff --git a/ipacm/src/IPACM_Log.cpp b/ipacm/src/IPACM_Log.cpp
index 20dd26c..d0bd108 100644
--- a/ipacm/src/IPACM_Log.cpp
+++ b/ipacm/src/IPACM_Log.cpp
@@ -50,13 +50,8 @@
 #include <errno.h>
 #include <IPACM_Defs.h>
 
-void logmessage(int log_level)
-{
-	return;
-}
-
 /* start IPACMDIAG socket*/
-int create_socket(unsigned int *sockfd)
+int create_socket(int *sockfd)
 {
 
   if ((*sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) == IPACM_FAILURE)
@@ -78,7 +73,7 @@
 	ipacm_log_buffer_t ipacm_log_buffer;
 	int numBytes=0, len;
 	struct sockaddr_un ipacmlog_socket;
-	static unsigned int ipacm_log_sockfd = 0;
+	static int ipacm_log_sockfd = 0;
 
 	if(ipacm_log_sockfd == 0)
 	{
diff --git a/ipacm/src/IPACM_Main.cpp b/ipacm/src/IPACM_Main.cpp
index 562ff82..5d0f83b 100644
--- a/ipacm/src/IPACM_Main.cpp
+++ b/ipacm/src/IPACM_Main.cpp
@@ -106,9 +106,17 @@
 void ipa_is_ipacm_running(void);
 int ipa_get_if_index(char *if_name, int *if_index);
 
+IPACM_Neighbor *neigh;
+IPACM_IfaceManager *ifacemgr;
+#ifdef FEATURE_IPACM_HAL
+	IPACM_OffloadManager* OffloadMng;
+	HAL *hal;
+#endif
+
 /* start netlink socket monitor*/
 void* netlink_start(void *param)
 {
+	param = NULL;
 	ipa_nl_sk_fd_set_info_t sk_fdset;
 	int ret_val = 0;
 	memset(&sk_fdset, 0, sizeof(ipa_nl_sk_fd_set_info_t));
@@ -137,6 +145,7 @@
 	ipacm_cmd_q_data evt_data;
 	uint32_t mask = IN_MODIFY | IN_MOVE;
 
+	param = NULL;
 	inotify_fd = inotify_init();
 	if (inotify_fd < 0)
 	{
@@ -234,12 +243,14 @@
 	ipacm_event_data_wlan_ex *data_ex;
 	ipa_get_data_stats_resp_msg_v01 *data_tethering_stats = NULL;
 	ipa_get_apn_data_stats_resp_msg_v01 *data_network_stats = NULL;
+#ifdef FEATURE_L2TP
 	ipa_ioc_vlan_iface_info *vlan_info = NULL;
 	ipa_ioc_l2tp_vlan_mapping_info *mapping = NULL;
-
+#endif
 	ipacm_cmd_q_data new_neigh_evt;
 	ipacm_event_data_all* new_neigh_data;
 
+	param = NULL;
 	fd = open(IPA_DRIVER, O_RDWR);
 	if (fd < 0)
 	{
@@ -782,7 +793,6 @@
 
 void IPACM_Sig_Handler(int sig)
 {
-	int cnt;
 	ipacm_cmd_q_data evt_data;
 
 	printf("Received Signal: %d\n", sig);
@@ -821,19 +831,19 @@
 	int ret;
 	pthread_t netlink_thread = 0, monitor_thread = 0, ipa_driver_thread = 0;
 	pthread_t cmd_queue_thread = 0;
-#ifdef FEATURE_IPACM_HAL
-	IPACM_OffloadManager* OffloadMng;
-#endif
 
 	/* check if ipacm is already running or not */
 	ipa_is_ipacm_running();
 
 	IPACMDBG_H("In main()\n");
-	IPACM_Neighbor *neigh = new IPACM_Neighbor();
-	IPACM_IfaceManager *ifacemgr = new IPACM_IfaceManager();
+	(void)argc;
+	(void)argv;
+
+	neigh = new IPACM_Neighbor();
+	ifacemgr = new IPACM_IfaceManager();
 #ifdef FEATURE_IPACM_HAL
 	OffloadMng = IPACM_OffloadManager::GetInstance();
-	HAL *hal = HAL::makeIPAHAL(1, OffloadMng);
+	hal = HAL::makeIPAHAL(1, OffloadMng);
 	IPACMDBG_H(" START IPACM_OffloadManager and link to android framework\n");
 #endif
 
diff --git a/ipacm/src/IPACM_Netlink.cpp b/ipacm/src/IPACM_Netlink.cpp
index b5fadcb..587663b 100644
--- a/ipacm/src/IPACM_Netlink.cpp
+++ b/ipacm/src/IPACM_Netlink.cpp
@@ -607,7 +607,7 @@
 	 )
 {
 	char dev_name[IF_NAME_LEN]={0};
-	int ret_val, mask_value, mask_index, mask_value_v6;
+	int ret_val, mask_index, mask_value_v6;
 	struct nlmsghdr *nlh = (struct nlmsghdr *)buffer;
 
 	uint32_t if_ipv4_addr =0, if_ipipv4_addr_mask =0, temp =0, if_ipv4_addr_gw =0;
diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp
index 762b56d..32606b9 100644
--- a/ipacm/src/IPACM_OffloadManager.cpp
+++ b/ipacm/src/IPACM_OffloadManager.cpp
@@ -263,6 +263,13 @@
 		return SUCCESS;
 	}
 
+	/* Iface is valid, add to list if not present */
+	if (std::find(valid_ifaces.begin(), valid_ifaces.end(), downstream_name) == valid_ifaces.end())
+	{
+		/* Iface is new, add it to the list */
+		valid_ifaces.push_back(downstream_name);
+	}
+
 	evt_data = (ipacm_event_ipahal_stream*)malloc(sizeof(ipacm_event_ipahal_stream));
 	if(evt_data == NULL)
 	{
@@ -291,10 +298,21 @@
 	ipacm_event_ipahal_stream *evt_data;
 
 	IPACMDBG_H("removeDownstream name(%s), ip-family(%d) \n", downstream_name, prefix.fam);
+	if(strnlen(downstream_name, sizeof(downstream_name)) == 0)
+	{
+		IPACMERR("iface length is 0.\n");
+		return FAIL_HARDWARE;
+	}
+	if (std::find(valid_ifaces.begin(), valid_ifaces.end(), downstream_name) == valid_ifaces.end())
+	{
+		IPACMERR("iface is not present in list.\n");
+		return FAIL_HARDWARE;
+	}
+
 	if(ipa_get_if_index(downstream_name, &index))
 	{
-		IPACMERR("fail to get iface index.\n");
-		return FAIL_HARDWARE;
+		IPACMERR("netdev(%s) already removed, ignored\n", downstream_name);
+		return SUCCESS;
 	}
 
 	evt_data = (ipacm_event_ipahal_stream*)malloc(sizeof(ipacm_event_ipahal_stream));
@@ -321,8 +339,6 @@
 RET IPACM_OffloadManager::setUpstream(const char *upstream_name, const Prefix& gw_addr_v4 , const Prefix& gw_addr_v6)
 {
 	int index;
-	ipacm_cmd_q_data evt;
-	ipacm_event_data_addr *evt_data_addr;
 	RET result = SUCCESS;
 
 	/* if interface name is NULL, default route is removed */
@@ -516,7 +532,7 @@
 		return FAIL_INPUT_CHECK;
 	}
 
-	IPACMDBG_H("SET_DATA_QUOTA %s %lld", quota.interface_name, mb);
+	IPACMDBG_H("SET_DATA_QUOTA %s %lu", quota.interface_name, mb);
 
 	if (ioctl(fd, WAN_IOC_SET_DATA_QUOTA, &quota) < 0) {
         IPACMERR("IOCTL WAN_IOCTL_SET_DATA_QUOTA call failed: %s", strerror(errno));
@@ -557,7 +573,7 @@
 	offload_stats.tx = stats.tx_bytes;
 	offload_stats.rx = stats.rx_bytes;
 
-	IPACMDBG_H("send getStats tx:%lld rx:%lld \n", offload_stats.tx, offload_stats.rx);
+	IPACMDBG_H("send getStats tx:%lu rx:%lu \n", offload_stats.tx, offload_stats.rx);
 	close(fd);
 	return SUCCESS;
 }
@@ -613,7 +629,7 @@
 	}
 
 	if(strnlen(if_name, sizeof(if_name)) >= sizeof(ifr.ifr_name)) {
-		IPACMERR("interface name overflows: len %d\n", strnlen(if_name, sizeof(if_name)));
+		IPACMERR("interface name overflows: len %zu\n", strnlen(if_name, sizeof(if_name)));
 		close(fd);
 		return IPACM_FAILURE;
 	}
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index e0391cd..79f88cd 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -79,8 +79,8 @@
 uint32_t IPACM_Wan::backhaul_ipv6_prefix[2];
 
 #ifdef FEATURE_IPA_ANDROID
-int	IPACM_Wan::ipa_if_num_tether_v4_total = 0;
-int	IPACM_Wan::ipa_if_num_tether_v6_total = 0;
+uint32_t	IPACM_Wan::ipa_if_num_tether_v4_total = 0;
+uint32_t	IPACM_Wan::ipa_if_num_tether_v6_total = 0;
 
 int	IPACM_Wan::ipa_if_num_tether_v4[IPA_MAX_IFACE_ENTRIES];
 int	IPACM_Wan::ipa_if_num_tether_v6[IPA_MAX_IFACE_ENTRIES];
@@ -96,6 +96,7 @@
 	wan_route_rule_v6_hdl = NULL;
 	wan_route_rule_v6_hdl_a5 = NULL;
 	wan_client = NULL;
+	mac_addr = NULL;
 
 	if(iface_query != NULL)
 	{
@@ -196,7 +197,7 @@
 /* handle new_address event */
 int IPACM_Wan::handle_addr_evt(ipacm_event_data_addr *data)
 {
-	struct ipa_ioc_add_rt_rule *rt_rule;
+	struct ipa_ioc_add_rt_rule *rt_rule = NULL;
 	struct ipa_rt_rule_add *rt_rule_entry;
 	struct ipa_ioc_add_flt_rule *flt_rule;
 	struct ipa_flt_rule_add flt_rule_entry;
@@ -560,7 +561,7 @@
 			if ((ipa_interface_index == ipa_if_num) && (m_is_sta_mode == Q6_WAN))
 			{
 				is_xlat = true;
-				IPACMDBG_H("WAN-LTE (%s) link up, iface: %d is_xlat: \n",
+				IPACMDBG_H("WAN-LTE (%s) link up, iface: %d is_xlat: %d\n",
 						IPACM_Iface::ipacmcfg->iface_table[ipa_interface_index].iface_name,data->if_index, is_xlat);
 			}
 			break;
@@ -1093,7 +1094,7 @@
 					}
 					else if (data->iptype == IPA_IP_v6)
 					{
-						for (int num_ipv6_addr = 0; num_ipv6_addr < num_dft_rt_v6; num_ipv6_addr++)
+						for (uint32_t num_ipv6_addr = 0; num_ipv6_addr < num_dft_rt_v6; num_ipv6_addr++)
 						{
 							if ((ipv6_addr[num_ipv6_addr][0] == data->ipv6_addr[0]) &&
 								(ipv6_addr[num_ipv6_addr][1] == data->ipv6_addr[1]) &&
@@ -1268,11 +1269,9 @@
 	/* add default WAN route */
 	struct ipa_ioc_add_rt_rule *rt_rule = NULL;
 	struct ipa_rt_rule_add *rt_rule_entry;
-	struct ipa_ioc_get_hdr sRetHeader;
-	uint32_t cnt, tx_index = 0;
+	uint32_t tx_index = 0;
 	const int NUM = 1;
 	ipacm_cmd_q_data evt_data;
-	struct ipa_ioc_copy_hdr sCopyHeader; /* checking if partial header*/
 	struct ipa_ioc_get_hdr hdr;
 
 	IPACMDBG_H("ip-type:%d\n", iptype);
@@ -1362,7 +1361,7 @@
 	    IPACMDBG_H("header length: %d, paritial: %d\n", sCopyHeader.hdr_len, sCopyHeader.is_partial);
 	    if(sCopyHeader.is_partial)
 	    {
- 	        IPACMDBG_H("Not setup default WAN routing rules cuz the header is not complete\n");
+ 	    	IPACMDBG_H("Not setup default WAN routing rules cuz the header is not complete\n");
             if(iptype==IPA_IP_v4)
 			{
 				header_partial_default_wan_v4 = true;
@@ -1598,7 +1597,7 @@
 			IPACM_Wan::xlat_mux_id = ext_prop->ext[0].mux_id;
 			wanup_data->xlat_mux_id = IPACM_Wan::xlat_mux_id;
 			IPACMDBG_H("Set xlat configuraiton with below information:\n");
-			IPACMDBG_H("xlat_enabled:  xlat_mux_id: %d \n",
+			IPACMDBG_H("xlat_enabled: %d xlat_mux_id: %d \n",
 					is_xlat, xlat_mux_id);
 		}
 		else
@@ -3159,10 +3158,6 @@
 {
 	int res = IPACM_SUCCESS;
 
-	char *dev_wlan0="wlan0";
-	char *dev_wlan1="wlan1";
-	char *dev_ecm0="ecm0";
-
 	/* ADD corresponding ipa_rm_resource_name of RX-endpoint before adding all IPV4V6 FT-rules */
 	IPACMDBG_H(" dun add producer dependency from %s with registered rx-prop\n", dev_name);
 
@@ -3395,7 +3390,8 @@
 
 int IPACM_Wan::query_ext_prop()
 {
-	int fd, ret = IPACM_SUCCESS, cnt;
+	int fd, ret = IPACM_SUCCESS;
+	uint32_t cnt;
 
 	if (iface_query->num_ext_props > 0)
 	{
@@ -4353,7 +4349,7 @@
 int IPACM_Wan::handle_down_evt()
 {
 	int res = IPACM_SUCCESS;
-	int i;
+	uint32_t i;
 
 	IPACMDBG_H(" wan handle_down_evt \n");
 
@@ -4581,7 +4577,7 @@
 int IPACM_Wan::handle_down_evt_ex()
 {
 	int res = IPACM_SUCCESS;
-	int i, tether_total;
+	uint32_t i, tether_total;
 	int ipa_if_num_tether_tmp[IPA_MAX_IFACE_ENTRIES];
 
 	IPACMDBG_H(" wan handle_down_evt \n");
@@ -5284,7 +5280,7 @@
 								pHeaderDescriptor->hdr[0].name[IPA_RESOURCE_NAME_MAX-1] = '\0';
 								if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_WAN_PARTIAL_HDR_NAME_v4, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 								{
-									IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+									IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 									res = IPACM_FAILURE;
 									goto fail;
 								}
@@ -5292,7 +5288,7 @@
 								snprintf(index,sizeof(index), "%d", header_name_count);
 								if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 								{
-									IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+									IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 									res = IPACM_FAILURE;
 									goto fail;
 								}
@@ -5381,14 +5377,14 @@
 				pHeaderDescriptor->hdr[0].name[IPA_RESOURCE_NAME_MAX-1] = '\0';
 				if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_WAN_PARTIAL_HDR_NAME_v6, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
 				snprintf(index,sizeof(index), "%d", header_name_count);
 				if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
@@ -5504,7 +5500,7 @@
 	else
 	{
 		if ((data->ipv6_addr[0] != 0) || (data->ipv6_addr[1] != 0) ||
-				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] || 0)) /* check if all 0 not valid ipv6 address */
+				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] != 0)) /* check if all 0 not valid ipv6 address */
 		{
 		   IPACMDBG_H("ipv6 address: 0x%x:%x:%x:%x\n", data->ipv6_addr[0], data->ipv6_addr[1], data->ipv6_addr[2], data->ipv6_addr[3]);
                    if(get_client_memptr(wan_client, clnt_indx)->ipv6_set < IPV6_NUM_ADDR)
@@ -5535,6 +5531,11 @@
 			 return IPACM_FAILURE; /* not setup the RT rules*/
 		    }
 		}
+		else
+		{
+			IPACMDBG_H("Invalid IPV6 address\n");
+			return IPACM_FAILURE;
+		}
 	}
 
 	return IPACM_SUCCESS;
@@ -5879,7 +5880,7 @@
 	int size = sizeof(struct ipa_ioc_mdfy_rt_rule) +
 		NUM_RULES * sizeof(struct ipa_rt_rule_mdfy);
 
-	IPACMDBG("\n");
+	IPACMDBG("isSCCMode: %d\n",isSCCMode);
 
 	if (tx_prop == NULL || is_default_gateway == false)
 	{
@@ -6056,7 +6057,7 @@
 {
 	FILE *fp = NULL;
 
-	for (int apn_index =0; apn_index < data->apn_data_stats_list_len; apn_index++)
+	for (uint32_t apn_index =0; apn_index < data->apn_data_stats_list_len; apn_index++)
 	{
 		if(data->apn_data_stats_list[apn_index].mux_id == ext_prop->ext[0].mux_id)
 		{
@@ -6175,7 +6176,7 @@
 
 	if (strlcat(ipv6_hdr->name, IPA_DUMMY_ETH_HDR_NAME_v6, sizeof(ipv6_hdr->name)) > IPA_RESOURCE_NAME_MAX)
 	{
-		IPACMERR(" header name construction failed exceed length (%d)\n", strlen(ipv6_hdr->name));
+		IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(ipv6_hdr->name));
 		return IPACM_FAILURE;
 	}
 
diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp
index ff8fcee..a594fe5 100644
--- a/ipacm/src/IPACM_Wlan.cpp
+++ b/ipacm/src/IPACM_Wlan.cpp
@@ -147,7 +147,6 @@
 	int ipa_interface_index;
 	int wlan_index;
 	ipacm_ext_prop* ext_prop;
-	ipacm_event_iface_up* data_wan;
 	ipacm_event_iface_up_tehter* data_wan_tether;
 
 	switch (event)
@@ -202,6 +201,20 @@
 
 			IPACMDBG_H("Received IPA_LAN_DELETE_SELF event.\n");
 			IPACMDBG_H("ipa_WLAN (%s):ipa_index (%d) instance close \n", IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].iface_name, ipa_if_num);
+#ifdef FEATURE_ETH_BRIDGE_LE
+			if(rx_prop != NULL)
+			{
+				free(rx_prop);
+			}
+			if(tx_prop != NULL)
+			{
+				free(tx_prop);
+			}
+			if(iface_query != NULL)
+			{
+				free(iface_query);
+			}
+#endif
 			delete this;
 		}
 		break;
@@ -591,7 +604,7 @@
 	case IPA_HANDLE_WAN_UP:
 		IPACMDBG_H("Received IPA_HANDLE_WAN_UP event\n");
 
-		data_wan = (ipacm_event_iface_up*)param;
+		ipacm_event_iface_up* data_wan = (ipacm_event_iface_up*)param;
 		if(data_wan == NULL)
 		{
 			IPACMERR("No event data is found.\n");
@@ -1022,14 +1035,14 @@
 
 				if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_WLAN_PARTIAL_HDR_NAME_v4, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
 				snprintf(index,sizeof(index), "%d", header_name_count);
 				if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
@@ -1136,7 +1149,7 @@
 				pHeaderDescriptor->hdr[0].name[IPA_RESOURCE_NAME_MAX-1] = '\0';
 				if (strlcat(pHeaderDescriptor->hdr[0].name, IPA_WLAN_PARTIAL_HDR_NAME_v6, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
@@ -1144,7 +1157,7 @@
 				snprintf(index,sizeof(index), "%d", header_name_count);
 				if (strlcat(pHeaderDescriptor->hdr[0].name, index, sizeof(pHeaderDescriptor->hdr[0].name)) > IPA_RESOURCE_NAME_MAX)
 				{
-					IPACMERR(" header name construction failed exceed length (%d)\n", strlen(pHeaderDescriptor->hdr[0].name));
+					IPACMERR(" header name construction failed exceed length (%zu)\n", strlen(pHeaderDescriptor->hdr[0].name));
 					res = IPACM_FAILURE;
 					goto fail;
 				}
@@ -1259,7 +1272,7 @@
 	else
 	{
 		if ((data->ipv6_addr[0] != 0) || (data->ipv6_addr[1] != 0) ||
-				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] || 0)) /* check if all 0 not valid ipv6 address */
+				(data->ipv6_addr[2] != 0) || (data->ipv6_addr[3] != 0)) /* check if all 0 not valid ipv6 address */
 		{
 			IPACMDBG_H("ipv6 address: 0x%x:%x:%x:%x\n", data->ipv6_addr[0], data->ipv6_addr[1], data->ipv6_addr[2], data->ipv6_addr[3]);
 			if( (data->ipv6_addr[0] & ipv6_link_local_prefix_mask) != (ipv6_link_local_prefix & ipv6_link_local_prefix_mask) &&
@@ -1299,6 +1312,11 @@
 				return IPACM_FAILURE; /* not setup the RT rules*/
 		    }
 		}
+		else
+		{
+			IPACMDBG_H("IPV6 address is invalid\n");
+			return IPACM_FAILURE;
+		}
 	}
 
 	return IPACM_SUCCESS;
@@ -1691,7 +1709,9 @@
 /*handle wlan iface down event*/
 int IPACM_Wlan::handle_down_evt()
 {
-	int res = IPACM_SUCCESS, i, num_private_subnet_fl_rule;
+	int res = IPACM_SUCCESS, num_private_subnet_fl_rule;
+	uint32_t i;
+	num_private_subnet_fl_rule = 0;
 
 	IPACMDBG_H("WLAN ip-type: %d \n", ip_type);
 	/* no iface address up, directly close iface*/
@@ -1926,7 +1946,9 @@
 		IPACMDBG_H("dev %s add producer dependency\n", dev_name);
 		IPACMDBG_H("depend Got pipe %d rm index : %d \n", rx_prop->rx[0].src_pipe, IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]);
 		IPACM_Iface::ipacmcfg->DelRmDepend(IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]);
+#ifndef FEATURE_ETH_BRIDGE_LE
 		free(rx_prop);
+#endif
 	}
 
 	for (i = 0; i < num_wifi_client; i++)
@@ -1940,6 +1962,7 @@
 	{
 		free(wlan_client);
 	}
+#ifndef FEATURE_ETH_BRIDGE_LE
 	if (tx_prop != NULL)
 	{
 		free(tx_prop);
@@ -1949,6 +1972,7 @@
 	{
 		free(iface_query);
 	}
+#endif
 
 	is_active = false;
 	post_del_self_evt();
@@ -1959,7 +1983,8 @@
 /*handle reset wifi-client rt-rules */
 int IPACM_Wlan::handle_wlan_client_reset_rt(ipa_ip_type iptype)
 {
-	int i, res = IPACM_SUCCESS;
+	uint32_t i;
+	int res = IPACM_SUCCESS;
 
 	/* clean wifi-client routing rules */
 	IPACMDBG_H("left %d wifi clients to reset ip-type(%d) rules \n ", num_wifi_client, iptype);
@@ -2196,7 +2221,7 @@
 
 void IPACM_Wlan::eth_bridge_handle_wlan_mode_switch()
 {
-	int i;
+	uint32_t i;
 
 	/* ====== post events to mimic WLAN interface goes down/up when AP mode is changing ====== */
 
diff --git a/ipanat/src/Android.mk b/ipanat/src/Android.mk
index 6622e5e..157e40c 100644
--- a/ipanat/src/Android.mk
+++ b/ipanat/src/Android.mk
@@ -1,5 +1,6 @@
-BOARD_PLATFORM_LIST := test
-ifeq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true)
+BOARD_PLATFORM_LIST := msm8916
+BOARD_PLATFORM_LIST += msm8909
+ifneq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true)
 ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM)))
 ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH)))
 
@@ -17,7 +18,8 @@
 
 
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
-LOCAL_CFLAGS := -DDEBUG
+LOCAL_CFLAGS := -DDEBUG -Wall -Werror
+LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
 LOCAL_MODULE := libipanat
 LOCAL_MODULE_TAGS := optional
 LOCAL_PRELINK_MODULE := false
diff --git a/ipanat/src/ipa_nat_drvi.c b/ipanat/src/ipa_nat_drvi.c
index d309bb3..9b06028 100644
--- a/ipanat/src/ipa_nat_drvi.c
+++ b/ipanat/src/ipa_nat_drvi.c
@@ -34,6 +34,7 @@
 #include <glib.h>
 #define strlcpy g_strlcpy
 #else
+#ifndef FEATURE_IPA_ANDROID
 static size_t strlcpy(char * dst, const char * src, size_t size) {
 	if (size < 1)
 		return 0;
@@ -42,6 +43,7 @@
 	return strlen(dst);
 }
 #endif
+#endif
 
 struct ipa_nat_cache ipv4_nat_cache;
 pthread_mutex_t nat_mutex    = PTHREAD_MUTEX_INITIALIZER;
@@ -762,9 +764,9 @@
 
 	/* Calclate the memory size for both table and index table entries */
 	mem->size = (IPA_NAT_TABLE_ENTRY_SIZE * total_entries);
-	IPADBG("Nat Table size: %d\n", mem->size);
+	IPADBG("Nat Table size: %zu\n", mem->size);
 	mem->size += (IPA_NAT_INDEX_TABLE_ENTRY_SIZE * total_entries);
-	IPADBG("Nat Base and Index Table size: %d\n", mem->size);
+	IPADBG("Nat Base and Index Table size: %zu\n", mem->size);
 
 	if (!ipv4_nat_cache.ipa_fd) {
 		fd = open(IPA_DEV_NAME, O_RDONLY);
