From 16ea97293790dac00feef1b3aa7f2df0b77e589f Mon Sep 17 00:00:00 2001 From: herlesupreeth Date: Fri, 12 Aug 2022 13:48:54 +0200 Subject: [PATCH] [SMF]: Update stored PCO IE requested in GTPv2 over S5c in SMF context As per 3GPP TS 29.274 version 10.5.0, section 7.2.9 and 7.2.10, Only if PCO IE is included in Delete Session Request then it must be present in Delete Session Response. In order to reflect on whether the request contained PCO IE or not the SMF context containing the GTP request needs to be updated i.e. update if present else clear the contents --- src/smf/s5c-handler.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/smf/s5c-handler.c b/src/smf/s5c-handler.c index e72f4fa75..d9f8ddec2 100644 --- a/src/smf/s5c-handler.c +++ b/src/smf/s5c-handler.c @@ -410,6 +410,23 @@ uint8_t smf_s5c_handle_delete_session_request( } } + /* PCO + * 3GPP TS 29.274 version 10.5.0, Table 7.2.9.1-1 + * If the UE includes the PCO IE, then the MME/SGSN shall copy + * the content of this IE transparently from the PCO IE included by the UE. + * If SGW receives the PCO IE, SGW shall forward it to PGW. + */ + if (req->protocol_configuration_options.presence) { + OGS_TLV_STORE_DATA(&sess->gtp.ue_pco, + &req->protocol_configuration_options); + } else { + /* + * Clear contents to reflect whether PCO IE was included or not as part + * of session deletion procedure + */ + OGS_TLV_CLEAR_DATA(&sess->gtp.ue_pco); + } + ogs_debug(" SGW_S5C_TEID[0x%x] SMF_N4_TEID[0x%x]", sess->sgw_s5c_teid, sess->smf_n4_teid);