Skip to content

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

Merged
guto86 merged 8 commits into
rdkcentral:mainfrom
sivaraj-comcast:RDKB-64759
Jun 18, 2026
Merged

RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value#208
guto86 merged 8 commits into
rdkcentral:mainfrom
sivaraj-comcast:RDKB-64759

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

Copilot AI review requested due to automatic review settings May 11, 2026 14:16
@sivaraj-comcast sivaraj-comcast requested a review from a team as a code owner May 11, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes TR-181 BBF DM reporting of MAP-T PSID and PSIDLength by preferring computed values (derived from PD / Option 95 MAP rule data) when applicable, instead of returning zero/incorrect values.

Changes:

  • Adds a boolean flag intended to indicate whether PSID/PSIDLength were computed vs taken directly from DHCPv6 options.
  • Updates MAP-T verification to set the “computed” flag depending on whether the PSID was calculated.
  • Updates TR-181 MAP rule getter to return computed PSID/PSIDLength when the flag indicates computed values should be used.

Reviewed changes

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

File Description
source/WanManager/wanmgr_net_utils.c Sets a “computed PSID” flag during MAP-T verification/calculation flow.
source/TR-181/middle_layer_src/wanmgr_map_apis.c TR-181 getter attempts to override PSID/PSIDLength using computed MAP-T values.
source/TR-181/include/wanmgr_dml.h Adds isPSIDComputed flag, but currently on the wrong struct for the updated call sites.

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

Comment thread source/WanManager/wanmgr_net_utils.c
Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c
Comment thread source/TR-181/include/wanmgr_dml.h
sivaraj-comcast and others added 8 commits June 18, 2026 15:13
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
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.
Relocate the BOOL isPSIDComputed field from MaptData_t into WANMGR_MAPT_CONFIG_DATA. This places the PSID computation flag alongside MAP-T configuration fields (ipAddressString, ipLANAddressString, psidLen) to better encapsulate PSID state with the config data.
Copilot AI review requested due to automatic review settings June 18, 2026 14:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread source/TR-181/middle_layer_src/wanmgr_map_apis.c
Comment thread source/WanManager/wanmgr_net_utils.c
@guto86 guto86 merged commit b5702fd into rdkcentral:main Jun 18, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants