Commit Graph

76 Commits

Author SHA1 Message Date
Sukchan Lee 433d5f6bf3 Distinguish the type of session creation 2022-04-14 17:34:55 +09:00
Pau Espin e3da7c9934
Rename GTPv2C specifics to gtp2 prefix (#1485)
In the past only GTPv2C was supported, and had the "gtp" generic prefix.
Later on, GTPv1C support was added, and "gtp1" prefix was used.
Let's move GTPv2C specific bits to have "gtp2" prefix too, and leave
"gtp" prefix for generic stuff among different GTP versions.
2022-04-13 07:07:39 +09:00
Sukchan Lee 41553de7a4 [MME] Exception handle - APN duplicated (#1431) 2022-03-24 21:52:42 +09:00
Sukchan Lee bcf53124d5 Improve the socket option configuration (#1404)
o GTP-C Option (Default)
  - so_bindtodevice : NULL

  gtpc:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o GTP-U Option (Default)
  - so_bindtodevice : NULL

  gtpu:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o PFCP Option (Default)
  - so_bindtodevice : NULL

  pfcp:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o SBI Option (Default)
  - tcp_nodelay : true
  - so_linger.l_onoff : false

  sbi:
    addr: 127.0.0.10
    option:
      tcp_nodelay: false
      so_linger:
        l_onoff: true
        l_linger: 10

o NGAP Option (Default)
  - sctp_nodelay : true
  - so_linger.l_onoff : false
ngap:
  addr: 127.0.0.5
  option:
    stcp_nodelay: false
    so_linger:
      l_onoff: true
      l_linger: 10

o NGAP SCTP Option (Default)
  - spp_hbinterval : 5000 (5secs)
  - spp_sackdelay : 200 (200ms)
  - srto_initial : 3000 (3secs)
  - srto_min : 1000 (1sec)
  - srto_max : 5000 (5secs)
  - sinit_num_ostreams : 30
  - sinit_max_instreams : 65535
  - sinit_max_attempts : 4
  - sinit_max_init_timeo : 8000(8secs)
ngap:
  addr: 127.0.0.5
  option:
    sctp:
      spp_hbinterval : 5000
      spp_sackdelay : 200
      srto_initial : 3000
      srto_min : 1000
      srto_max : 5000
      sinit_num_ostreams : 30
      sinit_max_instreams : 65535
      sinit_max_attempts : 4
      sinit_max_init_timeo : 8000
2022-03-15 22:03:50 +09:00
Sukchan Lee 896370c2e4 [MME] Oops! Remove redundant warning (#1411) 2022-03-04 23:49:45 +09:00
Sukchan Lee b4f382d360 [MEM] fix pkbuf problem in multi-threads (#1353)
We should use talloc in multi-threads instead of pkbuf.
Now, pkbuf library only uses single-thread environment.
2022-02-19 09:47:44 +09:00
Kenny Barlee 1a691e1d4a
change reject cause to 11 (#1281) 2021-12-08 20:57:54 +09:00
Sukchan Lee 0ea2142ba6 [MME] fix the crash bug (#1205)
If UE is in Authentication-EMM State and eNB is disconnected,
MME could be crashed.
2021-11-06 22:39:09 +09:00
Sukchan Lee 873cf398c7 [ALL] Add protection of message encoding (#991)
All process will be forcely exited if it failed to encode the S1AP/NGAP/GTP/PFCP message. It is to make sure there was no problem with the encoding of open5gs.
2021-05-16 12:22:10 +09:00
Sukchan Lee dcfc9ef803 [AMF/MME] Add retransmission for accept message
Registration accept with GUTI
Attach accept
Tracking area update request with GUTI
2021-04-23 15:16:18 +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 ada01fca8f spec: S1AP/NGAP update to v16.4.0(2021-01-04) 2021-01-24 23:43:42 -05:00
Sukchan Lee 80e337b465 fix: update to avoid MME crash (#721) 2021-01-07 23:01:02 -05:00
Sukchan Lee c9cfc4cf6e etc: update debug message 2021-01-04 23:24:22 -05:00
Sukchan Lee 6f11a78079 If SCTP use SOCK_STREAM, Use BUFFERING method.
Most of the time, an application wants to perform some amount of data buffering
in addition to just responding to events. When we want to write data,
for example, the usual pattern runs something like:

1. Decide that we want to write some data to a connection;
   put that data in a buffer.
2. Wait for the connection to become writable
3. Write as much of the data as we can
4. Remember how much we wrote, and if we still have more data to write,
   wait for the connection to become writable again.

Now, Open5GS implements the above method by default when transmitting data
in a stream type socket.
2020-11-11 13:21:32 -05:00
Sukchan Lee f1a207fd9b Support VoLTE service in ECM-IDLE 2020-11-07 17:27:12 -05:00
Sukchan Lee 3fef5848b8 Oops! Fix the PDN connectivity reject handler #568 2020-11-01 00:54:32 -04:00
Sukchan Lee 5fd6dac961 Change handling the PDU connectivity reject #568
If MME received the PDU connectivity reject, MME will not release UE
context to accept further service request
2020-10-31 22:42:49 -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 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 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 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 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 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 160490483a Fix the many UEs issues [#551] 2020-09-07 22:02:45 -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 d9743286c5 Add PDU Session Release [#488] 2020-07-02 01:50:23 -04:00
Sukchan Lee 72370ff0b2 Add AUSF, UDM, and UDR 2020-06-04 14:12: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 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
Sukchan Lee 5009876c16 P-GW respond to DIAMETER error from PCRF(#403) 2020-04-18 13:07:06 -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 0891ee5b19 For safety, check TEID presence in GTP 2020-01-01 20:17:46 +09:00
Sukchan Lee d191a5135e Add Bearer Resource Modification feature (#336) 2019-12-28 21:46:30 +09:00
Sukchan Lee 636170e0da Review ogs_expect() (#314) 2019-11-30 16:45:09 +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 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 c8bcfffe2e [#258] All GTP message is fixed not to crash 2019-11-15 23:56:55 +09:00