fix(ngap): add nil guards for remaining 3 NGAP handlers#661
Merged
gab-arrobo merged 1 commit intoApr 17, 2026
Merged
Conversation
Contributor
|
@donivtech thanks for your contribution. Please rebase your PR |
There was a problem hiding this comment.
Pull request overview
Adds defensive nil checks in selected NGAP handlers to prevent nil-pointer panics when gNBs omit mandatory IEs, specifically for handlers that don’t get dispatcher-level UE context protection via FetchRanUeContext.
Changes:
- Add post-loop nil guards in
HandleLocationReportingFailureIndicationforcauseandrANUENGAPID. - Add post-loop nil guard in
HandleRRCInactiveTransitionReportforrANUENGAPID. - Add post-loop nil guards in
HandleUplinkUEAssociatedNRPPATransportforrANUENGAPIDandroutingID.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add post-loop nil checks for mandatory IEs in handlers that lacked dispatcher-level protection via FetchRanUeContext: - HandleLocationReportingFailureIndication: guard cause, rANUENGAPID - HandleRRCInactiveTransitionReport: guard rANUENGAPID - HandleUplinkUEAssociatedNRPPATransport: guard rANUENGAPID, routingID Prevents nil pointer panics when a gNB omits mandatory IEs. Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
bece052 to
49ae67a
Compare
Contributor
Author
|
Thanks for the review @gab-arrobo and Copilot. Pushed an updated version that addresses all feedback:
|
gab-arrobo
approved these changes
Apr 17, 2026
3 tasks
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.
Summary
Add post-loop nil checks for mandatory IEs in 3 NGAP handlers that lack
dispatcher-level protection via
FetchRanUeContext:cause,rANUENGAPIDrANUENGAPIDrANUENGAPID,routingIDPrevents nil pointer panics when a gNB omits mandatory IEs from these messages.
Test plan
go build ./...— cleango vet ./ngap/...— cleango test ./ngap/...— passesSigned-off-by: Vinod Patmanathan vinod.patmanathan@forsway.com