GTPU extension headers seem to not get encoded properly
My goal is to send GTPU packets with extension headers (3GPP TS 29.060 § 6.1).
I'm using type record PDU_GTPU from GTPU_Types.ttcn with:
-
e_bitset to1 -
opt_part(type record GTPU_Header_optional_part) set as follows:
+ var GTPU_ExtensionHeader ext_hdr := {
+ lengthfield := 1,
+ content := '01'O,
+ nextExtHeader := '00'O
+ }
var GTPU_Header_optional_part ret := {
sequenceNumber := int2oct(valueof(seq), 2),
npduNumber := '00'O,
- nextExtHeader := '00'O,
- gTPU_extensionHeader_List := omit
+ nextExtHeader := 'C0'O, /* 1100 0000: PDCP PDU number */
+ gTPU_extensionHeader_List := {ext_hdr}
};
To quickly test this, I'm using the existing test case TC_pdp4_clients_interact_without_txseq in the Osmocom GGSN testsuite, with this patch:
https://gitea.osmocom.org/osmith/osmo-ttcn3-hacks/commit/b20159fc37846cf01ec328ff5eb97b85be83182d
The test works without modifications. When I modify it with the diff shown / linked above, I see a malformed GTP packet in wireshark:
-
e_bitis set properly -
nextExtHeaderis always1c(instead of expectedc0in the example above; even if I setnextExtHeader := '01'O, it is still1cin the pcap) -
lengthfield(Extension header length in the pcap) is140instead of expected1
Wireshark screenshot: https://nextcloud.sysmocom.de/s/yKCb7gHsc9DgR3d
So it looks like the extension header does not get encoded properly.
EDIT: tested with Eclipse Titan version: 8.2.0