From db922e9a0cc8b43734bfed4b4e5f5b7a907c9606 Mon Sep 17 00:00:00 2001 From: Parthiban Selvaraj Date: Tue, 26 Nov 2024 16:28:49 +0000 Subject: [PATCH 1/7] RDKB-57540 : UDHCPC process is not started by SelfHeal if failed to start. Reason for change: Current Selfheal thread only handles if the dhcpv4/6 clients are killed runtime. Adding code to handle the case if clients are failed to start. Test Procedure: Udhcpc should be started by selfheal monitor thread if it failed to start. Risks: none Priority: P1 Signed-off-by: Parthiban Selvaraj --- source/TR-181/include/wanmgr_dml.h | 4 ++-- source/WanManager/wanmgr_interface_sm.c | 12 +++++++----- source/WanManager/wanmgr_net_utils.c | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/source/TR-181/include/wanmgr_dml.h b/source/TR-181/include/wanmgr_dml.h index 1b86e29..725be55 100644 --- a/source/TR-181/include/wanmgr_dml.h +++ b/source/TR-181/include/wanmgr_dml.h @@ -370,8 +370,8 @@ typedef struct _DML_WANIFACE_IP WANMGR_IPV6_DATA Ipv6Data; ipc_dhcpv4_data_t* pIpcIpv4Data; ipc_dhcpv6_data_t* pIpcIpv6Data; - UINT Dhcp4cPid; - UINT Dhcp6cPid; + INT Dhcp4cPid; + INT Dhcp6cPid; } DML_WANIFACE_IP; #ifdef FEATURE_MAPT diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index c1d8c36..35e7bcc 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -435,9 +435,10 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) if ((p_VirtIf->IP.Mode == DML_WAN_IP_MODE_IPV4_ONLY || p_VirtIf->IP.Mode == DML_WAN_IP_MODE_DUAL_STACK) && // IP.Mode supports V4 p_VirtIf->IP.IPv4Source == DML_WAN_IP_SOURCE_DHCP && (p_VirtIf->PPP.Enable == FALSE) && // uses DHCP client p_VirtIf->MAP.MaptStatus == WAN_IFACE_MAPT_STATE_DOWN && // MAPT status is DOWN - p_VirtIf->IP.SelectedModeTimerStatus != RUNNING && - p_VirtIf->IP.Dhcp4cPid > 0 && // dhcp started by ISM - (WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp4cPid) != TRUE)) // but DHCP client not running + p_VirtIf->IP.SelectedModeTimerStatus != RUNNING && // Prefered mode timer Running. Wait for it to expire. + (p_VirtIf->IP.Dhcp4cPid == -1 || // DHCP cleint failed to start OR + (p_VirtIf->IP.Dhcp4cPid > 0 && // dhcp started by ISM + WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp4cPid) != TRUE))) // but DHCP client not running { p_VirtIf->IP.Dhcp4cPid = WanManager_StartDhcpv4Client(p_VirtIf, pInterface->Name, pInterface->IfaceType); CcspTraceInfo(("%s %d - SELFHEAL - Started dhcpc on interface %s, dhcpv4_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp4cPid)); @@ -449,8 +450,9 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) //Check if IPv6 dhcp client is still running - handling runtime crash of dhcp client if ((p_VirtIf->IP.Mode == DML_WAN_IP_MODE_IPV6_ONLY || p_VirtIf->IP.Mode == DML_WAN_IP_MODE_DUAL_STACK) && // IP.Mode supports V6 p_VirtIf->IP.IPv6Source == DML_WAN_IP_SOURCE_DHCP && // uses DHCP client - p_VirtIf->IP.Dhcp6cPid > 0 && // dhcp started by ISM - (WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp6cPid) != TRUE)) // but DHCP client not running + (p_VirtIf->IP.Dhcp6cPid -1 || // DHCP cleint failed to start + (p_VirtIf->IP.Dhcp6cPid > 0 && // dhcp started by ISM + WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp6cPid) != TRUE))) // but DHCP client not running { p_VirtIf->IP.Dhcp6cPid = WanManager_StartDhcpv6Client(p_VirtIf, pInterface->IfaceType); CcspTraceInfo(("%s %d - SELFHEAL - Started dhcp6c on interface %s, dhcpv6_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp6cPid)); diff --git a/source/WanManager/wanmgr_net_utils.c b/source/WanManager/wanmgr_net_utils.c index a2f8714..abddbd7 100644 --- a/source/WanManager/wanmgr_net_utils.c +++ b/source/WanManager/wanmgr_net_utils.c @@ -564,7 +564,7 @@ uint32_t WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE Ifa usleep(500000); //sleep for 500 milli seconds #endif pid = start_dhcpv6_client(¶ms); - pVirtIf->IP.Dhcp6cPid = pid; + pVirtIf->IP.Dhcp6cPid = pid ? pid : -1; //if PID is zero return pid; } @@ -630,7 +630,7 @@ uint32_t WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInte CcspTraceInfo(("Starting DHCPv4 Client for iface: %s \n", params.ifname)); pid = start_dhcpv4_client(¶ms); - pVirtIf->IP.Dhcp4cPid = pid; + pVirtIf->IP.Dhcp4cPid = pid ? pid : -1; return pid; } From 82d583219528c1846e594094c5060b5e68990a16 Mon Sep 17 00:00:00 2001 From: S-Parthiban-Selvaraj Date: Wed, 27 Nov 2024 15:40:58 +0000 Subject: [PATCH 2/7] SHARMAN-1818 : Adding a ipv6 toggle to solve link local DAD failure Signed-off-by: S-Parthiban-Selvaraj --- source/WanManager/wanmgr_interface_sm.c | 10 +++++++++- source/WanManager/wanmgr_policy_auto_impl.c | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index 35e7bcc..dfe60be 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -450,10 +450,18 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) //Check if IPv6 dhcp client is still running - handling runtime crash of dhcp client if ((p_VirtIf->IP.Mode == DML_WAN_IP_MODE_IPV6_ONLY || p_VirtIf->IP.Mode == DML_WAN_IP_MODE_DUAL_STACK) && // IP.Mode supports V6 p_VirtIf->IP.IPv6Source == DML_WAN_IP_SOURCE_DHCP && // uses DHCP client - (p_VirtIf->IP.Dhcp6cPid -1 || // DHCP cleint failed to start + (p_VirtIf->IP.Dhcp6cPid == -1 || // DHCP cleint failed to start (p_VirtIf->IP.Dhcp6cPid > 0 && // dhcp started by ISM WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp6cPid) != TRUE))) // but DHCP client not running { + if (p_VirtIf->IP.Dhcp6cPid == -1 ) + { + /* DHCPv6c client can fail to start due to DAD failuer on the link local address. + * This could happen if multiple WAN interfaces are up with same MAC address. Toggling will restart the DAD again. + */ + CcspTraceInfo(("%s %d - DHCPv6c cleint failed to start. Toggeling Ipv6 before retry... \n", __FUNCTION__, __LINE__, p_VirtIf->Name)); + Force_IPv6_toggle(p_VirtIf->Name); + } p_VirtIf->IP.Dhcp6cPid = WanManager_StartDhcpv6Client(p_VirtIf, pInterface->IfaceType); CcspTraceInfo(("%s %d - SELFHEAL - Started dhcp6c on interface %s, dhcpv6_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp6cPid)); #ifdef ENABLE_FEATURE_TELEMETRY2_0 diff --git a/source/WanManager/wanmgr_policy_auto_impl.c b/source/WanManager/wanmgr_policy_auto_impl.c index db1fb38..7e21081 100644 --- a/source/WanManager/wanmgr_policy_auto_impl.c +++ b/source/WanManager/wanmgr_policy_auto_impl.c @@ -1176,8 +1176,8 @@ static WcAwPolicyState_t State_ScanningInterface (WanMgr_Policy_Controller_t * p } - //If PHY is down ,rollback to waiting state after all VISM are terminated. - if(pActiveInterface->BaseInterfaceStatus != WAN_IFACE_PHY_STATUS_UP && WanMgr_Get_ISM_RunningStatus(pWanController->activeInterfaceIdx) == FALSE) + //Rollback to waiting state after all VISM are terminated. This could happen if PHY status changes when Interface is in scanning state. + if(WanMgr_Get_ISM_RunningStatus(pWanController->activeInterfaceIdx) == FALSE) { CcspTraceInfo(("%s %d: selected interface index:%d is BaseInetrfaceStatus DOWN. \n", __FUNCTION__, __LINE__, pWanController->activeInterfaceIdx )); return Transition_ScanningInterfaceDown(pWanController); From 18b05d3b51676c0289517ab3d20f6e58d8820bd6 Mon Sep 17 00:00:00 2001 From: Parthiban Selvaraj Date: Wed, 27 Nov 2024 17:13:29 +0000 Subject: [PATCH 3/7] Fixing return types Signed-off-by: Parthiban Selvaraj --- source/TR-181/include/wanmgr_dml.h | 4 ++-- source/WanManager/wanmgr_interface_sm.c | 2 +- source/WanManager/wanmgr_net_utils.c | 23 +++++++++++++++++------ source/WanManager/wanmgr_net_utils.h | 6 +++--- source/WanManager/wanmgr_utils.c | 2 +- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/source/TR-181/include/wanmgr_dml.h b/source/TR-181/include/wanmgr_dml.h index 725be55..686725c 100644 --- a/source/TR-181/include/wanmgr_dml.h +++ b/source/TR-181/include/wanmgr_dml.h @@ -370,8 +370,8 @@ typedef struct _DML_WANIFACE_IP WANMGR_IPV6_DATA Ipv6Data; ipc_dhcpv4_data_t* pIpcIpv4Data; ipc_dhcpv6_data_t* pIpcIpv6Data; - INT Dhcp4cPid; - INT Dhcp6cPid; + int Dhcp4cPid; + int Dhcp6cPid; } DML_WANIFACE_IP; #ifdef FEATURE_MAPT diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index dfe60be..5e293fd 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -427,7 +427,7 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) { CcspTraceInfo(("%s %d: IP Mode change processed. Resetting flag. \n", __FUNCTION__, __LINE__)); p_VirtIf->IP.RefreshDHCP = FALSE; - } + } return; } diff --git a/source/WanManager/wanmgr_net_utils.c b/source/WanManager/wanmgr_net_utils.c index abddbd7..6aa3cc3 100644 --- a/source/WanManager/wanmgr_net_utils.c +++ b/source/WanManager/wanmgr_net_utils.c @@ -542,7 +542,7 @@ int WanManager_Ipv6AddrUtil(char *ifname, Ipv6OperType opr, int preflft, int val return 0; } -uint32_t WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE IfaceType) +int WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE IfaceType) { if (pVirtIf == NULL) { @@ -550,7 +550,7 @@ uint32_t WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE Ifa return 0; } - uint32_t pid = 0; + int pid = 0; dhcp_params params; memset (¶ms, 0, sizeof(dhcp_params)); params.ifname = pVirtIf->Name; @@ -564,7 +564,12 @@ uint32_t WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE Ifa usleep(500000); //sleep for 500 milli seconds #endif pid = start_dhcpv6_client(¶ms); - pVirtIf->IP.Dhcp6cPid = pid ? pid : -1; //if PID is zero + if (pid == 0) + { + CcspTraceError(("%s %d: dhcpv6 client failed to start. Returing pid -1.\n", __FUNCTION__, __LINE__)); + pid = -1; + } + pVirtIf->IP.Dhcp6cPid = pid; return pid; } @@ -608,7 +613,7 @@ ANSC_STATUS WanManager_StopDhcpv6Client(char * iface_name, DHCP_RELEASE_BEHAVIOU } -uint32_t WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInterface, IFACE_TYPE IfaceType) +int WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInterface, IFACE_TYPE IfaceType) { if (pVirtIf == NULL) { @@ -621,7 +626,7 @@ uint32_t WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInte return 0;//TODO:Read and return PID #endif dhcp_params params; - uint32_t pid = 0; + int pid = 0; memset (¶ms, 0, sizeof(dhcp_params)); params.ifname = pVirtIf->Name; @@ -630,7 +635,13 @@ uint32_t WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInte CcspTraceInfo(("Starting DHCPv4 Client for iface: %s \n", params.ifname)); pid = start_dhcpv4_client(¶ms); - pVirtIf->IP.Dhcp4cPid = pid ? pid : -1; + + if (pid == 0) + { + CcspTraceError(("%s %d: dhcpv4 client failed to start. Returing pid -1.\n", __FUNCTION__, __LINE__)); + pid = -1; + } + pVirtIf->IP.Dhcp4cPid = pid; return pid; } diff --git a/source/WanManager/wanmgr_net_utils.h b/source/WanManager/wanmgr_net_utils.h index 9d5ee78..60978ba 100644 --- a/source/WanManager/wanmgr_net_utils.h +++ b/source/WanManager/wanmgr_net_utils.h @@ -92,7 +92,7 @@ typedef enum { * @param isPPP indicates PPP enabled or nor * @return ANSC_STATUS_SUCCESS upon success else returned error code. ***************************************************************************/ -uint32_t WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE IfaceType); +int WanManager_StartDhcpv6Client(DML_VIRTUAL_IFACE* pVirtIf, IFACE_TYPE IfaceType); /*************************************************************************** * @brief API used to stop Dhcpv6 client application. @@ -106,7 +106,7 @@ ANSC_STATUS WanManager_StopDhcpv6Client(char * iface_name, DHCP_RELEASE_BEHAVIOU * @param intf Interface name on which the dhcpv4 needs to start * @return ANSC_STATUS_SUCCESS upon success else returned error code. ***************************************************************************/ -uint32_t WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInterface ,IFACE_TYPE IfaceType); +int WanManager_StartDhcpv4Client(DML_VIRTUAL_IFACE* pVirtIf, char* baseInterface ,IFACE_TYPE IfaceType); /*************************************************************************** * @brief API used to stop Dhcpv4 client application. @@ -153,7 +153,7 @@ int WanManager_Ipv6AddrUtil(char *ifname,Ipv6OperType opr,int preflft,int vallft * @param pid PID of the process to be checked * @return TRUE upon success else FALSE returned ***************************************************************************/ -BOOL WanMgr_IsPIDRunning(UINT pid); +BOOL WanMgr_IsPIDRunning(int pid); #if defined(FEATURE_464XLAT) int xlat_configure(char *interface, char *xlat_address); diff --git a/source/WanManager/wanmgr_utils.c b/source/WanManager/wanmgr_utils.c index e6dd4d3..9359244 100644 --- a/source/WanManager/wanmgr_utils.c +++ b/source/WanManager/wanmgr_utils.c @@ -704,7 +704,7 @@ void WanManager_DoSystemAction(const char *from, char *cmd) * @param pid PID of the process to be checked * @return TRUE upon success else FALSE returned ***************************************************************************/ -BOOL WanMgr_IsPIDRunning(UINT pid) +BOOL WanMgr_IsPIDRunning(int pid) { /* If sig is 0 (the null signal), error checking is performed but no signal is actually sent. The null signal can be used to check the validity of pid. */ From e49d2484d79f3e14992d9fb3911bbca5dc7d77f4 Mon Sep 17 00:00:00 2001 From: S-Parthiban-Selvaraj Date: Thu, 28 Nov 2024 12:56:14 +0000 Subject: [PATCH 4/7] Adding condition to avoid telemetry trigger Signed-off-by: S-Parthiban-Selvaraj --- source/WanManager/wanmgr_interface_sm.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index 5e293fd..f89d8ca 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -440,11 +440,14 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) (p_VirtIf->IP.Dhcp4cPid > 0 && // dhcp started by ISM WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp4cPid) != TRUE))) // but DHCP client not running { - p_VirtIf->IP.Dhcp4cPid = WanManager_StartDhcpv4Client(p_VirtIf, pInterface->Name, pInterface->IfaceType); - CcspTraceInfo(("%s %d - SELFHEAL - Started dhcpc on interface %s, dhcpv4_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp4cPid)); + if (p_VirtIf->IP.Dhcp6cPid != -1 ) + { #ifdef ENABLE_FEATURE_TELEMETRY2_0 - t2_event_d("SYS_ERROR_DHCPV4Client_notrunning", 1); + t2_event_d("SYS_ERROR_DHCPV4Client_notrunning", 1); #endif + } + p_VirtIf->IP.Dhcp4cPid = WanManager_StartDhcpv4Client(p_VirtIf, pInterface->Name, pInterface->IfaceType); + CcspTraceInfo(("%s %d - SELFHEAL - Started dhcpc on interface %s, dhcpv4_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp4cPid)); } //Check if IPv6 dhcp client is still running - handling runtime crash of dhcp client @@ -459,14 +462,17 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) /* DHCPv6c client can fail to start due to DAD failuer on the link local address. * This could happen if multiple WAN interfaces are up with same MAC address. Toggling will restart the DAD again. */ - CcspTraceInfo(("%s %d - DHCPv6c cleint failed to start. Toggeling Ipv6 before retry... \n", __FUNCTION__, __LINE__, p_VirtIf->Name)); + CcspTraceInfo(("%s %d - DHCPv6c client failed to start. Toggeling Ipv6 before retry... \n", __FUNCTION__, __LINE__, p_VirtIf->Name)); Force_IPv6_toggle(p_VirtIf->Name); } - p_VirtIf->IP.Dhcp6cPid = WanManager_StartDhcpv6Client(p_VirtIf, pInterface->IfaceType); - CcspTraceInfo(("%s %d - SELFHEAL - Started dhcp6c on interface %s, dhcpv6_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp6cPid)); + else + { #ifdef ENABLE_FEATURE_TELEMETRY2_0 - t2_event_d("SYS_ERROR_DHCPV6Client_notrunning", 1); + t2_event_d("SYS_ERROR_DHCPV6Client_notrunning", 1); #endif + } + p_VirtIf->IP.Dhcp6cPid = WanManager_StartDhcpv6Client(p_VirtIf, pInterface->IfaceType); + CcspTraceInfo(("%s %d - SELFHEAL - Started dhcp6c on interface %s, dhcpv6_pid %d \n", __FUNCTION__, __LINE__, p_VirtIf->Name, p_VirtIf->IP.Dhcp6cPid)); } /* Handling Runtime IP.ConnectivityCheckType change */ From de93db9ef112034cefddfdf8e85fe46db240f75b Mon Sep 17 00:00:00 2001 From: S-Parthiban-Selvaraj Date: Thu, 28 Nov 2024 15:11:25 +0000 Subject: [PATCH 5/7] Fix for handling ipv6 deconfig and configure Signed-off-by: S-Parthiban-Selvaraj --- source/WanManager/wanmgr_interface_sm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index f89d8ca..1aed603 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -2949,6 +2949,7 @@ static eWanState_t wan_transition_standby_deconfig_ips(WanMgr_IfaceSM_Controller { CcspTraceError(("%s %d - Failed to tear down IPv6 for %s Interface \n", __FUNCTION__, __LINE__, p_VirtIf->Name)); } + p_VirtIf->IP.Ipv6Changed = TRUE; //We have deconfigured Ipv6 from the device. set this flag to configure again when moves back to active. } WanMgr_Configure_accept_ra(p_VirtIf, FALSE); From abc4aa167e3ce8dfbeb84b6e97ffcc9ee0ea2ae4 Mon Sep 17 00:00:00 2001 From: Parthiban Selvaraj Date: Tue, 3 Dec 2024 13:11:40 +0000 Subject: [PATCH 6/7] Removing SHARMAN-1818 fix. Will be added in a separete PR Signed-off-by: Parthiban Selvaraj --- source/WanManager/wanmgr_interface_sm.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index 1aed603..8b2d44c 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -457,15 +457,7 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) (p_VirtIf->IP.Dhcp6cPid > 0 && // dhcp started by ISM WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp6cPid) != TRUE))) // but DHCP client not running { - if (p_VirtIf->IP.Dhcp6cPid == -1 ) - { - /* DHCPv6c client can fail to start due to DAD failuer on the link local address. - * This could happen if multiple WAN interfaces are up with same MAC address. Toggling will restart the DAD again. - */ - CcspTraceInfo(("%s %d - DHCPv6c client failed to start. Toggeling Ipv6 before retry... \n", __FUNCTION__, __LINE__, p_VirtIf->Name)); - Force_IPv6_toggle(p_VirtIf->Name); - } - else + if (p_VirtIf->IP.Dhcp6cPid != -1 ) { #ifdef ENABLE_FEATURE_TELEMETRY2_0 t2_event_d("SYS_ERROR_DHCPV6Client_notrunning", 1); From 154bec3c8ad5c717362f0b7b0ba775d09a99247d Mon Sep 17 00:00:00 2001 From: S-Parthiban-Selvaraj Date: Tue, 3 Dec 2024 13:18:29 +0000 Subject: [PATCH 7/7] Fixing DHCPv4 pid parameter Signed-off-by: S-Parthiban-Selvaraj --- source/WanManager/wanmgr_interface_sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WanManager/wanmgr_interface_sm.c b/source/WanManager/wanmgr_interface_sm.c index 8b2d44c..d4d3675 100644 --- a/source/WanManager/wanmgr_interface_sm.c +++ b/source/WanManager/wanmgr_interface_sm.c @@ -440,7 +440,7 @@ static void WanMgr_MonitorDhcpApps (WanMgr_IfaceSM_Controller_t* pWanIfaceCtrl) (p_VirtIf->IP.Dhcp4cPid > 0 && // dhcp started by ISM WanMgr_IsPIDRunning(p_VirtIf->IP.Dhcp4cPid) != TRUE))) // but DHCP client not running { - if (p_VirtIf->IP.Dhcp6cPid != -1 ) + if (p_VirtIf->IP.Dhcp4cPid != -1 ) { #ifdef ENABLE_FEATURE_TELEMETRY2_0 t2_event_d("SYS_ERROR_DHCPV4Client_notrunning", 1);