Skip to content

gtpv1u: check message type when decoding payload#112

Merged
mosajjal merged 1 commit intogopacket:masterfrom
mejedi:gtpv1u-next-layer-type
May 11, 2025
Merged

gtpv1u: check message type when decoding payload#112
mosajjal merged 1 commit intogopacket:masterfrom
mejedi:gtpv1u-next-layer-type

Conversation

@mejedi
Copy link
Copy Markdown
Contributor

@mejedi mejedi commented Feb 13, 2025

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.

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.
@mejedi
Copy link
Copy Markdown
Contributor Author

mejedi commented Mar 3, 2025

@mosajjal

@mejedi
Copy link
Copy Markdown
Contributor Author

mejedi commented Apr 16, 2025

@mosajjal , please have a look

if len(g.LayerPayload()) == 0 {
return gopacket.LayerTypeZero
}
if g.MessageType != 255 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

@mejedi mejedi Apr 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mosajjal merged commit eec1516 into gopacket:master May 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants