Commit Graph

1151 Commits

Author SHA1 Message Date
Sukchan Lee 0ec0b2dc69 Fix the crash for NAS message missing #619 2020-10-29 00:18:11 -04:00
Sukchan Lee 93312e8f3d Fix the bug for S1-reset or eNB-restart(#627) 2020-10-28 22:59:27 -04:00
Sukchan Lee a470131489 Now, F-TEID is allocated in the UP function. 2020-10-25 22:43:53 -04:00
Sukchan Lee aa81bb2c89 Fix the bug #619
When missing Activate default EPS bearer context accept
between UE and eNB, MME's exception handler has a bug.

So I've fixed it!
2020-10-23 13:48:39 -04:00
Sukchan Lee 15e42bc4a9 Fix MME crash when VoLTE is enabled [#619] 2020-10-22 17:53:13 -04:00
Sukchan Lee 39aa726543 Remove the redundant assertion (#619) 2020-10-20 22:50:44 -04:00
Sukchan Lee 1bed0d5872 [#568] Add GTP-U Error Indication Handling
So far, no operation was performed when Error Indication was received
from eNodeB. For that reason, I solved #568 issues by controlling
the MME to prevent this from happening.

Now, when GTP-U Error Indication is received, MME and SGW are implemented
to do what they have to do. I hope that the network can be restored
by responding appropriately even if Error Indication occurs.
2020-10-20 20:00:02 -04:00
Sukchan Lee 60a6551f8a Oops! change debug level 2020-10-08 22:57:19 -04:00
Sukchan Lee 8d55964bcc Change buffering instead of deleting [#592] 2020-10-08 22:54:13 -04:00
Sukchan Lee d64db21050 Use GTP-U Buffering instead of Deletion[#592,#568] 2020-10-07 21:21:48 -04:00
Sukchan Lee 30b7f7669e rollback v2.0.11 2020-10-05 14:06:17 -04:00
Sukchan Lee 6e45ec6f39 rollback to the v2.0.11 2020-10-03 22:38:47 -04:00
Sukchan Lee 1129440061 Fix the warning 2020-10-01 13:37:23 -04:00
Sukchan Lee a3fa0d8362 fix the warning 2020-10-01 13:35:06 -04:00
Sukchan Lee 88399da5b6 Fix release access bearer #592 2020-10-01 13:27:58 -04:00
Sukchan Lee 72d1226c05 Apply open5gs coding style 2020-09-29 07:04:22 -04:00
Supreeth Herle a9ad43a4ef
Add Vendor-Specific-Application-Id in CER for advertising the diameter applications supported (#589)
* Add Vendor-Specific-Application-Id in CER of PCRF

Not advertising a Vendor-Specific-Application-Id in CER may result in
Diameter Peer rejecting the CER with a DIAMETER_NO_COMMON_APPLICATION error

* Add Vendor-Specific-Application-Id in CER of HSS and MME

Not advertising a Vendor-Specific-Application-Id in CER may result in
Diameter Peer rejecting the CER with a DIAMETER_NO_COMMON_APPLICATION error
2020-09-28 20:25:36 -04:00
Sukchan Lee 3554419d97 Fix the connection refused bug [#568, #551] 2020-09-24 21:29:48 -04:00
Sukchan Lee 8c7d401636 fix the bug OGS_ADDR crash [#551] 2020-09-22 21:20:13 -04:00
Sukchan Lee ff642e0f3a Fix the crash bug for #551 2020-09-22 14:03:45 -04:00
Sukchan Lee 62d95be036 Add EMM/GMM handler in exception state [#569] 2020-09-22 13:27:58 -04:00
Sukchan Lee f45f948979 Oops! ogs_assert to ogs_expect_or_return 2020-09-22 00:44:50 -04:00
Sukchan Lee b12af9275f Fix the bug for various assert [#551] 2020-09-21 22:26:55 -04:00
Sukchan Lee d148012d82 Fix the MME crash #551 2020-09-21 20:06:41 -04:00
Sukchan Lee d73ff77031 We cannot initialize the state in all cases. [#569]
In TS24.501 Ch 5.5.1.3.8 Abnormal cases on the network side

d) REGISTRATION REQUEST with 5GS registration type IE set to
"mobility registration updating" or "periodic registration updating"
received after the REGISTRATION ACCEPT message has been sent and
before the REGISTRATION COMPLETE message is received.

Since, we have to do this special case, it is desirable
to handle it directly inside the state(gmm-sm.c).
2020-09-21 14:37:17 -04:00
Sukchan Lee 7ae1600e04 Add exception handling for #568
If packet buffer is exhausted, the packet is sliently discarded
2020-09-18 19:39:02 -04:00
Sukchan Lee edf83b37fa Add debug message for issues [#551] 2020-09-10 21:50:20 -04:00
Sukchan Lee 519de9ef68 Fix the bug GUTI not present case [#551] 2020-09-10 14:04:26 -04:00
Sukchan Lee 7f9f6fc3f2 rollback ogs_expect() [#551] 2020-09-08 22:17:13 -04:00
Sukchan Lee a2f3914a05 fix assertion E_RABSetupListBearerSURes [#552] 2020-09-07 22:15:59 -04:00
Sukchan Lee 160490483a Fix the many UEs issues [#551] 2020-09-07 22:02:45 -04:00
Sukchan Lee 4d023d0de0 fix overflow bug in the packet memory pool 2020-09-06 23:53:38 -04:00
Sukchan Lee a46be09a6f Fix the MME assertion bug [#551] 2020-09-06 22:09:24 -04:00
Sukchan Lee 6bbc2047d0 Add exception handling for #551
09/07 00:43:07.545: [mme] FATAL: mme_bearer_find_or_add_by_message:
Assertion `sess' failed. (../src/mme/mmecontext.c:2998)
2020-09-06 21:34:17 -04:00
Sukchan Lee d544125943 PDN connectivity in disconnect state [#486]
After the PDN disconnect failed, there was a problem
that the PDN connectivity was not possible again.

PDN connectivity has been modified to work properly
even in the same situation as 401x2 pcap.
2020-09-05 15:36:18 -04:00
Sukchan Lee d02aa8b21b Attempt to fix #548 problem 2020-09-04 23:36:51 -04:00
Sukchan Lee e86b1043c2 5G Core: Maintaining Old NAS signalling [#546] 2020-09-03 22:00:26 -04:00
Sukchan Lee 3c3bac6812 4G/EPC: Maintaining Old NAS signalling [#546] 2020-09-03 19:59:00 -04:00
Sukchan Lee 887a0a10d3 Fixing the problem of the test program 2020-09-01 23:04:35 -04:00
Sukchan Lee bc476c2e0e Instead of OGS_NEXT_ID, Use memory pool-index 2020-08-29 23:27:54 -04:00
Sukchan Lee 015a462ce9 Fix the bug for multiple Video Call (#535) 2020-08-29 10:53:02 -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 8e048be082 Release v2.0.0 2020-08-21 23:33:45 -04:00
Sukchan Lee 19b9360687 Split SGW into SGW-C/SGW-U 2020-08-12 20:31:22 -04:00
Sukchan Lee c22ef51e01 Finished on version 2020-07-13 21:53:41 -04:00
Sukchan Lee 4dd113ac7b Add git version 2020-07-13 00:18:29 -04:00
Sukchan Lee a71d2ee3db refine SGW/UPF selection code 2020-07-09 01:38:09 -04:00
Sukchan Lee 3b0db8c384 Fix the bug for Release-16 2020-07-03 01:03:13 -04:00
Sukchan Lee d9743286c5 Add PDU Session Release [#488] 2020-07-02 01:50:23 -04:00
Sukchan Lee fae342ecce Apply Release-16 in 4G EPC(S1AP,NAS,GTP) 2020-07-01 00:22:55 -04:00
Sukchan Lee 3c6711c9c8 If HSS/UDR gets MSISDN, AMF/MME -> SMF/SGW [#464] 2020-06-29 22:12:24 -04:00
Sukchan Lee ca4ee27e84 more bug is fixed 2020-06-27 00:46:06 -04:00
Sukchan Lee 300123d990 Bug fixed for 5GC 2020-06-23 00:35:41 -04:00
Sukchan Lee b35c2277be simple 5GC registration is done 2020-06-21 23:10:54 -04:00
Kenny Barlee bcd02b1f33
MME: select SGW by RR,TAC,ENB_ID || SMF: select PFCP associated UPF by RR,TAC,APN,ENB_ID (re-worked) (#470)
* MME: select SGW by RR,TAC,ENB_ID
and enable round robin inside each option

* SMF: select PFCP associated UPF by RR,TAC,APN,ENB_ID
and enable round robin inside each option
2020-06-19 00:36:02 -04:00
Sukchan Lee c54e85c5c0 Session-AMBR changes required field in WebUI 2020-06-17 21:43:16 -04:00
Sukchan Lee dbee687a75 Add only one 5GC scenario (call-flow) 2020-06-17 01:22:28 -04:00
Sukchan Lee e514316493 Remove assert for UEContextReleaseComplete [#445] 2020-06-04 16:16:16 -04:00
Supreeth Herle 8702605b5f
Add the modified Bearer level QoS if PCRF changes them (#457)
* Add the modified Bearer level QoS if PCRF changes them

* Add the AMBR if PCRF changes them
2020-06-04 15:12:32 -04:00
Sukchan Lee 72370ff0b2 Add AUSF, UDM, and UDR 2020-06-04 14:12:05 -04:00
Sukchan Lee 9bfb4591ea Add MMEName in S1SetupResponse [#444] 2020-05-25 12:34:05 -04:00
Sukchan Lee 6ef5a746e5 NGSetup is added 2020-05-25 12:15:22 -04:00
Sukchan Lee 6f6800b52e NGAP is added 2020-05-22 22:24:48 -04:00
Sukchan Lee a9eaed18aa NAS-5GS is added 2020-05-21 21:24:21 -04:00
Sukchan Lee dbf3e17fda port configuration update [#217] 2020-05-19 15:35:41 -04:00
Sukchan Lee d0673e3066 Added NRF 2020-05-18 17:00:37 -04:00
Sukchan Lee 82eebc3b80 Rollback mme_enb_pool instead of ogs_calloc (#423) 2020-04-26 22:18:47 -04:00
Jamo cde847c53d
Fix MME crash on eNB connection when maximum number of eNBs reached (#423)
* Remove mme_enb_t pool and use enb_list instead

* Refactor S1 Setup request handler

* Implement S1 Setup Failure response when maximum number of eNBs reached
2020-04-26 21:07:09 -04:00
Sukchan Lee ae75f43a88 Initial proposal CUPS using PFCP 2020-04-26 15:36:05 -04:00
Supreeth Herle 7aae20e04a
Handle forcing of IPv4 or IPv6 PDN connect using the Web UI (#415) 2020-04-19 00:05:04 -04:00
Sukchan Lee 5009876c16 P-GW respond to DIAMETER error from PCRF(#403) 2020-04-18 13:07:06 -04:00
Sukchan Lee 3feddd5424 Fix P-GW crashed without PCRF (#402) 2020-04-17 21:36:26 -04:00
Sukchan Lee 235d61a2ea Fix the crash in SGW selection mode 2020-04-08 19:27:54 -04:00
Sukchan Lee 7b5f9520d9 check auth length for sanity 2020-04-02 20:43:22 -04:00
Sukchan Lee 557d9532b0 Add GTPv2 ECHO REQ/RSP Message (#378)
This is only handling ECHO REQ/RSP message.
The related function is not implemented at this point.
2020-03-25 17:43:02 -04:00
Sukchan Lee 9c150253d9 fix the #384 issue bug
If Initial UE Message with Service Request is received and
   There is no Session Context
     (e.g due to UEContextReleaseRequest or InitialContextSetupFailure)
MME will sends Service Reject NAS message.
2020-03-25 14:02:06 -04:00
miaoski 0796ce3d7e
fix trivial typos in comments (#387)
Co-authored-by: miaoski <miaoski@gmail.com>
2020-03-15 07:49:46 -04:00
Sukchan Lee 1e56141d1e Add socknode_add() [#367] 2020-02-28 20:26:32 +09:00
Sukchan Lee 81856afff9 Fix the bug for PTI mismatch (#355)
If PDN connectivity/disconnect or Bearer Resource Modification,
MME should set UE's PTI.

And other case, PTI should set to be 0(unassigned).
2020-01-22 21:33:25 +09:00
Spencer Sevilla 2abdef74cb send PDN error cause if needed (#352)
* initial commit: respond with ESM Cause PDN-Type if we only allow IPv4 or IPv6 (not both)

* works as intended, removing debug statement.

* Fix the indentation and add the reference

Co-authored-by: Sukchan Lee <acetcom@gmail.com>
2020-01-15 21:17:20 +09:00
Sukchan Lee 0891ee5b19 For safety, check TEID presence in GTP 2020-01-01 20:17:46 +09:00
Sukchan Lee 4fcbb65eca Add missing code line (#336) 2019-12-28 22:25:30 +09:00
Sukchan Lee d191a5135e Add Bearer Resource Modification feature (#336) 2019-12-28 21:46:30 +09:00
Sukchan Lee 8e26a9adf3 fix identation for 80 columns 2019-12-19 22:24:26 +09:00
Supreeth Herle b8928ee849 Handling NAS Bearer Modification Request and VoLTE tutorial update (#336)
* Updated the docs for setting up a working VoLTE testbed

* Fixed docs formatting

* More formatting fixes of doc

* Handling NAS Bearer Resource Modification Request to prevent crashing of mme

* Corrected tutorial with right APN settings required in Mongo DB for VoLTE UE
2019-12-19 22:14:13 +09:00
Sukchan Lee a86e296afc Use uint32_t type instead of S1AP type (#326) 2019-12-13 13:49:20 +09:00
Spencer Sevilla 66f839592f assign enb_ue_s1ap_id as a part of enb_ue_add function (#326) 2019-12-13 13:46:22 +09:00
Sukchan Lee f06a8b92fe change ogs_expect() to ogs_assert() (#323) 2019-12-13 13:44:22 +09:00
Spencer Sevilla b86658e173 small stability fixes that were causing crashes in Bokondini (#323) 2019-12-13 13:25:52 +09:00
Sukchan Lee 79bada897b Minor bug fixed 2019-12-08 16:31:15 +09:00
Sukchan Lee 896ca50253 PFCP interface added, but not tested. 2019-12-07 13:17:00 +09:00
Sukchan Lee d0822c2e6b Add SGsAP-SERVICE-REQUEST in SMS & UE-active 2019-12-04 15:36:38 +09:00
Sukchan Lee ce6d2c5889 Before CUPS, move GTP-TLV to core library
TLV library will be shared in GTP and PFCP
2019-12-01 20:46:53 +09:00
Sukchan Lee ed701ce90e [#314] further refined 2019-12-01 20:14:47 +09:00
Sukchan Lee 636170e0da Review ogs_expect() (#314) 2019-11-30 16:45:09 +09:00
Sukchan Lee 2cd9f496e2 This bug has already been fixed 2019-11-30 14:32:49 +09:00
Spencer Sevilla 5b59f09d9f ogs_assert to ogs_expects (#314)
* HACK: Don't retransmit InitialContextSetupReq

Related: #256

* HACK: Don't use buggy sa1p_copy()  in eNBConfigTransfer

Related: #257

* mme: don't reject with 'IMSI is unknown in HLR' (permanent reject)

* MME: Implement S6a result -> EMM cause code mapping

Closes: #263

* Spencer: modification to Haralds fix because macros are now renamed

* MME: don't assert on MAC failures of uplink NAS frames

Closes: #267

* MME: Avoid ogs_assert() in many situations

We don't want to crash the entire program just because a message
received from an external entity didn't match some of our expectations.

* compiles fine, checked DIFFs and only difference is the ogs_assert -> ogs_expect
2019-11-29 15:31:22 +09:00
Sukchan Lee 552045aa28 [#312] remove CS service notification in MT-SMS 2019-11-29 11:39:32 +09:00
Sukchan Lee 7b7acea59b Add IMEISV(MEI) in Create Session Request 2019-11-18 20:21:20 +09:00
Sukchan Lee 552305afe2 Add IMEISV Request 2019-11-18 19:34:28 +09:00
Sukchan Lee f3ccd71db0 [#263] map S6a diameter codes to EMM codes 2019-11-18 10:20:48 +09:00
Sukchan Lee a622feac84 [#256] Remove timer of NAS message related to S1AP 2019-11-18 09:04:10 +09:00
Sukchan Lee 835b3c9851 [#306] Refine static IP addresses 2019-11-17 17:43:36 +09:00
Sukchan Lee c8bcfffe2e [#258] All GTP message is fixed not to crash 2019-11-15 23:56:55 +09:00
Spencer Sevilla b994a8efbf Adding support for static IP assignment in HSS (#306) 2019-11-14 14:30:19 +09:00
Sukchan Lee cdbbbc500b [#258] Test done for receiving unknown TEID 2019-11-11 23:09:35 +09:00
Sukchan Lee b65d76d0b2 [#258] Support for receiving unknown TEID 2019-11-07 23:07:29 +09:00
Sukchan Lee f2e34dd7ff [#203] Now UE context is always single 2019-11-06 10:43:21 +09:00
Sukchan Lee 3743ef98a2 [#203] Fix the bug for maintaining single mme_ue context 2019-11-06 10:22:34 +09:00
Sukchan Lee 4b8e2a5c97 [#203] MME also maintains one session context like SGW/PGW 2019-11-05 23:15:57 +09:00
Sukchan Lee c131295dfb Fix the errata 2019-11-05 15:40:26 +09:00
Spencer Sevilla ee80d1f996 Log and print UEs/eNBs/sessions stats (#303) 2019-11-05 15:23:33 +09:00
Sukchan Lee e55c7f9174 Upgrade freeDiameter version to 1.3.2 2019-11-02 15:52:48 +09:00
Sukchan Lee 29e8a68dea remove SO_LINGER in usrsctp library 2019-10-31 18:13:49 +09:00
Sukchan Lee 9f1a5d19a4 Build with usrsctp source using MESON Subproject 2019-10-31 14:17:43 +09:00
Sukchan Lee 28f6d16ce2 refine usrsctp 2019-10-30 09:48:38 +09:00
Sukchan Lee 142763c280 Rename Project to Open5GS
- Change BuildTool to Meson
 - Many BUGS Fixed
2019-10-27 17:41:14 +09:00
Sukchan Lee 3c8af69805 Re-factoring the all library 2019-09-13 21:07:47 +09:00
Sukchan Lee b3f8bbb964 [#264] rollback ogs_expect_or_return() 2019-08-28 00:14:19 +09:00
Sukchan Lee 1f7647a04b [#266] Add LOG for debugging 2019-08-27 22:54:45 +09:00
Sukchan Lee 9c5f1334cb Use ogs_expect() 2019-08-27 22:51:30 +09:00
Sukchan Lee 848140bc90 [#264] change ogs_expect() 2019-08-27 22:47:06 +09:00
Vasil Velichkov c1a0f897b1 Fix buffer length calculation in s1ap_copy_ie
The aper_encode function returns the number of encoded bits and when
converting to bytes we should round up or use the ((.encoded + 7) / 8)
formula as described in per_encoder.h

Fixes: #257
2019-08-26 17:16:24 +03:00
Sukchan Lee 0aae608c5c Use the process interface instead of fork()
- CommandLine Options is also changed
 - PID File removed (Old-style daemon)
2019-08-25 20:15:20 +09:00
Sukchan Lee dff916551f [#256] Increse T3450 timeout to 6 sec 2019-08-18 00:35:04 +09:00
Harald Welte 25b5cec6ed mme: Fix ULA without Subscribed-RAU-TAU-Timer
The check for whether the AVP exists in the ULA was wrong, resulting in
the MME refusing to proceed without this AVP.  However, it is not a
mandatory AVP.
2019-08-15 18:49:06 +02:00
Sukchan Lee 8813e0a175 [#236] MME does mandate Subscribed-RAU-TAU-Timer 2019-07-30 20:58:45 +09:00
Sukchan Lee dac2bd2e4f [#240] WebUI changes to apply default value 2019-07-30 20:51:50 +09:00
Sukchan Lee 4f9a2e94fc
Merge pull request #240 from laf0rge/master
diameter spec compliance related fixes
2019-07-30 20:45:24 +09:00
Harald Welte 7915773900 mme: Subscribed-Periodic-RAU-TAU-Timer is in Subscriptio-Data
At least in version 11.8.0 Release 11 of 3GPP TS 29.272,
Subscribed-Periodic-RAU-TAU-Timer is only permitted inside
Subscription-Data.  Before this patch, the MME expects it outside, i.e.
on the "main" level of the DIAMETER AVP tree.

Closes: #238
2019-07-30 00:31:33 +02:00
Harald Welte 8dca1eacd8 mme: Apply default values for Pre-Emption Capability + Vulnerability
Section 7.3.40 of 3GPP TS 29.272 states default values to be used if
those AVPs are not present in the DIAMETER message.

Closes: #239
2019-07-30 00:23:55 +02:00
Sukchan Lee a3c5dcd190 [#231] Fix the NextEPC die in MT-Fallback 2019-07-28 15:09:23 +00:00
Sukchan Lee 470e66d37d [#235] TCP enabled for MacOSX 2019-07-28 20:18:51 +09:00
Sukchan Lee f5c5701b17 [#180] Fix EBI in the modify bearer request 2019-07-28 19:44:15 +09:00
Sukchan Lee dba1fcac5c Use asn1c library interface(CALLOC) for s1ap memory 2019-07-24 21:03:36 +09:00
Sukchan Lee d791f0034d [SGsAP] add MM-INFORMATION-REQUEST(Discard by Option2) 2019-07-21 22:52:28 +09:00
Sukchan Lee f19009c736 [#231] Hotfix for asn1c library
Workaround for asn1c library
- More than 9 ProtocolIE cannot be built from InitialContextSetupRequest
2019-07-21 22:39:23 +09:00
Sukchan Lee 78eeb1ad45 [#231] TAI-LAI configuration changed 2019-07-21 20:25:29 +09:00
Sukchan Lee a40d1dd2af [#231] sgsap configuration is changed
sgsap:
      addr: 127.0.0.2
      map:
        tai:
          plmn_id:
            mcc: 001
            mnc: 01
          tac: 4131
        lai:
          plmn_id:
            mcc: 001
            mnc: 01
          lac: 43691
2019-07-21 20:06:08 +09:00
Sukchan Lee 235121c82d [#231] Create simulator 2019-07-21 15:14:31 +09:00
Sukchan Lee 5e78b78166 [CSFB] Implement SGsAP UE-UNREACHABLE message 2019-07-21 13:08:21 +09:00
Sukchan Lee 9f4204ef8e [#227] Fix the crash when both EBT/PTI are 0 2019-07-21 12:20:26 +09:00
Sukchan Lee 60c0eff085 [#226] Protect Integrity in Security-mode Complete 2019-07-21 11:42:12 +09:00
Sukchan Lee d9238e3036 [#220] fix RACE-CONDITION for MESSAGE and TIMER 2019-07-21 07:01:45 +09:00
Sukchan Lee 649b6ec5e9 Add comment 2019-07-21 01:09:03 +09:00
Sukchan Lee ae3e59053d [#220] Timer for UE Context Release 2019-07-21 01:03:19 +09:00
Sukchan Lee 5ce04bcc6f [#220] T3489 done 2019-07-20 23:06:54 +09:00
Sukchan Lee 6a1f628e44 [#220] T3450 done 2019-07-20 22:30:53 +09:00
Sukchan Lee b34dafcb09 [#220] T3470 done 2019-07-20 21:49:47 +09:00
Sukchan Lee 90290d236e [#220] T3460 done 2019-07-20 21:28:36 +09:00