gtpv1u: check message type when decoding payload#112
Merged
mosajjal merged 1 commit intogopacket:masterfrom May 11, 2025
Merged
gtpv1u: check message type when decoding payload#112mosajjal merged 1 commit intogopacket:masterfrom
mosajjal merged 1 commit intogopacket:masterfrom
Conversation
GTPv1U has different message types. Data (255) carries nested IPv4, IPv6 or PPP packet. Other messages such as Echo Request / Response don't. Check the message type first and only parse payload as IPv4 / IPv6 / PPP in data PDUs.
Contributor
Author
Contributor
Author
|
@mosajjal , please have a look |
mosajjal
reviewed
Apr 19, 2025
| if len(g.LayerPayload()) == 0 { | ||
| return gopacket.LayerTypeZero | ||
| } | ||
| if g.MessageType != 255 { |
Contributor
There was a problem hiding this comment.
where does this definition come from? I'm looking at 3GPP TS 29.060 section 7.1 and it doesn't align with this condition.
Contributor
Author
There was a problem hiding this comment.
The version you are referring to defines T-PDU (tunneled traffic such as IPv4 or IPv6) and G-PDU in section 3.
In 7.1 it says that G-PDU is message type 255.
mosajjal
approved these changes
May 11, 2025
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.
GTPv1U has different message types. Data (255) carries nested IPv4, IPv6 or PPP packet. Other messages such as Echo Request / Response don't.
Check the message type first and only parse payload as IPv4 / IPv6 / PPP in data PDUs.