ipacm: Fix to reset free_index when state is updated
When DOWNSTREAM_DEL or LINK_DOWN event is processed, downstream
state needs to be updated. Make sure to reset free_index to
ensure downstream state is updated.
Change-Id: Ife86409b1494c0f7441eb5eff6e9b6e3f9b14d5b
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index f68e113..e2beea6 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -1209,7 +1209,7 @@
dev_name, IF_NAME_LEN);
IPACMDBG_H("Adding new tether iface :%s, State: UP\n", dev_name);
}
- else if (free_index == -1)
+ else if (!state_update && free_index == -1)
{
IPACMERR("Exceeded max tether ifaces: not storing info for %s\n", dev_name);
return;