Commit Graph

11 Commits

Author SHA1 Message Date
Sukchan Lee 3064861fe0 [PFCP/GTP] Incorrect TEI/SEID=0 (#3043)
If eg. PCRF or AAA diameter link is not yet ready (eg. PCRF crashed),
and a client sends a CreateSessionRequest announcing its ow F-TEID,
then open5gs-smfd answers with Create Session Response Cause="Remote peer not responding",
but it is not setting the received F-TEID in the header of the response,
instead it sends with TEID=0.

As a result, the peer cannot match the CreateSessionResponse,
and needs to rely on its own timeout timer to figure out
that specific request failed.

See 3GPP TS 29.274 5.5 Usage of the GTPv2-C Header:

```
Bit 4 represents a "T" flag, which indicates if TEID field is present in the GTP-C header or not. If the "T" flag is
set to 0, then the TEID field shall not be present in the GTP-C header. If the "T" flag is set to 1, then the TEID
field shall immediately follow the Length field, in octets 5 to 8. Apart from the Echo Request, Echo Response
and Version Not Supported Indication messages, in all EPC specific messages the value of the "T" flag shall be
set to "1".
```

This happens with Delete Session Requests and can happen with any PFCP message.

I've fixed TEID/SEID to send the value in the reponse message as is if it was received.
2024-04-05 21:40:45 +09:00
Bostjan Meglic ab11220dcc [ALL] Fix differences in function parameter names between definition and declaration 2022-07-01 21:38:47 +09:00
Sukchan Lee c391ac1334 [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
Sukchan Lee 4d2f7726b9 X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
Pau Espin 2de12e32f4
[SMF] Integrate session tear down cycle into sess->sm (#1500)
* [SMF] smf_sm.c Fix indentation

* [SMF] gsm-sm: log fsm events

* [SMF] Integrate session tear down cycle into sess->sm
2022-04-20 21:42:18 +09:00
Pau Espin e61b469489
[SMF] Inegrate session setup cycle into sess->sm (#1489)
It allows for much better control on the lifecycle of the session, and
already shows some missing tear down paths in case of errors.
It also clarifies the existence of "sess" pointer in several paths.

The code also becomes clearer overall, since all the transitions and
logic to send next messages are put together.

Tear down of the session will be integrated into gsm-sm in a follow-up
patch.

The 5gc session setup is only partially moved to gsm-sm, and left as an
exercise for users wishin to improve 5gc support.
2022-04-14 10:30:58 +09:00
Pau Espin 51a75cde26
Pespin/pr (#1395)
* [SMF] Gn: Avoid assert crash if no PDP resources available

* [SMF] Gn: Rearrange IE handling order in CreatePDPContextRequest

Let's handle the GTPC remote addr + TEID first, since those should be
used in the CreatePDPContextResponse ideally if available.

Let's then handle parsing of all IEs not related to bearers/UserPlane,
then those missing, and finally do all the IP resource allocation.
2022-02-25 22:39:44 +09:00
Sukchan Lee c9363b1320 5gc: Paging was added 2021-01-18 11:48:35 -05:00
Sukchan Lee 19b9360687 Split SGW into SGW-C/SGW-U 2020-08-12 20:31:22 -04:00
Sukchan Lee dbee687a75 Add only one 5GC scenario (call-flow) 2020-06-17 01:22:28 -04:00
Sukchan Lee ae75f43a88 Initial proposal CUPS using PFCP 2020-04-26 15:36:05 -04:00