Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/TR-181/include/wanmgr_dml.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ typedef struct
BOOL mapeAssigned; /**< Have we been assigned mape config ? */
BOOL maptAssigned; /**< Have we been assigned mapt config ? */
BOOL isFMR;
BOOL isPSIDComputed;
}MaptData_t;

typedef struct _WANMGR_MAPT_CONFIG_DATA_
Expand Down
7 changes: 7 additions & 0 deletions source/TR-181/middle_layer_src/wanmgr_map_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,13 @@ WanDmlMapDomGetRule_Data
pMapRule->PSIDOffset = pVirtIf->MAP.dhcp6cMAPparameters.psidOffset;
pMapRule->PSIDLength = pVirtIf->MAP.dhcp6cMAPparameters.psidLen;
pMapRule->PSID = pVirtIf->MAP.dhcp6cMAPparameters.psid;
#ifdef FEATURE_MAPT
if (pVirtIf->MAP.MaptConfig.isPSIDComputed)
{
pMapRule->PSIDLength = pVirtIf->MAP.MaptConfig.psidLen;
pMapRule->PSID = pVirtIf->MAP.MaptConfig.psid;
}
#endif
pMapRule->Ratio = pVirtIf->MAP.dhcp6cMAPparameters.ratio;
pMapRule->IncludeSystemPorts = FALSE;
}
Expand Down
24 changes: 13 additions & 11 deletions source/WanManager/wanmgr_net_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,27 +913,29 @@ ANSC_STATUS WanManager_VerifyMAPTConfiguration(ipc_map_data_t *dhcp6cMAPTMsgBody
MaptInfo("Using psidLen value from dhcp6c options : %d", MaptConfig->psidLen);
MaptInfo("Using psidOffset value from dhcp6c options : %d", dhcp6cMAPTMsgBody->psidOffset);
#endif
MaptConfig->isPSIDComputed = FALSE;
}
else
{
ret = WanManager_CalculatePsidAndV4Index(dhcp6cMAPTMsgBody->pdIPv6Prefix, dhcp6cMAPTMsgBody->v6Len, dhcp6cMAPTMsgBody->iapdPrefixLen,
dhcp6cMAPTMsgBody->v4Len, &(MaptConfig->psidValue), &ipv4IndexValue, &(MaptConfig->psidLen));
}

if (ret != RETURN_OK)
{
CcspTraceError(("Error in calculating MAPT PSID value \n"));
if (ret != RETURN_OK)
{
CcspTraceError(("Error in calculating MAPT PSID value \n"));
#ifdef FEATURE_MAPT_DEBUG
MaptInfo("Exiting MAPT configuration, MAPT will not be configured, error found in getting PSID value");
MaptInfo("Exiting MAPT configuration, MAPT will not be configured, error found in getting PSID value");
#endif
CcspTraceNotice(("FEATURE_MAPT: MAP-T configuration failed\n"));
return ANSC_STATUS_FAILURE;
}
CcspTraceNotice(("FEATURE_MAPT: MAP-T configuration failed\n"));
return ANSC_STATUS_FAILURE;
}
#ifdef FEATURE_MAPT_DEBUG
MaptInfo("--- MAP-T Computed Values - START ---");
MaptInfo("mapt: PSID Value: %d, ipv4IndexValue: %d", MaptConfig->psidValue, ipv4IndexValue);
MaptInfo("mapt: PSID Length: %d", MaptConfig->psidLen);
MaptInfo("--- MAP-T Computed Values - START ---");
MaptInfo("mapt: PSID Value: %d, ipv4IndexValue: %d", MaptConfig->psidValue, ipv4IndexValue);
MaptInfo("mapt: PSID Length: %d", MaptConfig->psidLen);
#endif
MaptConfig->isPSIDComputed = TRUE;
}

inet_pton(AF_INET, dhcp6cMAPTMsgBody->ruleIPv4Prefix, &(result));

Expand Down
Loading