Skip to content

RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value#205

Open
sivaraj-comcast wants to merge 7 commits intordkcentral:mainfrom
sivaraj-comcast:RDKB-64562
Open

RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value#205
sivaraj-comcast wants to merge 7 commits intordkcentral:mainfrom
sivaraj-comcast:RDKB-64562

Conversation

@sivaraj-comcast
Copy link
Copy Markdown
Contributor

RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value

Reason for change: Use computed PSID and PSID length values from PD when eaLen is greater than 0 from the received option95 MAP rule data.
Test Procedure: Verify the PSIDLength and PSID parameters of Device.MAP.Domain. DM return proper values as per configured MAPT settings.
Risks: Low
Priority: P2

In WanDmlMapDomGetRule_Data, select the computed PSID and PSID length from pVirtIf->MAP.MaptConfig when the dhcp6c message indicates a PSID is present (psidLen>0) and EA length is zero. Otherwise, fall back to the existing dhcp6cMAPparameters values. This ensures the code uses the computed PSID/length supplied by dhcp6c when appropriate.
Copilot AI review requested due to automatic review settings May 5, 2026 15:37
@sivaraj-comcast sivaraj-comcast requested a review from a team as a code owner May 5, 2026 15:37
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 addresses an issue where the TR-181 BBF DM parameters Device.MAP.Domain.*.Rule.*.PSID and PSIDLength could return 0 by selecting PSID/PSID length from the appropriate source depending on whether DHCPv6 option data includes explicit PSID fields or requires computed values.

Changes:

  • Updates MAP rule population to prefer PSID/PSIDLength from DHCPv6 MAP option fields when present (psidLen > 0 and eaLen == 0).
  • Falls back to PSID/PSIDLength from MaptConfig when DHCPv6 does not provide explicit PSID fields (e.g., when eaLen > 0 and values are computed from PD).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c Outdated
Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings May 6, 2026 13:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c Outdated
Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c Outdated
Stop falling back to MaptConfig PSID when EA bits or other conditions are present; always populate PSIDLength and PSID from dhcp6cMAPparameters. In WanManager_VerifyMAPTConfiguration, propagate the calculated MAP-T psid and psidLen back into dhcp6cMAPTMsgBody so callers (e.g. Device.MAP.Domain rule responses) receive the correct values. Also tidy up error handling/logging indentation and add a comment explaining the value propagation.
Copilot AI review requested due to automatic review settings May 8, 2026 20:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread source/WanManager/wanmgr_net_utils.c Outdated
Comment on lines +936 to +941
/* Since the Device.MAP.Domain DM uses the rule data structure to return values,
* we need to update the structure with the calculated values
* so that it returns the correct values
*/
dhcp6cMAPTMsgBody->psid = MaptConfig->psidValue;
dhcp6cMAPTMsgBody->psidLen = MaptConfig->psidLen;
Introduce a new boolean isPSIDComputed in MaptData_t to mark when PSID/PSIDLength were computed. Update map APIs to prefer MaptConfig.psid/psidLen when this flag is set, and modify WanManager_VerifyMAPTConfiguration to set the flag (FALSE when using dhcp6c-provided values, TRUE when computed) while removing the previous practice of copying computed values back into the dhcp6c message body. Files changed: wanmgr_dml.h, wanmgr_map_apis.c, wanmgr_net_utils.c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants