fix (nas): call set_qfi before PDU session interface setup on Session Accept

Apply QoS flow id as soon as the accept message is parsed, before interface
setup and before any code path that starts the per-session interface thread,
so the first SDUs are not sent with the default 0-initialized QFI 0.

Changes:
- In handle_pdu_session_accept, move set_qfi(...) to immediately before
  interface setup.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
This commit is contained in:
Guido Casati
2026-05-04 09:39:44 +02:00
parent 43ec237a4f
commit f1b8d45bf9

View File

@@ -1675,6 +1675,9 @@ static void handle_pdu_session_accept(const nr_ue_nas_t *nas, uint8_t *pdu_buffe
return;
}
// Set QFI before starting UE interface thread to avoid early SDUs using 0-initialized QFI.
set_qfi(msg.qos_rules.rule->qfi, sm_header.pdu_session_id, instance);
// process PDU Session: pass ID -1 to not append PDU ID to interface
bool is_default = idx == 0;
if (msg.pdu_type == PDU_SESSION_TYPE_ETHER) {
@@ -1684,8 +1687,6 @@ static void handle_pdu_session_accept(const nr_ue_nas_t *nas, uint8_t *pdu_buffe
} else {
LOG_W(NAS, "Unhandled PDU session type %d, ignoring PDU session ID %d\n", msg.pdu_type, sm_header.pdu_session_id);
}
set_qfi(msg.qos_rules.rule->qfi, sm_header.pdu_session_id, instance);
}
/**