Repository navigation
gtp: build the address of a GSN or Charging Gateway Address IE without a length - #5290
Merged
Merged
Conversation
…t a length IE_GSNAddress and IE_CharginGatewayAddress only built an address when `length` was set to 4 or 16, so IE_GSNAddress(ipv4_address=...) built Length 0 and no address. Both now use one `address` MultipleTypeField, as IE_IP_Address does in gtp_v2, with ipv4_address and ipv6_address kept as deprecated names. AI-Assisted: yes (Claude Opus 5.5)
AI-Assisted: yes (Claude Opus 5.5)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5290 +/- ##
==========================================
+ Coverage 80.07% 80.16% +0.08%
==========================================
Files 375 375
Lines 98740 98752 +12
==========================================
+ Hits 79065 79161 +96
+ Misses 19675 19591 -84
🚀 New features to boost your workflow:
|
gpotter2
approved these changes
Nov 12, 2026
Member
|
Thanks for the PR |
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.
Description
IE_GSNAddressandIE_CharginGatewayAddresscondition their address fields onlength == 4andlength == 16(gtp.py#L658-L665, gtp.py#L891-L899). With the defaultlength=None,IE_GSNAddress(ipv4_address="10.0.0.1")builds Length 0 and no address, and so do the GSN Address IEs in the defaultGTPUpdatePDPContextRequestandGTPPDUNotificationRequest.IE_CharginGatewayAddressdefaults tolength=4, so anipv6_addressis replaced by 127.0.0.1. 3GPP TS 29.060 sections 7.7.32 and 7.7.44 give Length 4 for IPv4 and 16 for IPv6.This PR applies the
IE_IP_Addressdesign from #5278 to both IEs: oneaddressMultipleTypeField, withipv4_addressandipv6_addresskept as deprecated names.Before:
After:
tshark 4.6.9 decodes these addresses after the change and reports "unknown type or wrong length" for the GSN Address IEs before it. As with #5278, a Length other than 4 or 16 now reads that many octets into
address, so the next IE stays aligned. Tests are added totest/contrib/gtp.uts.This message was written with the help of AI (Claude Opus 5.5).