RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value#205
Open
sivaraj-comcast wants to merge 7 commits intordkcentral:mainfrom
Open
RDKB-64759: PSID and PSIDLength BBF DM parameters returning zero value#205sivaraj-comcast wants to merge 7 commits intordkcentral:mainfrom
sivaraj-comcast wants to merge 7 commits intordkcentral:mainfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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
MaptConfigwhen 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.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.
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.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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