ipacm: Fix XLAT mux id issue
When XLAT is enabled, mux_id will not be configured. Make
changes to use xlat_mux_id to configure the metadata in PDN
table.
Change-Id: Ic1646bbc4ff66e3f4911098041d2dfaf0670950d
diff --git a/ipacm/src/IPACM_ConntrackListener.cpp b/ipacm/src/IPACM_ConntrackListener.cpp
index 29a70b9..d6289e3 100644
--- a/ipacm/src/IPACM_ConntrackListener.cpp
+++ b/ipacm/src/IPACM_ConntrackListener.cpp
@@ -345,10 +345,13 @@
void IPACM_ConntrackListener::TriggerWANUp(void *in_param)
{
ipacm_event_iface_up *wanup_data = (ipacm_event_iface_up *)in_param;
+ uint8_t mux_id;
IPACMDBG_H("Recevied below information during wanup,\n");
- IPACMDBG_H("if_name:%s, ipv4_address:0x%x\n",
- wanup_data->ifname, wanup_data->ipv4_addr);
+ IPACMDBG_H("if_name:%s, ipv4_address:0x%x mux_id:%d, xlat_mux_id:%d\n",
+ wanup_data->ifname, wanup_data->ipv4_addr,
+ wanup_data->mux_id,
+ wanup_data->xlat_mux_id);
if(wanup_data->ipv4_addr == 0)
{
@@ -373,7 +376,11 @@
if(nat_inst != NULL)
{
- nat_inst->AddTable(wanup_data->ipv4_addr, wanup_data->mux_id);
+ if (wanup_data->mux_id == 0)
+ mux_id = wanup_data->xlat_mux_id;
+ else
+ mux_id = wanup_data->mux_id;
+ nat_inst->AddTable(wanup_data->ipv4_addr, mux_id);
}
IPACMDBG("creating nat threads\n");