Commit Graph

4304 Commits

Author SHA1 Message Date
Daniel Willmann 1cd93f66b0 Release new version 2024-01-29 20:17:26 +01:00
Oliver Smith 32d5b3d62f debian: remove open5gs-hss 2024-01-29 19:33:33 +01:00
Alexander Couzens 6139f5c7d8 add missing stuff to remove mongodb 2024-01-29 19:33:33 +01:00
Daniel Willmann 41e6b1de78 Use default APN if the one from the ESM info resp could not be found 2024-01-29 13:27:05 +01:00
Alexander Couzens 45a9bd44f5 example config: some thoughs about static profiles 2024-01-29 13:26:13 +01:00
Alexander Couzens cca2636a5d WIP: PCRF: use a harded profile as session data
Allow to attach with default bearer without mongodb. No secondary bearer or IMS is supported
right now.
2024-01-29 13:25:35 +01:00
Alexander Couzens e58359776e FIXME: remove dependency mongodb. FIXME: use get_option() to dynamic depend on mongodb 2024-01-29 13:25:23 +01:00
Alexander Couzens cdea0922d9 PCRF: allow to build without mongodb 2024-01-29 13:22:58 +01:00
root ffdfdf91a4 FIXME: libsctp: add define HAVE_NETINET_SCTP_H to allow build on debian bullseye
This is a quick fix. Need to investigate why the autodetect doesn't work
or the compilation otherwise fails.
2024-01-29 13:13:51 +01:00
Sukchan Lee 3886891833 [MME] Crash due to a race condition
A race condition can occur in the following situations.
In conclusion, we can use this situation to determine
whether or not the UE Context has been removed and avoiding a crash.

For example, suppose a UE Context is removed in the followings.

1. Attach Request
2. Authentication-Information-Request
3. Authentication-Information-Answer
4. Authentication Request
5. Authentication Response(MAC Failed)
6. Authentication Reject
7. UEContextReleaseCommand
8. UEContextReleaseComplete

The MME then sends a Purge-UE-request to the HSS and deletes
the UE context as soon as it receives a Purge-UE-Answer.

Suppose an Attach Request is received from the same UE
between Purge-UE-Request/Answer, then the MME and HSS start
the Authentication-Information-Request/Answer process.

This can lead to the following situations.

1. Purge-UE-Request
2. Attach Request
3. Authentication-Information-Request
4. Purge-UE-Answer
5. [UE Context Removed]
6. Authentication-Information-Answer

Since the UE Context has already been deleted
when the Authentication-Information-Answer is received,
it cannot be processed properly.

