Merge tag 'LA.UM.9.12.r1-13400.02-SMxx50.QSSI12.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/data-ipa-cfg-mgr into HEAD
"LA.UM.9.12.r1-13400.02-SMxx50.QSSI12.0"
* tag 'LA.UM.9.12.r1-13400.02-SMxx50.QSSI12.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/data-ipa-cfg-mgr:
ipacm: Declare ipa_flt_rule_add var as static to fix stack size issue
ipacm: Remove compilation dependency for in_addr_t on bionic
ipacm: Start ipacm after post-fs-data
ipacm: Add checks to prevent installing duplicate MHI exception rules
data-ipa-cfg-mgr: Disable ipacm for msmnile_au
ipacm: Enable ipacm for monaco LOW Level RAM target
ipacm: Adding changes to use right check while checking version support
Change-Id: I84aa5e53248f90677555acfbd16290f2055a529d
diff --git a/ipacm/inc/IPACM_ConntrackClient.h b/ipacm/inc/IPACM_ConntrackClient.h
index 16d5b9c..4ceff43 100644
--- a/ipacm/inc/IPACM_ConntrackClient.h
+++ b/ipacm/inc/IPACM_ConntrackClient.h
@@ -33,6 +33,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <errno.h>
diff --git a/ipacm/inc/IPACM_ConntrackListener.h b/ipacm/inc/IPACM_ConntrackListener.h
index 2977af7..110fdcc 100644
--- a/ipacm/inc/IPACM_ConntrackListener.h
+++ b/ipacm/inc/IPACM_ConntrackListener.h
@@ -35,6 +35,9 @@
#include <string.h>
#include <fcntl.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <errno.h>
diff --git a/ipacm/inc/IPACM_Netlink.h b/ipacm/inc/IPACM_Netlink.h
index 81f1968..ae3ab3f 100644
--- a/ipacm/inc/IPACM_Netlink.h
+++ b/ipacm/inc/IPACM_Netlink.h
@@ -52,7 +52,6 @@
#include <sys/select.h>
#include <sys/socket.h>
#include <linux/socket.h>
-#include <inaddr.h>
#define sockaddr_storage __kernel_sockaddr_storage
#include <linux/if.h>
#include <linux/if_addr.h>
diff --git a/ipacm/inc/IPACM_Xml.h b/ipacm/inc/IPACM_Xml.h
index 64c00ed..5954e1b 100644
--- a/ipacm/inc/IPACM_Xml.h
+++ b/ipacm/inc/IPACM_Xml.h
@@ -45,6 +45,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <stdint.h>
#include <libxml/parser.h>
diff --git a/ipacm/src/IPACM_ConntrackClient.cpp b/ipacm/src/IPACM_ConntrackClient.cpp
index 29afd50..a953626 100644
--- a/ipacm/src/IPACM_ConntrackClient.cpp
+++ b/ipacm/src/IPACM_ConntrackClient.cpp
@@ -31,6 +31,9 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index 36e68b7..a0f8777 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -3335,7 +3335,7 @@
/* install UL filter rule from Q6 */
int IPACM_Lan::handle_uplink_filter_rule(ipacm_ext_prop *prop, ipa_ip_type iptype, uint8_t xlat_mux_id)
{
- ipa_flt_rule_add flt_rule_entry;
+ static ipa_flt_rule_add flt_rule_entry;
int len = 0, cnt, ret = IPACM_SUCCESS;
ipa_ioc_add_flt_rule *pFilteringTable;
ipa_fltr_installed_notif_req_msg_v01 flt_index;
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index f17eb03..a36fa4a 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -134,6 +134,10 @@
is_ipv6_frag_firewall_flt_rule_installed = false;
ipv6_frag_firewall_flt_rule_hdl = 0;
+ icmpv6_exception_hdl = 0;
+ tcp_fin_hdl = 0;
+ tcp_rst_hdl = 0;
+
mtu_v4 = DEFAULT_MTU_SIZE;
mtu_v4_set = false;
mtu_v6 = DEFAULT_MTU_SIZE;
@@ -7580,6 +7584,13 @@
uint8_t mux_id;
ipa_ioc_add_flt_rule *pFilteringTable = NULL;
+ /* Return if rules are there */
+ if (mhi_dl_v4_frag_hdl)
+ {
+ IPACMERR("frag rule have not been deleted. Don't install again\n");
+ return IPACM_FAILURE;
+ }
+
mux_id = ext_prop->ext[0].mux_id;
/* contruct filter rules to pcie modem */
struct ipa_flt_rule_add flt_rule_entry;
@@ -7721,6 +7732,13 @@
uint8_t mux_id;
ipa_ioc_add_flt_rule *pFilteringTable = NULL;
+ /* Return if rules are there */
+ if (icmpv6_exception_hdl)
+ {
+ IPACMERR("icmpv6 rule have not been deleted. Don't install again\n");
+ return IPACM_FAILURE;
+ }
+
mux_id = ext_prop->ext[0].mux_id;
/* contruct filter rules to pcie modem */
struct ipa_flt_rule_add flt_rule_entry;
@@ -7858,6 +7876,13 @@
uint8_t mux_id;
ipa_ioc_add_flt_rule *pFilteringTable = NULL;
+ /* Return if rules are there */
+ if (tcp_fin_hdl || tcp_rst_hdl)
+ {
+ IPACMERR("tcp RST/FIN rules have not been deleted. Don't install again\n");
+ return IPACM_FAILURE;
+ }
+
mux_id = ext_prop->ext[0].mux_id;
/* contruct filter rules to pcie modem */
struct ipa_flt_rule_add flt_rule_entry;
diff --git a/ipacm/src/IPACM_Xml.cpp b/ipacm/src/IPACM_Xml.cpp
index d59bbb0..9c4af41 100644
--- a/ipacm/src/IPACM_Xml.cpp
+++ b/ipacm/src/IPACM_Xml.cpp
@@ -39,6 +39,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include "IPACM_Xml.h"
diff --git a/ipacm_vendor_product.mk b/ipacm_vendor_product.mk
index f225a30..969d537 100644
--- a/ipacm_vendor_product.mk
+++ b/ipacm_vendor_product.mk
@@ -1,9 +1,11 @@
TARGET_DISABLE_IPACM := false
+ifneq ($(TARGET_BOARD_SUFFIX),_au)
#IPACM_DATA
IPACM_DATA += IPACM_cfg.xml
IPACM_DATA += ipacm
IPACM_DATA += ipacm.rc
+endif
ifeq ($(TARGET_USES_QMAA),true)
ifneq ($(TARGET_USES_QMAA_OVERRIDE_DATA),true)
@@ -12,6 +14,7 @@
endif #TARGET_USES_QMAA
BOARD_IPA_LOW_RAM_EXCP_LIST := bengal
+BOARD_IPA_LOW_RAM_EXCP_LIST += monaco
ifeq ($(TARGET_HAS_LOW_RAM),true)
ifneq ($(call is-board-platform-in-list,$(BOARD_IPA_LOW_RAM_EXCP_LIST)),true)
@@ -25,6 +28,9 @@
BOARD_PLATFORM_LIST += msm8917
BOARD_PLATFORM_LIST += qm215
BOARD_PLATFORM_LIST += msm8937
+ifeq ($(TARGET_BOARD_SUFFIX),_au)
+BOARD_PLATFORM_LIST += msmnile
+endif
BOARD_IPAv3_LIST := msm8998
BOARD_IPAv3_LIST += sdm845
BOARD_IPAv3_LIST += sdm710