RDKBNETWOR-84: DSLite feature integration with WanManager (Wg network…#50
RDKBNETWOR-84: DSLite feature integration with WanManager (Wg network…#50devinmungan wants to merge 1 commit intordkcentral:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR integrates the DSLite feature with WanManager by renaming the AFTR (Access Gateway for DS-Lite) field to the more generic endpointName throughout the DHCPv6 handling code, and adds support for passing the received endpoint name to WanManager via RBUS publish.
- Refactored AFTR field to
endpointNameacross DHCPv6 structures and processing functions - Added a
trim()utility function to clean whitespace from endpoint names - Updated DHCPv6 lease comparison logic to include endpoint name validation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| source/TR-181/middle_layer_src/dhcpmgr_rbus_apis.c | Added endpointName field copying to DHCP_MGR_IPV6_MSG structure for RBUS event publishing |
| source/DHCPMgrUtils/dhcpmgr_v6_lease_handler.c | Updated lease comparison function to compare endpointName instead of aftr field |
| source/DHCPClientUtils/DHCPv6Client/dhcpv6_interface.h | Renamed AFTR_NAME_LENGTH to ENDPOINT_NAME_LENGTH and aftr field to endpointName in DHCPv6_PLUGIN_MSG structure |
| source/DHCPClientUtils/DHCPv6Client/dhcpmgr_dibbler_plugin/dhcpmgr_dibbler_plugin.c | Added trim function for string cleanup, updated DHCPv6 option 64 handling to use endpointName with trimming, and updated log messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
source/DHCPClientUtils/DHCPv6Client/dhcpmgr_dibbler_plugin/dhcpmgr_dibbler_plugin.c
Outdated
Show resolved
Hide resolved
source/DHCPClientUtils/DHCPv6Client/dhcpmgr_dibbler_plugin/dhcpmgr_dibbler_plugin.c
Outdated
Show resolved
Hide resolved
82e98f7 to
25d421a
Compare
…11 development) * RDKBNETWOR-85 : DHCP Manager changes for option 64 * pass received endpoint name to wanmanager via rbus publish Signed-off-by: Devin Mungan <devin.mungan@infosys.com>
25d421a to
eb21b74
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 4 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
source/TR-181/middle_layer_src/dhcpmgr_rbus_apis.c:338
getDataHandlerreadspDhcpc->currentLease(and later dereferences it) without takingpDhcpc->mutex.currentLeaseis freed/replaced in the lease-processing path under that mutex, so this can race and potentially dereference freed memory. Acquire the client mutex around thecurrentLeasecheck and the lease copy intoleaseInfo.
if (!pDhcpc || !pDhcpc->currentLease)
{
// Boot case: no lease yet, return invalid/empty
DHCPMGR_LOG_INFO("%s %d - No current lease for index %d\n", __FUNCTION__, __LINE__, iDmIndex);
return RBUS_ERROR_SUCCESS;
}
source/TR-181/middle_layer_src/dhcpmgr_rbus_apis.c:270
DhcpMgr_MaptParseOpt95Responseis called here, but the MAP parsing API was renamed toDhcpMgr_MapParseOptResponseindhcpmgr_map_apis.h/.c. This looks like a build break (undefined reference / implicit declaration). Update this call (and any others) to the new function name/signature.
unsigned char maptContainer[BUFLEN_256] = {0}; /* MAP-T option 95 in hex format*/
memset(maptContainer, 0, sizeof(maptContainer));
memcpy(maptContainer, src->mapt.Container, sizeof(src->mapt.Container));
if (DhcpMgr_MaptParseOpt95Response(dest->sitePrefix, maptContainer, &dest->map) == ANSC_STATUS_SUCCESS)
{
dest->maptAssigned = TRUE;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…11 development)
RDKBNETWOR-85 : DHCP Manager changes for option 64
pass received endpoint name to wanmanager via rbus publish