Commit Graph

63 Commits

Author SHA1 Message Date
Sukchan Lee cd76dc641d [SEC] Crash and Protocol Violations
The AMF will crash on the following locations when it receives a sequence
of NAS messages from a UE.

- ogs_nas_encrypt: Assertion `pkbuf->len' failed. (../lib/nas/common/security.c:86)
- gmm_state_authentication: Assertion `r != OGS_ERROR' failed. (../src/amf/gmm-sm.c:1561)

Besides the crashes found above, an incorrect protocol transition
is identified in Open5GS. Without any Registration/Attach Request message,
when the Identity Response message sent, the Core Network responds
with an Authentication Request message. According to the standard,
only the Registration/Attach Request message can start a state transition
from the 5GMM/EMM-DEREGISTERED state to the 5GMM/EMM-COMMON-PROCEDURE-INITIATED.

So I've modified the relevant code to address these issues.
2024-04-09 16:23:49 +09:00
gstaa eb2b19b39c
Include cause in HTTP response ProblemDetails (#3051)
Cause is set according to particular NF standard.

Additionally:
- OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED typo fixed.
- [PCF] Fixed SM Policy establishment error handling
2024-04-04 23:29:20 +09:00
Sukchan Lee e92293e0af
[SEPP] Initial Update for 5G Roaming (#2739)
[SEPP] Initial Update for 5G Roaming
2023-11-19 19:34:51 +09:00
Šimon Lukašík 490a3ecb99
A minor typo fix (#2707)
* minor typo fix

* typo fix: faimly -> family
2023-10-28 22:11:58 +09:00
Sukchan Lee fc4072590e [SMF] Added SMF registrations (#2514, #2524) 2023-08-18 20:21:08 +09:00
Sukchan Lee af67b2486b [SBI] UDR stores PEI instead of PCF 2023-08-13 11:49:01 +09:00
Sukchan Lee 32019df0f0 Fixed MacOSX compile error 2023-04-04 21:53:39 +09:00
Sukchan Lee ad9e5b28cf [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
Sukchan Lee b7386284a7 [NRF] Fixed a crash during NRF discovery (#2034)
Other NF instances are obtained through NRF
or created directly through configuration files.

Other NFs created by the config file should not be passed
through NRF discovery or anything like that.

Since self-created NF Instances do not have an ID,
they are implemented to exclude them from NRF Discovery.
2023-01-29 11:22:45 +09:00
mitmitmitm 739cb599d1 [UDR] Read framed routes from DB send them in sm-data
The framed routes are stored in mongo as

 {
     "imsi" : "$IMSI",
     ...,
     "slice" :
     [{
         ...,
         "session" :
             ...,
             "ipv4_framed_routes" : ["10.45.33.0/24", "10.45.35.0/24"],
         }],
     }],
 },
2023-01-26 22:37:58 +09:00
mitmitmitm bdc9c1373f [UDM/UDR] Handle UEAuthentication authRemovalInd 2022-11-29 23:10:49 +09:00
mitmitmitm b85ad61e2b OpenAPI: Generate patch_item.[ch] from OpenAPI specifications 2022-11-24 17:30:38 +09:00
Sukchan Lee 57f1f2c21a Fixed crash after 48 hours of running (#1893) 2022-11-18 23:28:35 +09:00
Sukchan Lee 5ccb5f0f99 SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
Sukchan Lee 2b8db5d488 Follow-up on #1757 2022-09-23 20:42:04 +09:00
Sukchan Lee f54bccacf5 Support service-based NF subscription 2022-09-08 22:12:01 +09:00
Sukchan Lee 5295c108ad Added Service-based NF discovery
== Known limitation ==
Placing npcf-smpolicycontrol and pcf-policyauthorization
in different NFs is not supported. Both npcf-smpolicycontrol
and pcf-policyauthorization should be placed in the same NF.
2022-09-02 23:04:57 +09:00
Sukchan Lee 9f98d421a0 [SBI] Added config for service-names discovery 2022-08-27 10:49:07 +09:00
Sukchan Lee 9b10d70c77 [NRF] Fixed library load error 2022-08-26 10:57:11 +09:00
Sukchan Lee e6a14cb73d Move src/../nf-sm.[ch] to lib/sbi/nf-sm.[ch] 2022-08-12 14:03:53 +09:00
Sukchan Lee 7231dafbf1 [SBI] Fixed nf_instance memory leak
- Rollback commit ed3444eef5
- Do not modify reference count when REGISTER/DEREGISTER notified from NRF
2022-08-02 09:44:13 +09:00
Sukchan Lee a5010a61ef Support Discovery Optional Parameter (#1671)
To support target-nf-instance-id in the discovery,
Discovery optional parameter is implemeted
2022-07-24 15:10:09 +09:00
Sukchan Lee 5e18b2bd13 [SCP] Support of Indirect Communication 2022-07-16 13:27:18 +09:00
Sukchan Lee 50be661cf9 Fixed a crash when slice/session overflow (#1637) 2022-06-30 13:33:16 +09:00
Sukchan Lee c528e0d5bc [SBI] Change NfInstance.Id to Optional 2022-06-18 23:56:12 +09:00
Bostjan Meglic 7be7029ac4
Send deregistration event from AMF to UDM (#1599)
* [SBI] Fix converting PatchItem to JSON

* [UDR] Add support for endpoint for patching subscription data

Add support for PATCH HTTP method for the following endpoint:
/subscription-data/{ueId}/context-data/amf-3gpp-access

Currently does not change any data in the database.

* [UDM] Add support for endpoint for patching subscription data

Add support for the following endpoint, HTTP PATCH method:
/nudm-uecm/v1/{ueId}/registrations/amf-3gpp-access

The endpoint is used when UE deregisters from the core, and AMF
sends a subscription modification request with "purgeFlag" set.

* [UDM] Add check for same GUAMI when patching subscription data

* [AMF] Send deregistration event to UDM

When UE sends deregistration request, AMF needs to send a
Nudm_UECM_Deregistration request to UDM.
The order of requests is now the following:
- send PDU session release to SMF
- send deregistration event to UDM
- send AM policy control release to PCF
2022-06-14 23:44:02 +09:00
Bostjan Meglic 2c2ce143a3
Fix minor typos (#1554)
* Fix minor typo in log output

* Remove unused struct members
2022-05-24 21:01:54 +09:00
Sukchan Lee a6927e18e6 [SBI] fixed mem leak SessionManagement (#1551) 2022-05-21 17:51:31 +09:00
Bostjan Meglic 8efa364f89
Change handling of SessionManagementSubscriptionData as an array (#1551)
According to the following standards the response to the endpoint
/nudm-sdm/${supi}/sm-data should be an array of
SessionManagementSubscriptionData objects, instead of only one object.

TS 29.503 version 16.6.0
TS 29.505 version 16.4.0

UDR now responds to the request with only item in the array.
UDM copies all items as is.
SMF uses only the first item in the array, even if there are more
present.
2022-05-20 17:33:49 +09:00
Sukchan Lee ed3444eef5 Need to increase NF ref_count
1. UE registered and PDU established.
2. PCF does not receive Heartbeat.
 - PCF De-registered state.
 - Since PDU is established, SMF should not remove NF instance
3. PCF re-registered.
 - HERE, WE NEED TO INCREASE NF REFERENCE COUNT.
   Otherwise, NF instance will be removed if PCF is de-registered state
4. UE sends PDU release request.
5. Because SMF knows PCF NF instance, SMF can send PCF delete
2022-03-01 22:02:02 +09:00
Sukchan Lee 039b9d0aaa SBI updated
- openapi-generator version 5.2.0
- add priority/capacity/load in NFProfile/NFService
- add AllowedNfTypes in NFProfile/NFService
2021-07-16 17:02:33 +09:00
Sukchan Lee 005cd30e02 fix the bug for Real PCF unable to PATCH (#1086) 2021-07-12 17:30:45 +09:00
Sukchan Lee 118d62d42d Add more memory log 2021-06-06 22:35:46 +09:00
Sukchan Lee fe89f7cd11 [5GC] Added BSF(Binding Support Function) 2021-05-29 15:56:12 +09:00
Sukchan Lee 73c3aa54c0 [ALL] Fix the terminate sequence (#938) 2021-04-21 17:46:03 +09:00
Sukchan Lee 793a82020f [ALL] Init updated for an Invalid IP (#938) 2021-04-21 17:24:17 +09:00
Sukchan Lee 9af4268bab arch: DB schema Changes (#796)
- New function : NSSF
- New feature : SMF selection
2021-03-08 21:25:09 +09:00
Sukchan Lee 852756f902 test: Porting FreeBSD 2021-02-08 14:25:40 -05:00
smartVan 19014a3a25
modify udr smf selection subscription data (#778) 2021-01-28 14:18:02 -05:00
Sukchan Lee 88346c0141 fix: SBI heartbeat timer usage changed (#741) 2021-01-01 15:56:46 -05:00
Sukchan Lee 235a041b8d feat: Add dedicated QoS flow 2020-12-31 21:07:08 -05:00
Sukchan Lee efd1780745 fix: update NRF issues (#727,#728,#729,#730) 2020-12-24 15:41:31 -05:00
Sukchan Lee 371e22c96b fix: AMF sets default DNN if UE does not send it. 2020-12-21 14:49:05 -05:00
Sukchan Lee 198abc6e8b Add PCF(Policy Control Function) 2020-12-11 14:03:20 -05:00
Sukchan Lee 2c2b6dfcaf Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
Sukchan Lee ad85c12513 checking for APN/DNN in case insensitive #617 2020-11-02 11:45:14 -05:00
Sukchan Lee edf83b37fa Add debug message for issues [#551] 2020-09-10 21:50:20 -04:00
Sukchan Lee 18c483950c Change Number of UEs usage [#533]
- Set the number of UEs in units of AMF/MME instead of gNB/eNB.
- See default value as shown below
    Number of UEs per AMF/MME : 4,096
    Number of gNB/eNB per AMF/MME : 32
2020-08-25 23:05:01 -04:00
Sukchan Lee bcffdd823e Re-factoring 5GC for solving crash issue 2020-08-02 23:22:41 -04:00
Sukchan Lee 7afb914b9a Add more log for 5GC 2020-07-27 21:05:11 -04:00