Skip to content

fix(smf): smf expecting CreatedPDR in n4_session_establishment_response when UPF that does not support TEID Creation

Tariro Mukute requested to merge fix-handle-option-response-createdpdr into develop

The PDU session establishment with a UPF that doesn't support TEID Creation fails. This happens because SMF expects the UPF to returned CreatedPDRs in n4_session_establishment_response. However, CreatedPDRs are conditional [3GPP TS 29.244 V18.5.0 Table 7.5.3.1-1]. If the UPF did not allocate the F-TEID or a UE IP address/prefix, the CreatedPDRs are not returned by UPF. This is the case for eUPF, see logs below.

This PR resolve the issue by checking if the UPF supports TEID Creation. If not, that means the CreatedPDRs could be empty, therefore sets all qfis of the current to be updated in session handler, instead of sending the associated qfis (which will be empty as well in the case). This ensure the presence of qos flow in n1_pdu_session_establishment_accept and n2_pdu_session_resource_* functions.

OAI SMF (develop branch) logs with eUPF

[2024-05-17 12:12:07.887] [smf_app] [debug] DFS Asynch: Handle UPF 192.168.70.134
[2024-05-17 12:12:07.887] [smf_app] [debug] Created PDR ID, rule ID 1
[2024-05-17 12:12:07.887] [smf_app] [info] Generating N3-UL TEID since current UPF does not support TEID Creation
[2024-05-17 12:12:07.887] [smf_app] [warning] The UPF 192.168.70.134 does not support F-TEID creation, but you did not configure the N3 host IP. We will try with the UPF hostname
[2024-05-17 12:12:07.887] [smf_app] [info]     UL F-TEID 0x1 allocated for N3 IPv4 Addr : 192.168.70.134
[2024-05-17 12:12:07.887] [smf_app] [info] Generating N3-UL TEID since current UPF does not support TEID Creation
[2024-05-17 12:12:07.887] [smf_app] [warning] The UPF 192.168.70.134 does not support F-TEID creation, but you did not configure the N3 host IP. We will try with the UPF hostname
[2024-05-17 12:12:07.887] [smf_app] [info]     UL F-TEID 0x2 allocated for N3 IPv4 Addr : 192.168.70.134
[2024-05-17 12:12:07.887] [smf_app] [info] Sending ITTI message 37itti_n4_session_establishment_request to task TASK_SMF_N4
[2024-05-17 12:12:07.887] [smf_api] [debug] Got result for promise ID 42
[2024-05-17 12:12:07.887] [smf_api] [debug] Add location header /nsmf-pdusession/v1/sm-contexts/1
[2024-05-17 12:12:07.888] [smf_n4 ] [info] handle_receive(47 bytes)
[2024-05-17 12:12:07.888] [smf_n4 ] [debug] handle_receive_pfcp_msg msg type 51 length 43
[2024-05-17 12:12:07.888] [smf_app] [debug] Received N4 Session Establishment Response sender teid 0x1  pfcp_tx_id 2B
[2024-05-17 12:12:07.889] [smf_app] [debug] Handle N4 Session Establishment Response (PDU Session Id 1)
[2024-05-17 12:12:07.889] [smf_app] [debug] UPF graph in SMF finished
[2024-05-17 12:12:07.889] [smf_app] [error] Not all QFIs were handled by UPF, rejecting PDU session
[2024-05-17 12:12:07.889] [smf_app] [debug] Prepare a PDU Session Establishment Accept message and send to UE
[2024-05-17 12:12:07.889] [smf_n1 ] [info] Create N1 SM Container, PDU Session Establishment Accept
[2024-05-17 12:12:07.889] [smf_n1 ] [error] Incorrect QFI 0
[2024-05-17 12:12:07.889] [smf_app] [debug] Convert string to Hex
[2024-05-17 12:12:07.889] [smf_app] [debug] Input:

[2024-05-17 12:12:07.889] [smf_app] [debug] Output:
 
[2024-05-17 12:12:07.889] [smf_n2 ] [info] Create N2 SM Information, PDU Session Resource Setup Request Transfer
[2024-05-17 12:12:07.889] [smf_n2 ] [debug] UL F-TEID, TEID 0x0, IP Address 0.0.0.0
[2024-05-17 12:12:07.889] [smf_n2 ] [info] QoS parameters: QFI 0, Priority level 0, ARP priority level 0
[2024-05-17 12:12:07.889] [smf_n2 ] [error] Incorrect QFI 0
[2024-05-17 12:12:07.889] [smf_app] [debug] Convert string to Hex
[2024-05-17 12:12:07.889] [smf_app] [debug] Input:

[2024-05-17 12:12:07.889] [smf_app] [debug] Output:
 
[2024-05-17 12:12:07.889] [smf_app] [debug] N1N2MessageTransfer will be sent to AMF with URL: http://192.168.70.132:8080/namf-comm/v1/ue-contexts/imsi-208950000000031/n1-n2-messages
[2024-05-17 12:12:07.889] [smf_app] [info] Sending ITTI message N11_SESSION_CREATE_SM_CONTEXT_RESPONSE to task TASK_SMF_APP
[2024-05-17 12:12:07.889] [smf_sbi] [debug] Send Communication_N1N2MessageTransfer to AMF (HTTP version 2)
[2024-05-17 12:12:07.889] [smf_app] [debug] Input string (0 bytes):  
[2024-05-17 12:12:07.889] [smf_app] [debug] Data (formatted):

[2024-05-17 12:12:07.889] [smf_app] [debug] Input string (0 bytes):  
[2024-05-17 12:12:07.889] [smf_app] [debug] Data (formatted):

[2024-05-17 12:12:07.889] [smf_sbi] [debug] Send Communication_N1N2MessageTransfer to AMF, body ------Boundary
Content-Type: application/json

Merge request reports