diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-05-07 01:11:47 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-05-07 01:35:55 +0200 |
commit | b6fc0956ac532d1b35f6f517c083603b5e150b0d (patch) | |
tree | d12fb58ece454decaee6637a6a1a62166db9510a /include/ras | |
parent | 353f5ffbc63b532aa0c92a7635e84bd53d04644e (diff) | |
download | linux-stable-b6fc0956ac532d1b35f6f517c083603b5e150b0d.tar.gz linux-stable-b6fc0956ac532d1b35f6f517c083603b5e150b0d.tar.bz2 linux-stable-b6fc0956ac532d1b35f6f517c083603b5e150b0d.zip |
gtp: properly parse extension headers
Currently GTP packets are dropped if the next extension field is set to
non-zero value, but this are valid GTP packets.
TS 29.281 provides a longer header format, which is defined as struct
gtp1_header_long. Such long header format is used if any of the S, PN, E
flags is set.
This long header is 4 bytes longer than struct gtp1_header, plus
variable length (optional) extension headers. The next extension header
field is zero is no extension header is provided.
The extension header is composed of a length field which includes total
number of 4 byte words including the extension header itself (1 byte),
payload (variable length) and next type (1 byte). The extension header
size and its payload is aligned to 4 bytes.
A GTP packet might come with a chain extensions headers, which makes it
slightly cumbersome to parse because the extension next header field
comes at the end of the extension header, and there is a need to check
if this field becomes zero to stop the extension header parser.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/ras')
0 files changed, 0 insertions, 0 deletions