Skip to content

PDU Session Type is Incorrectly Used

While testing Free5GC v4.0.0 with OAI 2025.w08, the PDU session was not being established. The UE was reporting:

2025:03:11T16:20:22.457 [NAS]   Unknown PDU Session Address type 0

I first verified with wireshark that Free5GC was sending the PDU session type as listed in 3GPP specification 24.501. Pasted_image_20250312120947

Upon inspection of how the openairinterface5g code was handling this, it appeared that the optional PDU address IE which also contains a PDU session type was being used rather than the required PDU session type. It made more sense to me to use the required element rather than an optional one. Changing the code to use the required element was a good first step but something was still wrong as Free5GC had also sent the optional IE.

After inspecting where the optional IE is read, I found a while loop that moves the pointer ahead as it reads the QoS Rules. The addition to the pointer was skipping past the start of the AMBR and into the optional IE. Fixing this allowed the optional PDU address IE to also be read correctly.

Now the PDU session can be established with Free5GC v4.0.0.