RDKB-66929 : [Rogers][8.6p4s4] Device inaccessible and loses internet | When GW switch back to router from bridge mode. - #231
Closed
LakshminarayananShenbagaraj wants to merge 3 commits into
Conversation
… | When GW switch back to router from bridge mode. Reason for change: When the CPE is in bridge mode router advertisement has been received for solicit via rdisc6 due to the reason IPv6 default gateway has not been filled up for connectivity checki. For Recovery, we have to restart connectivity check either IPv4 or IPv6 default gateway not valid case. Test Procedure: 1. Connectivity check should start with valid parameters. Risks: High Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
LakshminarayananShenbagaraj
marked this pull request as draft
September 16, 2026 12:35
Copilot started reviewing on behalf of
LakshminarayananShenbagaraj
September 16, 2026 12:35
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Connectivity-check restart handling, parameter validation, and asynchronous startup result handling remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates WAN/TAD connectivity-check recovery for DHCP lease changes and bridge-to-router transitions.
Changes:
- Tracks IPv4/IPv6 lease updates for connectivity-check restarts.
- Updates TAD running-state handling.
- Adds DNS and gateway validation before startup.
File summaries
| File | Summary |
|---|---|
source/WanManager/wanmgr_interface_sm.c |
Handles connectivity-check startup, running state, and retry behavior. |
source/WanManager/wanmgr_dhcp_event_handler.c |
Flags restarts after DHCP lease updates. |
source/TR-181/middle_layer_src/wanmgr_rbus_handler_apis.c |
Validates DNS and gateway parameters before starting TAD. |
Review details
Suppressed comments (3)
source/WanManager/wanmgr_dhcp_event_handler.c:190
- Setting this flag does not itself restart TAD when the interface is already leased/active. In that case the state machine consumes Ipv4Changed in its lease-update branches (for example wanmgr_interface_sm.c:4065-4085) but never calls WanMgr_StartConnectivityCheck, so the old WCC continues with stale parameters and RestartConnectivityCheck remains set. The restart must be consumed after the lease reconfiguration (and the equivalent IPv6 path must be handled too).
CcspTraceInfo(("%s %d - IPv4 - RestartConnectivityCheck triggered. \n", __FUNCTION__, __LINE__));
pVirtIf->IP.RestartConnectivityCheck = TRUE;
source/WanManager/wanmgr_dhcp_event_handler.c:244
- The IPv6 lease event has the same gap: when the interface is already in an active leased state, setting RestartConnectivityCheck is not followed by a WanMgr_StartConnectivityCheck call. The state machine handles Ipv6Changed and then continues, leaving the previous TAD instance running with stale DNS/gateway data. Consume the restart after IPv6 reconfiguration, including the dual-stack path.
CcspTraceInfo(("%s %d - IPv6 - RestartConnectivityCheck triggered. \n", __FUNCTION__, __LINE__));
pVirtIf->IP.RestartConnectivityCheck = TRUE;
source/WanManager/wanmgr_interface_sm.c:1898
- This return value only means that WanMgr_Configure_WCC_Thread was created; the actual rbusMethod_Invoke and result subscription run asynchronously and can fail in that worker (wanmgr_rbus_handler_apis.c:2097-2119). The new branch can therefore mark ConnectivityCheckRunning true and log success even when TandD never started, suppressing later recovery. Update the running state from the worker's actual result or expose that result instead of treating pthread_create success as configuration success.
if ( WanMgr_Configure_TAD_WCC( pVirtIf, (pVirtIf->IP.ConnectivityCheckRunning && pVirtIf->IP.RestartConnectivityCheck) ? WCC_RESTART : WCC_START) == ANSC_STATUS_SUCCESS )
{
CcspTraceInfo(("%s %d - Successfully configured TAD WCC for interface %s \n", __FUNCTION__, __LINE__, pVirtIf->Name));
pVirtIf->IP.ConnectivityCheckRunning = TRUE;
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1895
to
+1899
| if ( WanMgr_Configure_TAD_WCC( pVirtIf, (pVirtIf->IP.ConnectivityCheckRunning && pVirtIf->IP.RestartConnectivityCheck) ? WCC_RESTART : WCC_START) == ANSC_STATUS_SUCCESS ) | ||
| { | ||
| CcspTraceInfo(("%s %d - Successfully configured TAD WCC for interface %s \n", __FUNCTION__, __LINE__, pVirtIf->Name)); | ||
| pVirtIf->IP.ConnectivityCheckRunning = TRUE; | ||
| } |
… | When GW switch back to router from bridge mode. Reason for change: When the CPE is in bridge mode router advertisement has been received for solicit via rdisc6 due to the reason IPv6 default gateway has not been filled up for connectivity checki. For Recovery, we have to restart connectivity check either IPv4 or IPv6 default gateway not valid case. Test Procedure: Connectivity check should start with valid parameters. Risks: High Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
… | When GW switch back to router from bridge mode. Reason for change: When the CPE is in bridge mode router advertisement has been received for solicit via rdisc6 due to the reason IPv6 default gateway has not been filled up for connectivity checki. For Recovery, we have to restart connectivity check either IPv4 or IPv6 default gateway not valid case. Test Procedure: 1. Connectivity check should start with valid parameters. Risks: High Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change:
When the CPE is in bridge mode router advertisement has been received for solicit via rdisc6 due to the reason IPv6 default gateway has not been filled up for connectivity checki. For Recovery, we have to restart connectivity check either IPv4 or IPv6 default gateway not valid case.
Test Procedure:
Risks: High