Add optional/conditional IEs introduced in Rel-16/17/18 releases - #209
Merged
Conversation
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Pull request overview
This PR expands the NAS library’s support for optional/conditional Information Elements (IEs) introduced across Rel-16/17/18 by adding new nasType IE definitions and wiring them into the relevant nasMessage encode/decode paths. It also bumps the project version for a minor release.
Changes:
- Bump version from
2.1.1-devto2.2.0. - Add multiple new
nasTypeIE structs (both TV and TLV/LV forms). - Extend encoding/decoding in multiple NAS message types to include the newly supported optional/conditional IEs.
Reviewed changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| VERSION | Minor release version bump to 2.2.0. |
| nasType/NAS_UpdatedPEIPSAssistanceInformation.go | New TLV IE type for Updated PEIPS assistance information. |
| nasType/NAS_TNANInformation.go | New TLV IE type for TNAN information. |
| nasType/NAS_T3448Value.go | New timer-value IE type (octet-based). |
| nasType/NAS_SNSSAITimeValidityInformation.go | New TLV IE type for S-NSSAI time validity info. |
| nasType/NAS_SNSSAILocationValidityInformation.go | New TLV IE type for S-NSSAI location validity info. |
| nasType/NAS_ServingPLMNRateControl.go | New TLV IE type for Serving PLMN rate control. |
| nasType/NAS_ReleaseAssistanceIndication.go | New type-1 (half-octet) IE for Release Assistance Indication. |
| nasType/NAS_ReceivedMBSContainer.go | New L16V IE type for Received MBS Container. |
| nasType/NAS_ReAttemptIndicator.go | New TLV IE type for Re-Attempt Indicator. |
| nasType/NAS_RANTimingSynchronization.go | New TLV IE type for RAN timing synchronization. |
| nasType/NAS_PriorityIndicator.go | New type-1 (half-octet) IE for Priority Indicator. |
| nasType/NAS_PendingNSSAI.go | New TLV IE type for Pending NSSAI. |
| nasType/NAS_PayloadContainerInformation.go | New type-1 (half-octet) IE for Payload Container Information. |
| nasType/NAS_PartiallyRejectedNSSAI.go | New TLV IE type for Partially Rejected NSSAI. |
| nasType/NAS_PartiallyAllowedNSSAI.go | New TLV IE type for Partially Allowed NSSAI. |
| nasType/NAS_Non3GPPAccessPathSwitchingIndication.go | New TLV IE type for Non-3GPP access path switching indication. |
| nasType/NAS_N3QAI.go | New L16V IE type for N3QAI. |
| nasType/NAS_N3IWFIdentifier.go | New TLV IE type for N3IWF Identifier. |
| nasType/NAS_MasterSessionKey.go | New L16V IE type for Master Session Key. |
| nasType/NAS_MAPDUSessionInformation.go | New type-1 (half-octet) IE for MA PDU Session Information. |
| nasType/NAS_LowerBoundTimerValue.go | New timer-value IE type (octet-based). |
| nasType/NAS_IPHeaderCompressionConfiguration.go | New TLV IE type for IP header compression configuration. |
| nasType/NAS_FiveGSMNetworkFeatureSupport.go | New TLV IE type for 5GSM network feature support. |
| nasType/NAS_Fivegsmcongestionreattemptindicator.go | New TLV IE type for 5GSM congestion reattempt indicator. |
| nasType/NAS_FeatureAuthorizationIndication.go | New TLV IE type for Feature Authorization Indication. |
| nasType/NAS_EthernetHeaderCompressionConfiguration.go | New TLV IE type for Ethernet header compression configuration. |
| nasType/NAS_EquivalentSNPNs.go | New TLV IE type for Equivalent SNPNs. |
| nasType/NAS_DiscontinuousCoverageMaxTimeOffset.go | New TLV IE type for Discontinuous coverage max time offset. |
| nasType/NAS_ControlPlaneOnlyIndication.go | New type-1 (half-octet) IE for Control Plane Only Indication. |
| nasType/NAS_CIoTSmallDataContainer.go | New TLV IE type for CIoT small data container. |
| nasType/NAS_ATSSSContainer.go | New L16V IE type for ATSSS Container. |
| nasType/NAS_AlternativeNSSAI.go | New TLV IE type for Alternative NSSAI. |
| nasType/NAS_AdditionalConfigurationIndication.go | New type-1 (half-octet) IE for Additional Configuration Indication. |
| nasMessage/NAS_ULNASTransport.go | Add support for additional optional IEs in UL NAS Transport encode/decode. |
| nasMessage/NAS_ServiceReject.go | Add support for additional optional IEs in Service Reject encode/decode. |
| nasMessage/NAS_ServiceAccept.go | Add support for additional optional IEs in Service Accept encode/decode. |
| nasMessage/NAS_SecurityModeComplete.go | Add support for Non-IMEISV PEI IE in Security Mode Complete encode/decode. |
| nasMessage/NAS_SecurityModeCommand.go | Add support for MasterSessionKey IE in Security Mode Command encode/decode. |
| nasMessage/NAS_RegistrationRequest.go | Add support for Requested T3512 value IE in Registration Request encode/decode. |
| nasMessage/NAS_RegistrationReject.go | Add support for additional optional IEs in Registration Reject encode/decode. |
| nasMessage/NAS_RegistrationAccept.go | Add support for many additional optional/conditional IEs in Registration Accept encode/decode. |
| nasMessage/NAS_PDUSessionReleaseCommand.go | Add support for additional optional IEs in PDU Session Release Command encode/decode. |
| nasMessage/NAS_PDUSessionModificationReject.go | Add support for additional optional IEs in PDU Session Modification Reject encode/decode. |
| nasMessage/NAS_PDUSessionModificationCommand.go | Add support for multiple new optional IEs in PDU Session Modification Command encode/decode. |
| nasMessage/NAS_PDUSessionEstablishmentReject.go | Add support for additional optional IEs in PDU Session Establishment Reject encode/decode. |
| nasMessage/NAS_PDUSessionEstablishmentAccept.go | Add support for multiple new optional IEs in PDU Session Establishment Accept encode/decode. |
| nasMessage/NAS_DLNASTransport.go | Add support for LowerBoundTimerValue IE in DL NAS Transport encode/decode. |
| nasMessage/NAS_DeregistrationRequestUETerminatedDeregistration.go | Add support for additional optional IEs in UE-terminated deregistration request encode/decode. |
| nasMessage/NAS_DeregistrationRequestUEOriginatingDeregistration.go | Add support for unavailability period and NAS message container IEs in UE-originating deregistration request encode/decode. |
| nasMessage/NAS_ControlPlaneServiceRequest.go | Add support for several new optional IEs in Control Plane Service Request encode/decode. |
| nasMessage/NAS_ConfigurationUpdateCommand.go | Add support for additional optional IEs in Configuration Update Command encode/decode. |
| nasMessage/NAS_AuthenticationResult.go | Add support for MasterSessionKey IE in Authentication Result encode/decode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 58 out of 58 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
nasMessage/NAS_ServiceAccept.go:78
- ServiceAccept now includes additional optional IEs (T3448Value, FiveGSAdditionalRequestResult, ForbiddenTAI*), but NAS_ServiceAccept_test.go still only exercises the original IEs. A round-trip encode/decode test that sets these new fields would improve coverage and catch wire-format issues early.
if a.T3448Value != nil {
binary.Write(buffer, binary.BigEndian, a.T3448Value.GetIei())
binary.Write(buffer, binary.BigEndian, a.T3448Value.GetLen())
binary.Write(buffer, binary.BigEndian, &a.T3448Value.Octet)
}
if a.FiveGSAdditionalRequestResult != nil {
binary.Write(buffer, binary.BigEndian, a.FiveGSAdditionalRequestResult.GetIei())
binary.Write(buffer, binary.BigEndian, uint8(a.FiveGSAdditionalRequestResult.GetLen()))
binary.Write(buffer, binary.BigEndian, a.FiveGSAdditionalRequestResult.Buffer[:uint8(a.FiveGSAdditionalRequestResult.GetLen())])
}
nasType/NAS_Fivegsmcongestionreattemptindicator.go:12
- The exported type name
Fivegsmcongestionreattemptindicatoris not in Go UpperCamelCase and is inconsistent with nearby NAS type naming (e.g.,FiveGSMNetworkFeatureSupport). This makes the public API harder to read/search and tends to propagate the inconsistent spelling into message structs.
nasMessage/NAS_ServiceReject.go:73 - New optional/conditional IEs are now encoded/decoded in ServiceReject (e.g., T3448Value, CAGInformationList, DisasterReturnWaitRange, LowerBoundTimerValue, ForbiddenTAI*), but the existing ServiceReject encode/decode test only covers the original set of IEs. Adding a dedicated test case that populates these new fields would help prevent regressions in IEI/length handling.
if a.T3448Value != nil {
binary.Write(buffer, binary.BigEndian, a.T3448Value.GetIei())
binary.Write(buffer, binary.BigEndian, a.T3448Value.GetLen())
binary.Write(buffer, binary.BigEndian, &a.T3448Value.Octet)
}
cmaciocco
approved these changes
Jul 29, 2026
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.
Also create a minor release