Therefore, mme_ue_cycle() is used to check
whether the UE Context has been deleted and
decide whether to process or
ignore the Authentication-Information-Answer as shown below.
2024-01-25 23:27:34 +09:00
Pau Espin 609c234f0b Document Gy interface spec reference 2024-01-25 07:05:33 +09:00
Pau Espin 64598fab2e Document Gx interface spec references 2024-01-25 07:05:33 +09:00
Pau Espin 29ea85ca4c cosmetic: pcrf/pcrf-gx-path.c: Fix trailing whitespace 2024-01-25 07:05:33 +09:00
Bostjan Meglic dcdfc970ce initialize variables before using them 2024-01-22 17:34:59 +09:00
Bostjan Meglic a3afc4764c memset input/output structure inside the function
Instead of checking if caller memset'ted the structure to zero, memset
it inside the function regardless.
There is no added benefit of a memset() + memcmp() to check if caller
cleared the structure used for outputing data from the database.
2024-01-22 17:34:59 +09:00
Bostjan Meglic e650b66305 fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
jmasterfunk84 2583fd3c08 Introduce ability for multiple SDM_Subscriptions 2024-01-21 13:16:21 +09:00
Sukchan Lee b94173ab41 [AMF/MME] Fixed M-TMSI pool release (#2307)
M-TMSI pool release was incorrectly modified and has now been corrected.
2024-01-21 11:58:43 +09:00
Gaber Stare d7b896affb [SMF] Build URR at bearer modification 2024-01-20 08:20:24 +09:00
Sukchan Lee 97e1b1bd30 [PFCP] Fixed incorrect TLV names (#2887)
Fixed standards documentation that described incorrect TLV names.
2024-01-19 23:40:20 +09:00
Pau Espin 60691b02d2 [MME] Gn: Introduce initial support for 2G->4G cell reselection
In an Inter-RAT setup a UE could perform a TAU coming from a 2G/3G network.
In that case the UE/MS is unknown to the MME and it should request the
SGSN context (MM, PDP) from the old SGSN. This is done through the following
GTPv1C message exchange on the Gn interface of SGSN and MME:
SGSN <- MME: SGSN Context Request
SGSN -> MME: SGSN Context Response
SGSN <- MME: SGSN Context Acknowledge

Diagram with full set of steps can be found at 3GPP TS 23.401 D.3.6.

This commit doesn't aim to be a complete implementation of the mentioned
procedure, since it's quite a complex one, with lots of fields and logic
required. This so far only implements in general the minimally
successful case by filling as much as possible the required set of
fields.
This will allow for a base onto which do incremental improvements and
fixes while testing against UEs and SGSNs (such as osmo-sgsn, which
doesn't yet support this procedure but will potentially earn it soon).

The reverse direction, aka UE issuing cell reselection 4G->2G was
already implemented (same as here, initial non-complete implementation)
in open5gs-mmed in commit 3d693da73e.

Related: https://osmocom.org/issues/6294
2024-01-17 23:05:19 +09:00
Sukchan Lee 4088cdf17d [MME] Hangs on an invalid S1AP message
Within the PathSwitchRequest packet,
the E-RABToBeSwitchedDLList has two bearers.

If the E-RAB-ID of both bearers is 5, the MME's list memory is destroyed
and the MME crashes. To fix this issue, we modified the code so that
the MME can work correctly with invalid S1AP messages.
2024-01-17 20:17:55 +09:00
Pau Espin 52be56b839 [MME] Match any SGSN in same RAI if none with specific RAI+CI found
This will be useful for other procedures where only the RAI is known,
but not the specific CI. This is the case of idle mobility from Gb or Iu
to EUTRAN, where MME needs to request contexts based on the RAI mapped
in the GUTI obtained from the UE during TAU.
This also makes the config more resilient in RIM scenario, where an SGSN
can be picked now even if CI doesn't match, instead of failing or faling
back to the default route SGSN.
2024-01-16 06:37:29 +09:00
Pau Espin 078bfc90da [GTPv1] Introduce APIs to decode MM Context and PDP Context IEs
They will be used in a follow-up patch implementing GERAN->EUTRAN idle
mobility.
2024-01-16 06:37:10 +09:00
Pau Espin feaa86fc9c [GTPv1] Fix encoding of MM Context IE if NRSNRA bit not set
The len byte, describing the length of the field coming after it,
is always expected according to the struct definition.
2024-01-16 06:37:10 +09:00
Pau Espin afa2c2c9e0 [CRYPT] Add ogs_kdf_kasme_idle_mobility()
This function is needed by a follow-up patch implementing initial
support for GERAN->EUTRAN idle mobility.
2024-01-16 06:36:44 +09:00
Sukchan Lee b0cf9fcbe7 [AMF] Issue during Concurrent UE Registration (#2839)
While they were continuing their fuzzy testing and developing PacketRusher, an unusual issue with the AMF was observed. The problem arises when a single Ethernet frame containing three bundled SCTP chunks is sent. This behavior is reproduced with PacketRusher when attempting to concurrently register two UEs with the same MSIN.

The expected behavior is that the PDU Session Establishment Accept is sent inside a DownlinkNASTransport to RAN UE NGAP ID 1. However, it is actually sent inside an InitialContextSetupRequest to RAN UE NGAP ID 2. The MAC of this NAS message is invalid for the Security Context of RAN UE NGAP ID 2 (probably valid for RAN UE NGAP ID 1)
2024-01-13 23:16:50 +09:00
Emanuele Di Pascale 21f99ad08d MME: support for IDR EPS_USER_STATE
keep track of whether we failed to page the UE, as that is
needed to provide the correct user state to the HSS.
2024-01-13 12:00:20 +09:00
Emanuele Di Pascale 77d94c0301 lib/diameter/s6a: add EPS-User-State
and the MME-related children
2024-01-13 12:00:20 +09:00
Bostjan Meglic 84569ccbdc [SBI] Fix conversion of AMBR bitrates from string to integer
When the input string contains a number and a unit too large to be
represented by a 64-bit variable, AMF/SMF would crash due to conversion
resulting in a negative value and unable to be used in compiling NAS-PDU
container.
Now the value gets clipped at int64_t maximum value.

Failed to encode ASN-PDU [-1] (../lib/asn1c/util/message.c:42)
2024-01-10 22:45:46 +09:00
Bostjan Meglic a4babef9eb [AMF] Add initialRegistrationInd field in Amf3GppAccessRegistration request to UDM 2024-01-10 22:37:56 +09:00
herlesupreeth 48323bd299 Update VoLTE tutorials 2024-01-10 21:49:48 +09:00
Sukchan Lee be1305b903 Added SEPP debian package (#2861) 2024-01-09 22:12:16 +09:00
Pau Espin ba59c8309a cosmetic: mme: Fix trailing whitespace 2024-01-09 21:33:01 +09:00
Bostjan Meglic 21b7cd487a [DBI] Fix code indent 2024-01-09 17:50:37 +09:00
Bostjan Meglic ad216c0b77 [core] Fix a couple of warnings when using C++ compiler or more strict settings
../lib/core/ogs-list.h:62:24: warning: invalid conversion from 'void*' to 'ogs_list_t*' {aka 'ogs_list_s*'} [-fpermissive]
../lib/core/ogs-rbtree.h:79:32: warning: invalid conversion from 'const void*' to 'const ogs_rbnode_t*' {aka 'const ogs_rbnode_s*'} [-fpermissive]

[SBI] Fix compiler error - possible uninitialized variable

[SCP] Fix compiler error - Error: this condition has identical branches

In case of additional compiler warnings turned on, the compiler warns
about potentially unused variables. Fix those issues.
2024-01-09 17:50:22 +09:00
Pau Espin 7d60b13d3a lib/proto/conv: Introduce API ogs_ip_to_paa()
The counterpart API ogs_paa_to_ip() was already present, but this was
missing. It will be required in open5gs-mmed in a follow-up patch.
2024-01-06 07:44:14 +09:00
Pau Espin 4ab275ad70 Rename and move ogs_gtp2_paa_to_ip() to lib/proto/conv
Both types are defined under lib/proto/type.h, and the conversion
function is used in several different protocols, so let's better move it
to generic lib/proto/conv.h and remove the "gtp2" prefix.
2024-01-06 07:44:14 +09:00
Pau Espin b3845d5b0b [MME] Constify params in mme-context and depending APIs 2024-01-06 07:42:32 +09:00
Pau Espin 2a840297f8 cosmetic: Fix trailing whitespace 2024-01-06 07:42:32 +09:00
Pau Espin 3457435071 [MME] Fix potential null ptr dereference
The assert is checking for sess->session->name, but afterwards there's a
check to skip ses->session not being null, which means the assert can
crash while dereferencing sess->session.
2024-01-06 07:42:32 +09:00
Sukchan Lee b1515a16ff [SMF] Fixes crash when PDU session release
I've resolved an issue where sending continuous
'PDU Session Release Request' message to the same session,
when more than two sessions were created, was causing an SMF crash.

For your reference, this problem did not occur
when only one session was created.
2024-01-05 21:15:34 +09:00
Pau Espin 8f58b55e14 [MME] Fix incorrect function name printed in error line 2024-01-05 05:52:56 +09:00
Pau Espin 27d2f86103 lib/gtp/xact: Fix tx of SGSN Context Acknowledge 2024-01-04 06:57:18 +09:00
Pau Espin 389ccaed16 lib/gtp/xact: Fix rx of SGSN Context Response 2024-01-04 06:57:18 +09:00
jmasterfunk84 ad2154ac2a
[HSS] Add hss_event_init after change to event system (#2838)
* Add hss_event_init after change to event system

* also include hss_event_final
2024-01-03 21:15:16 +09:00
Pau Espin 1f8f20da34 lib/proto/types.{c,h}: Constify several parameters 2024-01-03 07:10:09 +09:00
Pau Espin 55844d1eed ogs-conv.{c,h}: Constify several parameters 2024-01-03 07:10:09 +09:00
Pau Espin 9b729b2c6f cosmetic: ogs-conv.c: Fix trailing whitespace 2024-01-03 07:10:09 +09:00
Pau Espin 7d9f6181f3 [MME] cosmetic: Fix typo in comment 2024-01-02 21:25:42 +09:00