Commit Graph

4377 Commits

Author SHA1 Message Date
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
jmasterfunk84 f0de33833b Use SUPI not SUCI in error message 2023-12-31 11:30:27 +09:00
Sergey Yarin 0b93bd2ca9 Update 01-genodebs.md
Add a Nokia pico BTS to the list of tested hardware
2023-12-29 17:55:18 +09:00
Sukchan Lee 5d26416cd5 [DOCS] 5G Roaming with Mutual TLS by @infinitydon 2023-12-28 06:58:03 +09:00
Pau Espin 6cb20185fa cosmetic: mme: emm-*.c fix trailing whitespace 2023-12-23 09:57:11 +09:00
Pau Espin 3d693da73e [MME] Gn: Introduce initial support for 4G->2G cell reselection
In an Inter-RAT setup a UE could perform a RAU coming from a 4G network.
In that case the UE/MS is unknown to the SGSN and it should request the
SGSN context (MM, PDP) from the MME. 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

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).

This commit doesn't implement the reverse direction, aka UE issuing cell
reselection 2G->4G. Initial support for this scenario will hopefully be
added soon as a follow-up patch, similar to this one.

Related: https://osmocom.org/issues/6294
2023-12-23 09:56:55 +09:00
Sukchan Lee 080f5bfd70 [NRF] crash after sending invalid message (#2808)
NRF crash after receiving
curl --http2-prior-knowledge http://127.0.0.10:7777/nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-plmn-list=[{"mcc":"999","mnc":"70"}]&requester-nf-type=AMF&service-names=nausf-auth&target-plmn-list=[{"mcc":"999","mnc":"70"}]
curl --http2-prior-knowledge http://127.0.0.10:7777/nnrf-disc/v1/nf-instances\?target-nf-type=AUSF\&requester-plmn-list=%5B%7B%22mcc%22%3A%22999%22%2C%22mnc%22%3A%2270%22%7D%5D\&requester-nf-type\=AMF\&service-names=nausf-auth\&target-plmn-list=%5B%7B%22mcc%22%3A%22999%22%2C%22mnc%22%3A%2210%22%7D%5D
2023-12-23 09:55:19 +09:00
Pau Espin ea7708bcfc lib/gtp: Fix xact logic for gtp1 messages with intermediate stage
As per TS 29.060:
The Initial/request message is "SGSN Context Request", sent by peer A.
Peer B sends a response message "SGSN Context Response" with same SeqNr.
Peer A sends a response message "SGSN Context Acknowledge" with same
SeqNr.
If Peer B doesn't see a "SGSN Context Acknowlegde", it should keep
retransmitting "SGSN Context Response" as usual.
2023-12-22 06:04:18 +09:00
Pau Espin 14932a7254 [MME] Split Gn local TEID generation from S11 TEID generation 2023-12-22 06:04:03 +09:00
Pau Espin 6a9c7f16c1 Revert "[MME] Gn: Introduce initial support for 4G->2G cell reselection"
This reverts commit 5a31af36e0.
2023-12-22 06:02:11 +09:00
jmasterfunk84 2390a22504 Add space to inprove readbility of error 2023-12-21 22:14:24 +09:00
Pau Espin 75f32e07de xact: Fix debug message printed when not needed 2023-12-21 22:13:45 +09:00
Pau Espin ab51ba9dd5 cosmetic: mme: Fix trailing whitespace 2023-12-21 22:12:20 +09:00
Pau Espin 5a31af36e0 [MME] Gn: Introduce initial support for 4G->2G cell reselection
In an Inter-RAT setup a UE could perform a RAU coming from a 4G network.
In that case the UE/MS is unknown to the SGSN and it should request the
SGSN context (MM, PDP) from the MME. 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

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).

This commit doesn't implement the reverse direction, aka UE issuing cell
reselection 2G->4G. Initial support for this scenario will hopefully be
added soon as a follow-up patch, similar to this one.

Related: https://osmocom.org/issues/6294
2023-12-21 22:11:49 +09:00
Pau Espin 7728172a83 [CRYPT] Constify several input parameters
This allows easily spotting input vs output parameters, as well as
make it easier for compiler to find out bugs and optimize code.
2023-12-20 20:04:23 +09:00
Pau Espin 9349743295 lib/proto: Constify params of ogs_id_get_{type,value}() 2023-12-20 20:04:23 +09:00
Pau Espin 5061a3aec0 [MME] Store decoded PAA into session->ue_ip and session_type
This will be used by the Gn interface to obtain the UE IP and provide
it to new SGSN when transmitting SGSN Context Response.
2023-12-19 06:57:35 +09:00
Pau Espin 414f81fcd5 [MME] Store received PGW S5C IP address in mme_sess_t
This information will be required by the Gn interface in MME when
answering an SGSN with an "SGSN Context Response" message during MS cell
reselection EUTRAN->GERAN.
2023-12-19 06:57:18 +09:00
Stare Gaber 4655507a00 [AMF] Fix deregistration request De-registration type 2023-12-19 06:47:54 +09:00
Sukchan Lee 4eb4a93cbd Merge branch 'main' of https://github.com/open5gs/open5gs 2023-12-17 10:23:21 +09:00
Sukchan Lee dcaccb4105 Added open5gs-sepp in debian package 2023-12-17 10:22:39 +09:00
mitmitmitm cecb87b346 Fix small typo in ogs_pfcp_sendto 2023-12-16 18:44:36 +09:00
Pau Espin 8c01f3387d constify src param of ogs_fqdn_{build,parse}() 2023-12-13 23:02:50 +09:00
Pau Espin 3b6b8ebf4f lib/proto/types.c: Fix trailing whitespace 2023-12-13 23:02:50 +09:00
Sukchan Lee 1ba3fd3cf8
[AMF/MME] UEContextReleaseCommand after Interity Protected (#2786) (#2794)
* [AMF/MME] UEContextReleaseCommand in Integrity (#2786)

Modified not to send UEContextReleaseCommand in Integrity Unprotected
NAS message such like Registration or Service request.

* [AMF/MME] UEContextReleaseCommand after Interity Protected (#2786)

Modified not to send UEContextReleaseCommand in Integrity Unprotected
NAS message such like Registration or Service request.
2023-12-13 17:54:37 +09:00
Pau Espin b0f381416b gtp/v1: Specify 'P-TMSI Signature' as uint24_t 2023-12-12 08:14:40 +09:00
Pau Espin 204ac35a66 gtp/v1: Specify 'MS Validated' IE as uint8
This field is a fixed size 1 byte with all bits set as spare (1) and the
lsb set as 0 ("No") or 1 ("Yes").
2023-12-12 08:14:40 +09:00
Sukchan Lee 1041f37a34 [DOCS] Added UPF performance test 2023-12-09 18:29:03 +09:00