Commit Graph

3731 Commits

Author SHA1 Message Date
Sukchan Lee 4cb657c804 [MME] Changed CauseNas_detach in DETACH (#1676) 2022-08-06 14:00:54 +09:00
Sukchan Lee da20b2d035 [GTP] gtp_peer override the pool size of GTP node 2022-08-06 13:54:05 +09:00
Sukchan Lee 700c71ef4c Changed configuration name from gnb to peer
And restored gtp_peer configuration
2022-08-05 16:56:36 +09:00
Sukchan Lee f772bf3a62 [PFCP] Revert Changes 5e18b2b and d21e9aa
To protect malicious or buggy, we need to check that session context is NULL.
2022-08-04 09:55:17 +09:00
Sukchan Lee cca3027e90 [NRF] Fixed the nfInstanceUri (#1683) 2022-08-03 17:32:15 +09:00
Sukchan Lee e88c43e8df [Diameter] Fixed Coding convention (#1680) 2022-08-03 14:34:21 +09:00
jmasterfunk84 415e5276ba [MME+HSS] AVP Occurring Too Many Times
Do not Set Origin-Hosts with fd_msg_rescode_set before potential use of ogs_diam_message_experimental_rescode_set.  This results in multiple Origin-Host/Realm AVPs.
2022-08-03 14:32:57 +09:00
Sukchan Lee d21e9aa5e0 [PFCP] Revert Changes 5e18b2b 2022-08-03 14:13:35 +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 7031856cd7 [MME] Changed S1AP_Cause in S1AP Release (#1676)
S1AP_CauseNas_detach -> S1AP_CauseNas_normal_release
2022-07-31 12:38:11 +09:00
Sukchan Lee 5524dc5e29 Refact paging module (#1676) 2022-07-30 14:44:34 +09:00
jmasterfunk84 47cbaca149 [MME] Introduce support for S6a Cancel Location Request
- Added diameter dictionary definitions for Cancel Location
- Cancel Location will completely remove UE from MME, allow for a fresh IMSI attach to occur on next attempt.
- T3422 is used for detach request.
- Added new handling for s6a events in mme-sm, as not all s6a messages are at attach now.  Maybe there's something in a state machine I should've been using here instead of a new flag?

- Testing was completed with UE in idle and connected.  With CLR flags indicating re-attach required and without.  Also sending CLR after UE detach.  And then sending again when mme_ue is empty.
2022-07-30 14:37:43 +09:00
Sukchan Lee ff5023e95b Release v2.4.9 2022-07-25 21:50:06 +09:00
Sukchan Lee 9b762158a6 Refine code of discovery option param (#1671) 2022-07-24 19:47:04 +09:00
Sukchan Lee 4e8492e878 Oops! Warning removed! 2022-07-24 15:15:06 +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
jmasterfunk84 eb03704015 Moving handling of assigning sub level cc into the pdn to s11. 2022-07-24 12:29:01 +09:00
jmasterfunk84 68140efce4 [MME] Handle Charging Characteristics
Found no support for HSS provided charging characteristics.  Following TS32.251 A.4:
- Use PDN level CC, if one wasn't provided then use subscription level CC
- Don't send CC in S11 if it wasn't included
2022-07-24 12:29:01 +09:00
jmasterfunk84 d2ef555ce4 Set default Network-Access-Mode to 0
For HSS's which do not include the NAM, the MME should not treat this as a fatal error.  MME should just assume PACKET_AND_CIRCUIT (0), as was decided in a previous PR.
2022-07-23 00:26:55 +09:00
Bostjan Meglic 7e6568d800 [SMF] Send PDU Session Establish Accept to serving AMF
In case there are multiple AMF registered to NRF, SMF would pick only
the first AMF from the list.
In the case of sending PDU Session Establishment Accept from SMF to
AMF, this would mean a high chance of failure since the AMF might
be different than the original requester, and would not know about a
particular UE.

Modify SMF to use ServingNfId field from original request
SmContextCreateData from AMF to determine to which AMF should it send
PDU Session Establishment Accept message.
2022-07-22 12:24:26 +09:00
Bostjan Meglic 9a958d7af8 [SBI] Add function to request NF Instance from NRF by providing it's Instance Id 2022-07-22 12:24:26 +09:00
Bostjan Meglic 83b28b5649 [tests] Fix running unit tests inside docker environment
The issue was introduced with the commit, which builds Open5GS from
local sources instead of downloading them each time from Github.

Fixes: d2cbcf711 ("[build] Use local sources to build applications (#1583)")
2022-07-21 21:07:35 +09:00
Sukchan Lee eb50d64271 Add more protection code for (#1652) 2022-07-21 17:13:32 +09:00
Sukchan Lee 9aa5559c5f Refactor for the UERANSIM 500 test (#1652) 2022-07-21 12:41:19 +09:00
Sukchan Lee f35afa2ff7 Add missing pkbuf_free() (#1652) 2022-07-21 01:00:44 +09:00
Sukchan Lee 776103698d Oops! Redundant code is removed (#1652) 2022-07-21 00:35:08 +09:00
Sukchan Lee 2b41a215d7 Fixed the crash in UERANSIM 500 test (#1652) 2022-07-21 00:02:31 +09:00
Sukchan Lee da1905b36c fixed the memory leak in test program 2022-07-20 12:08:17 +09:00
Sukchan Lee fb95f1ff71 Fixed ASSERT when context has already been removed 2022-07-19 19:42:24 +09:00
Sukchan Lee 668cc59f94 [AMF] Fixed 5GMM cause in Reject message (#1660)
When a UE that requests slices tries to connect and there are no slices configured, the reject message is:

5GMM cause = 0x7 (5GS Services not allowed)

however it should be:

5GMM cause = 0x3e (No network slices available)

All 5GMM cause value in reject message is reviewed in this commit
2022-07-19 12:42:02 +09:00
Sukchan Lee 3885cb20d9 [asn1c] rework aper from mouse07410/asn1c#94
Merge @pespin the following work
- mouse07410/asn1c#93
- mouse07410/asn1c#100
2022-07-16 14:30:00 +09:00
Sukchan Lee 5e18b2bd13 [SCP] Support of Indirect Communication 2022-07-16 13:27:18 +09:00
Sukchan Lee 1518a4f334 [CORE] Increased memory pool for poll (#1652) 2022-07-13 16:54:55 +09:00
Sukchan Lee 80ee4c8aa8 [SBI] incrased session pool of server (#1652) 2022-07-12 17:31:36 +09:00
Bostjan Meglic aa3cded11a [AMF] Handle namf-callback DeregNotify message from UDM
UDM may send a Deregistration Notification to AMF, to deregister
specific UE from the network - Network-Initiated Deregistration.
Deregistration procedure includes sending Deregistration Request to UE,
starting a timer T3522, releasing PDU sessions from SMF, releasing PCF
policies from PCF, and waiting for Deregistration Accept from UE.

Not yet implemented is:
- to prevent deregistration of UE in case it has any emergency sessions,
- page UE when UE is in IDLE mode.
2022-07-11 22:53:21 +09:00
Bostjan Meglic 0633774972 [SBI] Add support for DeregistrationData in SBI messages 2022-07-11 22:53:21 +09:00
Bostjan Meglic d1a2971990 [NAS] modify library to include both directions of deregistration requests
Definitions in NAS library now include both directions of deregistration
requests/accepts - from UE and from network.
2022-07-11 22:53:21 +09:00
Bostjan Meglic babc30940a [AMF] Do not send Deregistration Event to UDM when UE deregisters
According to TS 23.502, 4.2.2.2.2, AMF sends Registration event to UDM
in the following cases:
- If the AMF has changed since the last Registration procedure, or
- if the UE provides a SUPI which doesn't refer to a valid context in
the AMF,
- or if the UE registers to the same AMF it has already registered
to a non- 3GPP access (i.e. the UE is registered over a non-3GPP access
and initiates this Registration procedure to add a 3GPP access).

In case that UE re-registers to the network with a GUTI, it bypasses
authentication check to the AUSF. In this case, AMF does not send
Registration event to UDM.
Consequently, when UE deregisters again, AMF would send a Deregistration
Event to a UDM, which does not have a context for it.

3GPP standard does not say when AMF sends Deregistration Event to UDM,
only that it is optional.

These (De-)Registration events are for (de-)registering AMF to the UDM
for serving the UE. And not for (de-)registering UE itself for purpose
of tracking when UE is registered on the network.

This partially reverts commit 7be7029ac4
2022-07-11 22:44:07 +09:00
Sukchan Lee fce0eb4800 [SBI] fixed wrong request-nf-type (#1650) 2022-07-08 21:36:52 +09:00
Oliver Smith fe11ee161c d/open5gs-upf.postinst: don't restart service in chroot
Don't attempt to restart systemd-networkd if systemd is not running
(e.g. installing open5gs inside a chroot).

Fix for:
  System has not been booted with systemd as init system (PID 1). Can't operate.
  Failed to connect to bus: Host is down
  dpkg: error processing package open5gs-upf:amd64 (--configure):
   installed open5gs-upf:amd64 package post-installation script subprocess returned error exit status 1
2022-07-05 10:22:36 +09:00
Sukchan Lee eabe8dfec5 [PFCP] Added UE IP address in the EPC (#1642) 2022-07-04 17:37:00 +09:00
Networkmama 29525b21a4 [SMF] copy UE ip address to uplink PDR rules.
This helps UPF to add ACL based on src ip

Signed-off-by: Networkmama <networkmama12@gmail.com>
2022-07-04 17:34:40 +09:00
Sukchan Lee af4021bff4 [PFCP] Fixed a endianness Apply Action (#1640) 2022-07-04 17:30:19 +09:00
Sukchan Lee 318fc25535 [CORE] Added memory check (#1638) 2022-07-01 21:49:31 +09:00
Bostjan Meglic 6adf541346 [CORE] Fix detection of a failed memory allocation 2022-07-01 21:38:47 +09:00
Bostjan Meglic ab11220dcc [ALL] Fix differences in function parameter names between definition and declaration 2022-07-01 21:38:47 +09:00
Bostjan Meglic 114f783d06 [MISC] Add support for static code analysis
Static code analysis can be executed with following commands:
  meson build
  ninja -C build analyze-cppcheck
  ninja -C build analyze-clang-tidy

These commands are available only if additional tools are installed:
  - cppcheck
  - clang-tidy
  - clang-tools is optional if you want to paralelize the clang-tidy

In case of cppcheck analysis, a file called build/cppchecklog.log is
created with the analysis results.

In case of clang-tidy analysis, some checks are disabled. See file
.clang-tidy, and reenable them if you see fit.
Also it does not scan all the files in the project, since some of them
are imported from other sources. It does not scan any sources under:
  - subprojects/
  - lib/asn1c/
  - lib/ipfw/
2022-07-01 21:38:47 +09:00
Sukchan Lee 50be661cf9 Fixed a crash when slice/session overflow (#1637) 2022-06-30 13:33:16 +09:00
Sukchan Lee ad159d1755 [GTP] Refine error code path without assertion
Refer to #1635, #1620, #1606, #1594
2022-06-30 10:53:19 +09:00
Sukchan Lee b1d982a1ee [PFCP] Refine error code path without assertion
Refer to #1635, #1620
2022-06-30 10:35:03 +09:00