-
Notifications
You must be signed in to change notification settings - Fork 44
RDKBNETWOR-84: DSLite feature integration with WanManager (Wg network11 development) #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…11 development) * RDKBNETWOR-86 : Move Device.DSLite. datamodel implementation to WAN Manager * DSLite Data Model Migration to WAN Manager Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
…11 development) * RDKBNETWOR-85 : DHCP Manager changes for option 64 * parse and import endpoint name data coming from dhcp-manager Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
…11 development) * RDKBNETWOR-88 : WAN Manager state machine for DSLite * Interface state machine is extended to cover DS-Lite mode as well Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
…11 development) * RDKBNETWOR-87: DSLite tunnel interface management * Moved service_dslite from Utopia to WanManager. Signed-off-by: Govindaraja N B <gnb.ext@libertyglobal.com>
…11 development) * RDKBNETWOR-89 : WAN Manager DSLite failure/failover handling Summary Added DNS TTL tracking with periodic re-resolution and retry logic to handle endpoint changes and failures gracefully. Key Changes - Track DNS TTL and resolution timestamp for endpoint FQDNs - Periodically check TTL expiration in DSLITE_ACTIVE state - Re-resolve endpoint when TTL expires; only restart tunnel if address changed - Tear down tunnel if DNS re-resolution fails (prevents stale endpoint usage) - Automatic retry every 5 seconds after tunnel setup failures (TODO is adding a DM parameter for it) - Optimize DNS queries with address caching to avoid redundant resolutions Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
…11 development) * RDKBNETWOR-89 : WAN Manager DSLite failure/failover handling Add Dual-Stack device-mode awareness to the DS-Lite feature. By design, DS-Lite is enabled only when the CPE operates in IPv6-only mode. For platforms that intentionally want DS-Lite in Dual-Stack mode, enable the distro feature: dslite_v2_dualstack_support Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
…11 development) * Enhance error handling and update the state-machine flow to align with the latest design agreed with the Tiger Team.
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR integrates stateful DS-Lite V2 into WAN Manager, moving significant logic from Utopia and ccsp-p-and-m while maintaining backward compatibility. The implementation includes DNS TTL tracking with smart re-resolution, failure handling with automatic retry logic, and optional dual-stack provisioning support.
Key Changes:
- Migrated Device.DSLite TR-181 data model handling and service_dslite.c logic to WAN Manager
- Added DS-Lite states to WAN interface state machine with DNS TTL-based endpoint management
- Integrated DHCPv6 Option 64 handling for dynamic endpoint provisioning
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wanmgr_interface_sm.c | Extended state machine with DS-Lite states, setup/teardown logic, and retry mechanism |
| wanmgr_dslite.c | Core DS-Lite implementation including DNS resolution with TTL tracking and tunnel management |
| wanmgr_dslite.h | DS-Lite public API definitions for tunnel and configuration management |
| wanmgr_data.c | DS-Lite data structures and access functions for configuration management |
| wanmgr_dml_dslite_apis.c | TR-181 data model implementation for Device.DSLite object |
| wanmgr_dhcp_event_handler.c | DHCPv6 Option 64 endpoint name integration |
| wanmgr_telemetry.h/.c | DS-Lite telemetry event definitions and handlers |
| configure.ac | Build configuration for DS-Lite V2 feature flag |
Comments suppressed due to low confidence (1)
source/WanManager/wanmgr_dslite.c:1
- The function WanMgr_SysCfgSetStr should validate that the value parameter is not NULL before calling strlen() or other string operations on it. Without this check, there's potential for undefined behavior if value is NULL.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I have read the CLA Document and I hereby sign the CLA |
sichevoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll continue later this week.
sichevoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've finished this part.
source/WanManager/wanmgr_sysevents.c
Outdated
|
|
||
| if (pid > 0) | ||
| { | ||
| sprintf(cmdline_buf, "/proc/%d/cmdline", pid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please comment why is this needed? I have trouble understanding the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably copied from utopia. @govindaraja-nb need your input pls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this logic was copied from Utopia (service_dslite).
So instead of keeping this logic, I updated it to simply restart Zebra. Also moved all service restarts into helper WanMgr_Dslite_RestartServices().
- change dhcpv6 & dml related AFTR FQDN naming to aftr instead of endpointName keep internal naming as "endpointName" since internals also will have endpointAddr and these parameters are already under DSLite context therefore both function and struct namings suggest endPointName is a DSLite related field. - change TunnelV4Addr to X_RDKCENTRAL-COM_TunnelV4Addr as it's not a standard TR-181 DM - convert ANSC to generic - link libevent to wanmgr only if DSLITE_SUPPORT flag exists - add telemetry event for the case WAN_ERROR_DSLITE_STATUS_FAILED
- add helper to restart required services during DSLite up/down - remove wanmgr_restart_zebra() and move zebra restart into the helper function. Signed-off-by: Govindaraja N B <gnb.ext@libertyglobal.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Implement stateful DS-Lite V2 in Wan Manager
Summary
This PR integrates the new generation of DS-Lite into wan-manager and
dhcp-manager. Unlike the previous stateless implementation, this version
is stateful and fully integrated into the Wan Manager state machine.
This implementation moves significant logic (including service_dslite.c
and data model handling) out of Utopia and ccsp-p-and-m into
wan-manager, while maintaining backward compatibility for non-volatile
storage keys.
Technical Implementation
Architecture Migration:
ccsp-p-and-m to wan-manager.
storage from Utopia to wan-manager.
non-volatile storage to ensure seamless upgrades.
Data Model & Mapping:
list.
InterfaceSetting entries to their corresponding Virtual Interfaces
using the Alias field.
DHCP Integration:
wan-manager, where it is stored in the mapped DSLite entry.
State Machine:
DS-Lite transition states.
New Features
Added logic to handle endpoint changes and failures gracefully:
FQDNs.
state. Re-resolves endpoint when TTL expires, but only restarts the
tunnel if the resolved address has changed.
prevent stale endpoint usage.
setup failures (Note: Future improvement planned to make this
configurable via DM parameter).
Introduced specific support for dual-stack provisioning scenarios where
standard IPv6-only DS-Lite is not sufficient.
dslite_v2_dualstack_support).
failure), the device will gracefully fallback to the IPv4 address on
the WAN interface.
Build Configuration
This feature is gated by the following preprocessor macros:
dslite_v2_dualstack_support)