Commit Graph

1911 Commits

Author SHA1 Message Date
Sukchan Lee 832ab156e9 Revert "Revert "Functionality for send sms with using IMS service. (#1477)""
This reverts commit b732d7bcc5.
2022-04-09 00:45:37 +09:00
Sukchan Lee 0b3df3e3db Revert "Introduce Gy interface (#1471)"
This reverts commit 106f2729c3.
2022-04-09 00:45:26 +09:00
Sukchan Lee b5ad0feffc Revert "[Gy] use WARN log-level if No Gy Diameter Peer"
This reverts commit 05551f120f.
2022-04-09 00:45:14 +09:00
Sukchan Lee b732d7bcc5 Revert "Functionality for send sms with using IMS service. (#1477)"
This reverts commit aa6368132e.
2022-04-09 00:42:43 +09:00
Sukchan Lee 05551f120f [Gy] use WARN log-level if No Gy Diameter Peer 2022-04-09 00:39:21 +09:00
Pau Espin 106f2729c3
Introduce Gy interface (#1471)
TODO:

* Use an event for the report, like SMF_EVT_N4_TIMER?

*  Properly set Service identifier in Gy CCR

* SMF: Properly set pkt/octet volumes in Gy CCR
** Update when receiving PFCP Modify Response.

* Figure out best way to require Gy through config file in open5gs-smfd.

* Create a new sess-sm.c which handles smf_sess_t state through
  Gx+Gy+PFCP creation, modification and tear down. This way we can do
stuff in parallel, for instance Gx+Gy. It will alsoavoid duplicating
some code paths due to Gy being optional.
2022-04-09 00:08:58 +09:00
EugeneBogush aa6368132e
Functionality for send sms with using IMS service. (#1477)
* Update

* update

* Update

* update

* new version of profile for send sms

* update

* update

Co-authored-by: root <root@lfv.unassigned-domain>
Co-authored-by: eug <eug@lfv.unassigned-domain>
2022-04-08 23:20:06 +09:00
Pau Espin fb8ebcdbea
[UPF] Add initial support for URR Usage Report (#1476) 2022-04-08 23:10:42 +09:00
Pau Espin 0df2e9f0ba
[UPF] cosmetic: Fix trailing whitespace (#1473) 2022-04-08 21:12:52 +09:00
Pau Espin 8286b1c417
[SMF] Gx: Fix crash receiving DIAMETER_UNABLE_TO_DELIVER (#1469) 2022-04-06 23:57:55 +09:00
Pau Espin 5be48be634
[SMF] Gx: Prevent sending Gx messages to non-PCRF Diameter peers (#1468) 2022-04-06 20:48:26 +09:00
Sukchan Lee 110a63fdfa [SMF] Handle for PCRF not to respond (#1445) 2022-04-03 22:49:12 +09:00
Sukchan Lee e213f65406 Improve data-path performance using talloc_pool()
allocate a talloc pool for GTP to ensure it doesn't have to go back
to the libc malloc all the time.
2022-04-02 13:36:23 +09:00
Sukchan Lee 3121d183f0 [HSS/PCF] Store IMEISV instead of IMEI (#1464) 2022-04-02 00:46:05 +09:00
EugeneBogush f557fc8eaa
Add/update current imei of UE in subscriber profile (#1464)
* first commit

* fix

Co-authored-by: root <root@lfv.unassigned-domain>
2022-03-31 19:35:30 +09:00
Sukchan Lee 88016a769f [SMF] fix missing initialization memory (#1458) 2022-03-28 22:22:24 +09:00
Pau Espin acd6610508
[SMF] Gx: Add Destination-Host AVP to CCR (#1458)
Catch Origin-Host during CCA and set it as Destination-Host during
subsequent CCRs. This way we ensure UPDATE/TERMINATION Requests are sent
back explicitly to the same Diameter peer. Moreover, it seems
freediameter relies on this AVP to properly send the message over the
correct SCTP association when several diameter peers are available.
2022-03-28 22:00:28 +09:00
Sukchan Lee 12c656efd0 Improve Slice/DNN selection (#1438), (#1440) 2022-03-27 17:50:31 +09:00
Sukchan Lee ced37a6201 fix the slice issues (#1438), (#1440) 2022-03-26 23:53:53 +09:00
Sukchan Lee 41553de7a4 [MME] Exception handle - APN duplicated (#1431) 2022-03-24 21:52:42 +09:00
Sukchan Lee 224d1caca1 change log-level WARNING to INFO 2022-03-22 22:52:10 +09:00
Sukchan Lee 37af21a88d [MEM] fix the pkbuf problem (#1431) 2022-03-22 22:47:45 +09:00
Pau Espin ab5f47ef59
[SMF] PFCP Session Report Req: Allow receiving multiple bits in Report Type (#1442)
3GPP TS 29.244 sec 8.2.21 "Report Type" states:
At least one bit shall be set to "1". Several bits may be set to "1".
2022-03-17 16:23:43 +09:00
Sukchan Lee 72ecd1c005 [SMF] Remove T_RELEASE_HOLDING timer 2022-03-17 16:07:19 +09:00
Pau Espin 7f6f35fe6f
[UPF] Improve logging around IP spoofing (#1441)
* [UPF] Fix Trailing whitespace

* [UPF] Improve logging around IP spoofing

Related: https://github.com/open5gs/open5gs/issues/1435
2022-03-16 21:59:50 +09:00
Sukchan Lee bf77318602 [MME] re-factor to check a piggybacked ESM (#1431) 2022-03-16 20:48:48 +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
Pau Espin 73836c063c
[UPF] Fix log typo, trailing whitespace (#1434) 2022-03-15 13:34:32 +09:00
Sukchan Lee a1be48ed50 [SGW-C] fix the crash (#1353) 2022-03-05 11:27:22 +09:00
Sukchan Lee 896370c2e4 [MME] Oops! Remove redundant warning (#1411) 2022-03-04 23:49:45 +09:00
Sukchan Lee 9bf8a84b81 [SGWC] fix the crash (#1353) 2022-03-05 02:58:53 +09:00
Sukchan Lee 79e34260da [SGWC] fix the crash (#1353) 2022-03-03 23:17:28 +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
Pau Espin d06acc7f37
Fix trailing whitespace (#1402) 2022-03-01 17:13:40 +09:00
Supreeth Herle bc69ddfc6d
[SMF]: Fix Framed-IPv6-Prefix AVP length in CCR (#1398) 2022-03-01 17:11:28 +09:00
Sukchan Lee d54e8a43ce [PCRF] Fix Framed-IPv6 Prefix in CCR (#1398) 2022-03-01 17:09:47 +09:00
Pau Espin ba3a046c62
[SMF] Avoid crash if smf_ue_pool is full (1024 UEs) (#1397) 2022-02-28 21:27:27 +09:00
Supreeth Herle 03280d1f5a
Fix prefix length in Gx CCR Framed-IPv6-Prefix AVP (#1396)
As per 3GPP TS 23.401 version 15.12.0, section 5.3.1.2.2
The PDN GW allocates a globally unique /64
IPv6 prefix via Router Advertisement to a given UE.

After the UE has received the Router Advertisement message, it
constructs a full IPv6 address via IPv6 Stateless Address
autoconfiguration in accordance with RFC 4862 using the interface
identifier assigned by PDN GW.

For stateless address autoconfiguration however, the UE can
choose any interface identifier to generate IPv6 addresses, other
than link-local, without involving the network.

And, from section 5.3.1.1, Both EPS network elements and UE shall
support the following mechanisms:

/64 IPv6 prefix allocation via IPv6 Stateless Address
autoconfiguration according to RFC 4862, if IPv6 is
supported.
2022-02-26 15:25:08 +09:00
Pau Espin 51a75cde26
Pespin/pr (#1395)
* [SMF] Gn: Avoid assert crash if no PDP resources available

* [SMF] Gn: Rearrange IE handling order in CreatePDPContextRequest

Let's handle the GTPC remote addr + TEID first, since those should be
used in the CreatePDPContextResponse ideally if available.

Let's then handle parsing of all IEs not related to bearers/UserPlane,
then those missing, and finally do all the IP resource allocation.
2022-02-25 22:39:44 +09:00
Supreeth Herle 52bc4be547
Bugfix packet filter for pre rel11 LTE devices (#1393)
* Fix conversion from IPFilterRule to packet filter

As per 3GPP TS 24.008, following Packet filter component type identifier
are not supported on the LTE pre release-11 UEs:

IPv4 local address type
IPv6 remote address/prefix length type
IPv6 local address/prefix length type

And,
IPv6 remote address/prefix length type and
IPv6 local address/prefix length type shall be used when both MS and
Network support Local Address in TFTs.

This commit add logic to omit adding local address in packet filters
for compatibility with pre-release LTE 11 devices. The following parameter
could be used to toggle omit/no to omit behavior.

parameter:
	no_ipv4v6_local_addr_in_packet_filter: <true/false>

* Remove logic of supporting pre-release LTE 11 devices in PCRF
2022-02-25 22:11:51 +09:00
Pau Espin 3833a73a14
[SMF] incorrect GTPv1C cause with changed APN (#1387) 2022-02-23 20:48:36 +09:00
Sukchan Lee 953a7321c6 [SMF] fix the crash in VoLTE test (#1383) 2022-02-23 20:31:28 +09:00
Pau Espin 5ad1b188e4
[SMF] UpdatePDPContext: forward update of remote TEID+IPaddr to UPF (#1383)
* [SMF] typo fixes in commented code

* [SMF] Fix early err return handling UpdatePDPContextRequest

* [SMF] UpdatePDPContext: forward update of remote TEID+IPaddr to UPF

Updating the remote GTP-U IP address and/or TEID on the GGSN is a common
practice, used for instance by an SGSN in a UTRAN network to connect an
HNB(GW) to exchange GTP-U directly with the GGSN. It is also used in
general when doing handovers.
When receiving a UpdatePDPContext with the new address, we need to
forward the update to the UPF so that it takes it into account when
forwarding packets.

This patch only implements updating the information towards the UPF when
GTPv1C is used. Similar approach for GTPv2C (upon receival of Modify
Bearer Request) is still unimplemented.

Related: https://github.com/open5gs/open5gs/issues/1367
2022-02-23 20:21:33 +09:00
Sukchan Lee af3db1770f [SMF] incorrect GTP cause with changed APN (#1360)
SMF setting incorrect Cause when answering
with a changed APN type IPv4v6 ->IPv4/IPv6
2022-02-23 20:16:04 +09:00
Sukchan Lee d61127afcc [SMF] fix the seperate DNS in PCO IPCP (#1358) 2022-02-23 17:38:07 +09:00
Pau Espin 882548de11
[SMF] UpdPDPCtxRsp: Fix adding 2 IP addresses to one GSN Address IE (#1382)
In the event we have 2 local IP addresses available for use, put the one
having same IP version in "GGSN Address *" IE, and the one with the
other IP version in "Alternative GGSN Address *" IE.

Same fix was applied recently to CreatePDPContextResponse.
2022-02-22 07:00:14 +09:00
Pau Espin b7698810ac
[SMF] s/'Context not found'/'Non-existent'/ in {Update,Delete}PdpContextResponse (#1379)
TS 29.060 sections 7.3.4 and 7.3.6 specify the possible cause values for
UpdatePdpContextResponse and DeletePdpContextResponse.
Together with section 8.2, it becomes clear that 'Non-existent' cause
should be sent instead of 'Context not found' one in those cases.
2022-02-21 22:18:39 +09:00
Sukchan Lee 420c1d5ad3 [SMF] fix the PCO bug (#1357, #1358)
- SMF can handle PCO ID PAP (0xc023)
- SMF adds DNS servers to PCO IPCP only if UE requested
2022-02-19 16:05:07 +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
Pau Espin 137ed99dd5
[GTPv1C] Send conditional IE Reordering Required in CreatePDPCtxResp (#1374)
It seems to be actually mandatory in GGSN->SGN directon, though it is
ignored in Release99 upwards. Let's hardcode it to 0 for now, should be
fine in the majority of cases.
2022-02-19 06:36:54 +09:00
Pau Espin 2056a5b500
[PCRF] Fix trailing whitespace (#1372) 2022-02-19 06:33:46 +09:00
Pau Espin 8b1bdf42a2
[SMF] Fix adding 2 IP addresses to one GSN Address IE (#1371)
In the event we have 2 local IP addresses available for use, put the one
having same IP version in "GGSN Address *" IE, and the one with the
other IP version in "Alternative GGSN Address *" IE.
2022-02-19 06:33:19 +09:00
Pau Espin 8cc70694db
Introduce Gn interface (GTPv1C) Support to PGW (#1351)
* [CORE] tlv: Store mode in ogs_tlv_t

This allows specifying the format of the IE for each individual IE,
hence allowing messages containing IEs formatted in different ways.

This is needed in order to support parsing GTPv1-C, since messages
contain IEs with different structure (TLV vs TV). Hence, this is a
preparation patch to add support for parsing TVs in ogs-tlv.c/.h.

* [CORE] tlv: Support parsing msg with both TLV and TV in it

IEs of type TV are sometimes used in GTPv1-C. Current tlv parser/builder
doesn't provide with ways to parse messages which contain TV formatted
IEs. This patch adds the relevant types and ways to encode/decode them.

Furthermore, the current parser/builder allows parsing/building messages
containing the exact same format in all its IEs. A new parser function
is added which allows parsing messages of different types (TV, TLV)
mixed in the same message. In order to be able to do so, it uses the
general msg_mode passed to it in order to know the general TLV format
(in essence, the length of the Tag field, and also the length of the
Length field if applicable each IE).

Looking up the instance in the TLV description is left undone and
hadcoded to 0, since the only user so far requiring this API is GTPv1-C,
which has no instances.

* [CORE] tlv: Support repeated tag+instance parsing TLV message

In GTPv2C, repeated IEs (same tag) are easily differentiated by the
Instance byte, which provides info to match different decoded
structures. In GTPv1C though, there's no Instance byte, and we still
encounter repeated IEs (like GSN Address in Create PDP Context Request).
Hence, the TLV decoder needs to be updated to track count of IEs found
(identified by tag+instance, where instance is always 0 in GTPv1C) and
get the proper description index + offset into the decoded structure.

* [GTP]: Move GTPv2-C specifics to its own libgtp subdir

This will allow adding GTPv1-C code by the side. Most GTPv2 code is left
in this patch as "gtp" instead of renaming it to "gtp2" in order to
avoid massive changes. It can be done at a later stage if wanted.

* [GTP] Support generating GTPv1-C messages

* [SMF] Add Gn interface support

This patch introduces GTPv1C support to open5gs-smfd. With it,
open5gs-becomes a GGSN too, where SGSN can connect to, hence supporting
GERAN and UTRAN networks.
2022-02-18 22:23:45 +09:00
Sukchan Lee 3eab4be135 fix MacOSX compile error (#1354, #1355) 2022-02-18 22:00:57 +09:00
Pau Espin 757285bf25
Fix trailing whitespace (#1365)
* [SMF] Fix trailing whitespace

* [CORE] Fix trailing whitespace

* [GTP] Fix trailing whitespace
2022-02-14 20:11:04 +09:00
Sukchan Lee 906e7c5046 [UPF] Consider RS message for IP spoofing (#1354) 2022-02-14 20:07:08 +09:00
Sukchan Lee 0e1ab26ee5 Check if Source IP address spoofing (#1354, #1355) 2022-02-14 17:34:22 +09:00
Pau Espin 5fff69306f
logging improvements (#1348)
* [SMF] Fix typo in debug message

* [SMF] Add debug messages to follow messages received in N4
2022-02-02 23:23:12 +09:00
Sukchan Lee a7d164c28d [NRF] fix the crash (#1347)
`reqNfInstanceId` is optional in the Subscription.
So, we need to consider it.
2022-01-31 23:19:26 +09:00
Sukchan Lee 83d56fe40d [ALL] Fix the memory leak (#1282) 2022-01-31 22:58:52 +09:00
Sukchan Lee 340b23af94 [SMF] Fixed case without transportLayerAddr(#1341)
Fixed the crash if TransportLayerAddress in GTPTunnel does not exist
2022-01-26 08:09:26 +09:00
Sukchan Lee 3b275edec7 [SBI] Remove one octet length in FQDN (#1333) 2022-01-23 13:49:03 +09:00
Sukchan Lee 866ae78f5e [NRF] fix the crash for invalid FQDN (#1333) 2022-01-22 09:34:38 +09:00
Sukchan Lee 8955fdcd5d [SBI] FQDN bug from talloc (#1328) 2022-01-19 17:10:39 +09:00
Pau Espin b3ac5b35eb
[SMF] Fix potential null pointer dereference (#1324)
* [SMF] Fix potential null pointer dereference

Pointer "sess" was first dereferenced and later on checked for nullness.
This is clearly wrong. Rearrange the code path to make sure the check is
done first, then dereferenced.

* gitignore: Add subprojects/libtins

* cosmetic: Fix whitespace
2022-01-18 11:23:40 +09:00
Sukchan Lee 79239d8eff [IMPORTANT] changed network_access_mode: 0 (#1323)
The network access mode of HSS has been changed to 0 (Packet and Circuit).

Versions of MME prior to v2.4.2 did not use this value. Open5GS set
the attach result of Attach Complete message as it is by looking
at the attach type of the Attach Request message.

Now, if the network access mode of HSS is set to 2 (Only Packet),
this value is affected by MME from v2.4.3. Regardless of the attach type
of the Attach Request, the MME will set EPS Only to the attach result
of Attach Complete.
2022-01-16 12:35:55 +09:00
Sukchan Lee bbd1412a9e [SMF] change log-level from WARN to ERR (#1313) 2022-01-12 20:06:26 +09:00
Sukchan Lee cfd0193bbd [PCRF] fix the crash in flow->description (#1313) 2022-01-12 10:15:36 +09:00
Sukchan Lee 715e4c0b50 Shall cipher in the NAS message container IE
3GPP TS 24.501 version 16.6.0 Release 16
4.4 NAS security
4.4.6 Protection of initial NAS signalling messages

1) the UE needs to send non-cleartext IEs in a REGISTRATION REQUEST
or SERVICE REQUEST message, the UE includes the entire REGISTRATION
REQUEST or SERVICE REQUEST message (i.e. containing both cleartext IEs
and non-cleartext IEs) in the NAS message container IE and shall cipher
the value part of the NAS message container IE. The UE shall then send
a REGISTRATION REQUEST or SERVICE REQUEST message containing
the cleartext IEs and the NAS message container IE;
2022-01-05 22:39:06 +09:00
Sukchan Lee b988e7edce Use talloc for all memory pool (#1263) 2022-01-04 08:29:18 +09:00
Sukchan Lee 49d9ed03c7 [MME] fix the crash (#1263)
- Change memory pool using talloc library
- Apply ASN1 with r16.7.0
2021-12-28 17:38:11 +09:00
Sukchan Lee a0f2535cb5 A crafted packet from UE can crash SGW-U/UPF 2021-12-22 20:55:48 +09:00
Sukchan Lee 6f62839ad3 [MME] apply coding convention (#1295)
- limit 80 column
- Use space instead of tab
2021-12-20 23:25:04 +09:00
EugeneBogush ead9f380a9
update s1ap_handle_e_rab_setup_response (#1295)
* Update s1ap-handler.c

* Update s1ap-handler.c

* update for parse e_rab_setup_response

* Update s1ap-handler.c

* Update s1ap-handler.c

* Update s1ap-handler.c
2021-12-20 23:21:29 +09:00
Sukchan Lee d87d7c12c2 [MME] fix the crash with unknown S-NSSAI (#1287) 2021-12-17 21:42:26 +09:00
Sukchan Lee 54b919f65f Remove error message (#1294) 2021-12-17 20:51:11 +09:00
Supreeth Herle 1d496e92cd
[SMF] Use fe80::1 if link-local address is not available (#1294) 2021-12-17 20:48:22 +09:00
Kenny Barlee d02507e90a
print cellID in hex for consistency (#1292) 2021-12-17 11:37:36 +09:00
Sukchan Lee a3166ab537 Find link-local address in SMF-All address (#1291) 2021-12-17 11:33:54 +09:00
Supreeth Herle 232c387276
[SMF] Fix router advertisement as per rfc 4861 (#1291)
As per RFC 4861 Router advertisement message
format, Source Address MUST be the link-local address
assigned to the interface from which this message is sent.

Since SMF was not sending it as per RFC, certain
phones were not completing the procedure of stateless
IPv6 address autoconfiguration mentioned in
3GPP TS 23.401 version 15.12.0 Release 15, section 5.3.1.2.2
2021-12-17 10:38:37 +09:00
Sukchan Lee e302f727fd [Cx] Fix the HSS crash (#1264)
Use Visited-Network-Identifier(Cx) instead of Visited-PLMN-ID(s6a)
2021-12-12 14:33:42 +09:00
Sukchan Lee 07a61018b2 [AMF] fix the crash (#1280)
During PDU Session Establishment,
if gNB sends PDUSessionResourceReleaseResponse,
AMF was crashed.

In this case, AMF/SMF remove Session Context and sends ErrorIndication.
2021-12-11 20:35:16 +09:00
Sukchan Lee 74bbc6ecbf [MME] Add S1AP debug (#1263) 2021-12-11 17:28:05 +09:00
Sukchan Lee d7e23b7f6a [AMF] Registration reject for foreign IMSI (#1281) 2021-12-08 21:05:16 +09:00
Kenny Barlee 1a691e1d4a
change reject cause to 11 (#1281) 2021-12-08 20:57:54 +09:00
Sukchan Lee 561f1ac2f3 This always true. So I fixed it (#1266) 2021-12-08 20:56:26 +09:00
Sukchan Lee a5a5c424c1 Added AMF-initiated AM Policy Termination 2021-12-04 19:31:36 +09:00
Sukchan Lee aab8286401 [MME] fix the crash issue if enb_ue is NULL(#1275)
An assert occurs when a NAS message retransmission occurs.

Because there is no `enb_ue` context.

Therefore, before removing enb_ue, all Timers must be stopped
to prevent retransmission of NAS messages.
2021-12-04 10:53:49 +09:00
Sukchan Lee 6ae9ecc697 [MME] check PDN mismatch (#1263)
if PDN mismatched between UE and HSS, PDN connectivitiy reject message
will be sent to eNB.
2021-12-02 22:40:47 +09:00
Sukchan Lee b18cf1bce8 Update Coding rule (#1272) 2021-12-02 22:03:52 +09:00
Daniele 758cf9dd72
bsf bind delete possible fix (#1272)
Avoid to delete bsf binding when there are multiple pdu session associated to the same (s-nssai,dnn) tuple)
2021-12-02 22:00:01 +09:00
Sukchan Lee 448e07d5a9 [AMF/MME] fix the crash during reset (#1268) 2021-11-30 22:22:41 +09:00
Sukchan Lee 00a296a1de update log message (#1266)
1. rollback ogs_error() to ogs_warn()
To remove the print-out in the test code,
8/13 open5gs:epc / attach                    OK      10.60 s
bearer-test         : SUCCESS
session-test        : /11/30 15:59:34.556: [esm] ERROR: Invalid APN[ims2] (../src/mme/esm-handler.c:71)
SUCCESS

2. if( to if (
Coding standard in open5gs
2021-11-30 16:01:37 +09:00
EugeneBogush 4f8c34c7aa
Update esm-handler.c (#1266)
added more log info in case problem with APN
2021-11-30 15:52:20 +09:00
Sukchan Lee acd67c7aa6 [5GC] Service Request Race Condition(#1226)
When UE-triggered and Network-triggered Service Request was occurred at
the same time, we need UPF deactivation and UEContextRelease
2021-11-28 20:54:51 +09:00
Sukchan Lee d8655e07c6 Oops! fix the mistake in previous commit (83aac49) 2021-11-28 17:54:33 +09:00
Sukchan Lee 83aac49fd0 [MME] Add log (#1263) 2021-11-28 17:05:31 +09:00
Sukchan Lee ffc15a7d3d Update IPv6 configuration (#1250) 2021-11-28 16:42:47 +09:00
Sukchan Lee fc8c807da2 [SMF] fix the crash during IMS calls (#1238)
If PFCP is not deactivated, some eNBs send an GTP error indication.
To solve the problem, SMF deactivates the bearer that will be deleted.
2021-11-23 14:19:30 +09:00
Sukchan Lee d919b2744c [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type
2021-11-17 08:09:16 +09:00
Sukchan Lee 6a6f214785 [AMF/MME] stop timer when radio failure (#1242) 2021-11-16 12:59:04 +09:00
Sukchan Lee bfa34be222 fix the buffer overflow (CVE-2021-41794) 2021-11-15 15:49:58 +09:00
Sukchan Lee 0fb8279e36 VoNR added but not tested! 2021-11-14 21:07:56 +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 7567659a29 [UPF] remove link-local (#1217) 2021-10-30 22:34:47 +09:00
Sukchan Lee 5d234cb108 [GTPv2-C] Fix the Create Bearer Request (#1201)
Use instance 2 instead of instance 1
2021-10-26 15:26:10 +09:00
Balint Cristian 13bba81227
Minor fixes: instance extraction & python generator (#1212) 2021-10-24 08:37:11 +09:00
Sukchan Lee 489b633e08 Update Supported-Feature AVP (#1202)
Add the Vendor-Id AVP in Supported-Features AVP in
CCR(Credit-Control-Request)
2021-10-16 17:41:53 +09:00
Sukchan Lee 9ba4b317d2 Improve GTP message (#1201)
Extended Indication
Add Delay Value
2021-10-16 17:26:30 +09:00
Sukchan Lee b35febd9c4 [MME] fix the crash during GTP no context (#1205)
This bug occurs when SGW-C restarts and the next signal occurs
between MME and SGW-C
- Create Session Request/Response
- Modify Bearer Request/Response
2021-10-16 14:11:43 +09:00
Spencer Sevilla b600ab5724
removing diameter includes from upf (#1193) 2021-10-06 07:01:05 +09:00
Sukchan Lee 5e016937c7 Update URR contribution (#1190) 2021-10-04 22:28:32 +09:00
Sukchan Lee 13f1b390ae CVE-2021-41794 from NCC Group by Mark Tedman
When connecting to the UPF port for the PFCP protocol (8805) and sending
an association setup request followed by a session establishment request
with a PDI Network Instance set to ‘internet’, it causes a stack corruption
to occur.

So, ogs_fqdn_parse() fixed.
2021-10-01 22:41:03 +09:00
Sukchan Lee 127685f908 [SGW-C] fix the crash after restarting UPF (#1177) 2021-09-26 20:25:51 +09:00
Sukchan Lee 9c589ac584 [PFCP] include outer header removal(ext-deletion) 2021-09-04 18:03:04 +09:00
Sukchan Lee e730530f7b [SMF] Exception handling in session release(#1155)
- UE changes the airplain-mode. However, it does not send PDU
    session complete message
    - Added exception handling for PDU session release
2021-09-04 16:14:18 +09:00
Sukchan Lee 233db575ea [SMF] fix crash when BSF is not running [#1149] 2021-08-29 00:02:39 +09:00
Sukchan Lee e2fe15d2ae [SMF] TAI/ECGI is not required in WLAN (#1039) 2021-08-27 11:40:58 +09:00
Sukchan Lee ab7f565dd6 [MME/AMF] Use Non-UE signalling in Paging (#1134) 2021-08-18 19:42:27 +09:00
Sukchan Lee 3564fe5c8c [SMF/UPF] Clarify FALLBACK SUBNET [#1128] 2021-08-14 16:52:53 +09:00
Sukchan Lee e5594a57b9 [AMF] fix an invalid GSM reject aligungr#375
TS24.501
8.2.11 DL NAS transport
8.2.11.4 5GMM cause

The AMF shall include this IE when the Payload container IE
contains an uplink payload which was not forwarded and
the Payload container type IE is not set to "Multiple payloads".

-0-
As such, this function 'nas_5gs_send_gsm_reject()' must be used
only when an N1 SM message has been forwarded to the SMF.
2021-08-14 12:01:13 +09:00
Sukchan Lee af5b3aa931 [MME/AMF] fix the crash during timeout (#1122) 2021-08-08 12:38:15 +09:00
Sukchan Lee 831b29973f [PCF] fix the 'NULL' AfEvent in VoNR (#1120) 2021-08-08 09:10:37 +09:00
Sukchan Lee 68edcd6438 fix the SMF crash when num of flow > 8 (#1108) 2021-08-07 14:23:20 +09:00
Sukchan Lee 7e5a5d7511 fix the SMF/PCRF crash when bearer > 8 (#1108) 2021-07-29 18:10:28 +09:00
Sukchan Lee acb4db5dd1 Fix the crash when number of flow > 8 (#1108) 2021-07-28 14:00:03 +09:00
Sukchan Lee c6b13be92a do the finishing touches (#1108) 2021-07-27 20:33:46 +09:00
herlesupreeth bd6eea4fa5 Introduce checks for maximum accepted flow rules for a bearer in Gx path 2021-07-23 14:22:55 +02:00
Sukchan Lee e1c79647e2 [SMF] session data was accessed when NULL (#1105) 2021-07-23 16:24:59 +09:00
Supreeth Herle 362393d0ff
fix: session data was accessed when NULL resulting in crash (#1105) 2021-07-23 16:22:46 +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 1326fc85dc [MME] fix the bug when GTPv2 conflict (#1095) 2021-07-15 21:20:56 +09:00
Sukchan Lee 4667b99c92 fix the BUG in SWx diameter (#1039) 2021-07-13 22:00:04 +09:00
Sukchan Lee 7cfeb2e9f9 Change SIGWINCH log-level from ERROR to INFO 2021-07-12 19:52:28 +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 f278d58a69 Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1
* Specification : r16.8.0 (20210629)
2021-07-07 17:32:55 +09:00
Sukchan Lee 65e96dd75c [AMF] fix the bug for making allowed NSSAI (#910) 2021-07-01 16:23:27 +09:00
Sukchan Lee 997554bbb7 Avoid defining variables in the middle (#1068) 2021-06-24 12:42:31 +09:00
Josh Bailey 38ff2dc6f7
trim buffer to correct size after creating ARP or ND reply. (#1068) 2021-06-24 12:37:58 +09:00
Sukchan Lee a396ea8fc1 [AMF] NG Setup Failure with proper cause (#1064) 2021-06-22 17:56:45 +09:00
Sukchan Lee 50f403279a [AMF/MME] fix the crash bug (#1061) 2021-06-22 16:13:06 +09:00
Sukchan Lee 4537142929 [EPC] Support ePDG Interface (#1039) 2021-06-21 22:36:38 +09:00
Sukchan Lee e0869104c6 [PCF] fix the crash during UE attach (#1059) 2021-06-17 21:26:34 +09:00
Sukchan Lee c48f107520 [MME] fix the crash when release a UE (#1058) 2021-06-17 17:16:16 +09:00
Sukchan Lee 9e664a744b [MME] refine the pull request #1049 2021-06-13 12:03:36 +09:00
R. Medeiros a252fae84f
Indication Dual Address Bearer for create session request. (#1049)
* Update mme-s11-build.c

Add indication Dual Address Bearer in the create session request when the PDN is IPv4v6 Type, Info: 3GPP TS 29.274

* Update mme-s11-build.c
2021-06-13 11:52:23 +09:00
Sukchan Lee e31a8474b2 [SMF/UPF] fix the crash bug (#1034, #1006) 2021-06-08 21:14:18 +09:00
Sukchan Lee 118d62d42d Add more memory log 2021-06-06 22:35:46 +09:00
Sukchan Lee 80a9497afd [PFCP] Add more error log (#1012) 2021-05-30 20:35:30 +09:00
Sukchan Lee ef07ccfb88 fix the default SBI port (#997, #1008) 2021-05-30 10:35:01 +09:00
Sukchan Lee 5d460b0577 [UPF] Tested all platforms on open5gs (#1022) 2021-05-29 23:08:22 +09:00
Sukchan Lee 8dab1852cc Merge branch 'tap' of https://github.com/anarkiwi/open5gs into pull1022 2021-05-29 18:06:43 +09:00
Sukchan Lee fe89f7cd11 [5GC] Added BSF(Binding Support Function) 2021-05-29 15:56:12 +09:00
Sukchan Lee 611986794b Squashed commit of the following:
commit 183d8b8344122f25f77be79b1b698c71f48c1656
Author: Sukchan Lee <acetcom@gmail.com>
Date:   Fri May 28 23:44:26 2021 +0900

    [SMF] introduce new list API [#1019]

    Sometimes we may need two lists for same node.
    To do this, I created a new list API, and applied it this pull request.
2021-05-28 23:46:48 +09:00
Josh Bailey caa73e1f5e Support TAP interfaces, with ARP/ND. 2021-05-28 05:59:03 +00:00
herlesupreeth 4d6692d8fe fix: DRB lost issue when additional TFTs needs to be added to existing bearer with TFTs
This commit address the issue where a bearer with particular
PCC rule name exists with TFTs and addtional TFTs needs to be added
to same bearer and DRB lost is reported by UE.

This is achieved by creating EPS Bearer Level Traffic Flow Template
with TFT operation code as 'OGS_GTP_TFT_CODE_ADD_PACKET_FILTERS_TO_EXISTING_TFT' in
above scenario rather than use 'OGS_GTP_TFT_CODE_CREATE_NEW_TFT' at all times.
And, not remove existing packet filters for the bearer.
2021-05-27 15:57:32 +02:00
Sukchan Lee 3d11b87127 [AMF] Buffix for NON-initial NAS message (#1106)
Confirmation for non-cleartext IE should only be applied
to the initial NAS message. Registration requests and Service requests
with UplinkNASTransport do not have to.
2021-05-19 13:27:31 +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 dfaf2f1567 [SMF] PF precedence generated by Pool (#1001) 2021-05-16 11:26:40 +09:00
Supreeth Herle b6a030d82b
Support for IMS video calling (#1001)
* Preserve local port in Rx flow-description

In contnuation to support for calling in pre-rel. LTE 11 devices
, rather than removing the local IP addr field and local port remove
only the IP addr field

* tft: Set precedence considering exisiting TFTs in all bearers of a DNN
2021-05-16 10:08:41 +09:00
Sukchan Lee ff4695bd5a [AMF/MME] malformed Path-Switch-Request (#960)
fix the crash
2021-05-08 17:01:45 +09:00
Sukchan Lee 3b19190f56 [AMF] fix crash due to malformed NGAP (#960) 2021-05-08 15:09:10 +09:00
Sukchan Lee 5ea9b22209 [AMF] security protection (UERANSIM-issues316)
1. Allocate ngKSI other than the value already used.
2. Add the protection of Service request
3. fix SBI convert error ng_ap_cause
2021-05-08 13:24:17 +09:00
Sukchan Lee b0e8dbb31a [NAS] Protection for malformed NAS message (#959)
Add the protection code to avoid AMF/MME crash due to malformed NAS
message
2021-05-07 23:04:48 +09:00
Sukchan Lee 018b352985 [AMF] fix the UE-AMBR in NGAP message (#979)
1. DownlinkNASTransport
If AMF has not sent it previously, UE-AMBR is included in Registration
accept.

2. InitialContextSetupRequest
If PDUSessionResourceSetup is available, UE-AMBR is included

3. PDUSessionResourceSetupRequest
If AMF has not sent it previously, UE-AMBR is included

4. HandoverRequest
If PDUSessionResourceSetup is available, UE-AMBR is included
2021-05-07 21:18:45 +09:00
Sukchan Lee 1dc692753a [AMF] Distinguish Cleartext/Non-cleartext (#958)
1. If UE does not use a NAS container for Non-cleartext IEs,
   Open5GS AMF will send Registration reject message.
2. If UE sends Non-cleartext IEs without Integrity-protected,
   Open5GS AMF will send Registration reject message.
3. If UE does not send NAS container in Security mode complete message,
   Open5GS AMF will send Registration reject message.
2021-05-07 15:07:51 +09:00
Sukchan Lee 5901582281 [GTPv2] fix incorrect formatting PLMN-ID (#969) 2021-05-05 22:51:50 +09:00
Sukchan Lee e5a0dfb444 [SBI] fix the compile warning in MacOSX 2021-05-05 22:04:17 +09:00
Sukchan Lee 0b063a57c8 [MME] fix the NAS encoding for AMBR (#967) 2021-05-05 21:16:31 +09:00
Sukchan Lee 19a8e4cd70 [Cx] Chanage IMPUs (#921)
Change the order of IMPUs sent in XML as follows and also have only the
following IMPUs

i.e.
    1. sip:<MSISDN>@ims.mnc<MNC>.mcc<MCC>.3ggpnetwork.org
    2. tel:<MSISDN>
2021-04-30 07:07:52 +09:00
Sukchan Lee a58214da76 [5GC/EPC] tested with concurrent 500 UEs (#949)
Fix the memory problem in many simulatneous connections test
2021-04-29 22:01:34 +09:00
Sukchan Lee fc27f7499b [SMF/SGW-C] fix the PFCP RR selection (#953)
The configuration has changed. PFCP node rr=0 is removed as shown below.
sgwc:
  pfcp
    rr: 0 <-- Removed

Introduced a new configuration method for SMF/SGW-C

parameter:
  no_pfcp_rr_select: true

By default, PFCP round robin selection is allowed.
The above parameters prohibit selecting PFCP in a round robin manner.
2021-04-24 20:56:14 +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 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 ea89d8dc8e [AMF] Added RANConfigurationUpdate (#943) 2021-04-16 16:26:13 +09:00
Sukchan Lee cc03c91bdd [AMF] 5G-GUTI generation changed (#910)
The AMF shall assign a new 5G-GUTI for a particular UE:
a) during  a successful initial registration procedure;
b) during a successful registration procedure
   for mobility registration update; and
c) after a successful service request procedure invoked as a response
   to a paging request from the network and before the release
   of the N1 NAS signalling connection as specified in subclause 5.4.4.1.

The AMF should assign a new 5G-GUTI for a particular UE
during a successful registration procedure
for periodic registration update. The AMF may assign a new 5G-GUTI
at any time for a particular UE by performing
the generic UE configuration update procedure.
2021-04-13 17:34:25 +09:00
Sukchan Lee 83720fff9a fix: mobilty -> mobility (#930) 2021-04-13 10:02:52 +09:00
Pau Espin 520dcf1ff8
pfcp: Fix 'No Heartbeat' log messages (#931) 2021-04-12 20:23:51 +09:00
Sukchan Lee 905fc76faf [AMF] Add NGAP ErrorIndication [#910]
1. UE sends PDU session establishment request to the AMF.
2. AMF initiates Release Due to Duplicate Session ID.
3. SMF cannot find the session by SM-Context-Ref.

For the above condition, AMF sends NGAP ErrorIndication to the UE.
2021-04-09 21:02:03 +09:00
Sukchan Lee 8710cae0fd [Cx] Add sip:<MSISDN> (#921) 2021-04-08 23:09:13 +09:00
Sukchan Lee 27cee12a7b [Cx] User-Name can be skipped in SAR (#921) 2021-04-08 22:49:08 +09:00
Sukchan Lee 44de4673bf [Cx] change the order of IMPU (#921) 2021-04-08 21:35:52 +09:00
Sukchan Lee 2df8a1836f Oops! remove redundant code 2021-04-08 20:46:41 +09:00
Sukchan Lee 3c9541992f [Cx] fix MSISDN public identity (#921)
sip:<MSISDN>@ims.mnc<MNC>.mcc<MCC>.3ggpnetwork.org
tel:<MSISDN>
2021-04-08 20:42:24 +09:00
Sukchan Lee 26066bb0ca [Cx] LIR/LIA is added (#921) 2021-04-07 21:46:05 +09:00
Sukchan Lee d3eaaff430 [Cx] fix the Cx integration bug (#919)
- Now security is verified.
2021-04-06 21:36:08 +09:00
Sukchan Lee 41c6bb4681 new: HSS Cx interface is added 2021-04-05 17:09:39 +09:00
Sukchan Lee bb38c01229 fix : Allow NSSAI in Registration accept (#910)
Always Present Allow NSSAI in Registration accept
2021-04-03 14:07:44 +09:00
Sukchan Lee 5f9785af52 sctp: Add sack_delay in sctp configuration (#895) 2021-04-01 15:40:46 +09:00
Pau Espin Pedrol 0b3ca447c9
sgwc: Log received messages in sxa-handler.c (#896) 2021-03-31 19:59:57 +09:00
Sukchan Lee cc30aa2a9a fix: No S-TMSI in InitialUEMessage (#890) 2021-03-31 15:35:59 +09:00
Sukchan Lee 1e2a16fc5b fix: No Modify Bearer Request (#885)
Now MME send Modify Bearer Request regardless of the order of
Attach Complete and InitialContextSetupResponse
2021-03-29 22:35:34 +09:00
Sukchan Lee 829123dad0 fix: managing multiple calls (#869)
If PCRF sends RAR, it generates different Charging-Rule-Name.
2021-03-29 10:28:08 +09:00
Sukchan Lee 6ab5c41af5 conf: Add ignore_requested_nssai parameter (#859)
If parameter.ignore_requsted_nssai is true,
AMF will ignore the UE Requested NSSAI and create an allowed-NSSAI
based on the Default S-NSSAI in the Subscription DB.
2021-03-26 23:12:43 +09:00
Sukchan Lee b22023afb8 fix: creating allowed NSSAI (#859)
AMF checks whether it can serve all the S-NSSAI(s) from
the Requested NSSAI present in the Subscribed S-NSSAIs
(potentially using configuration for mapping S-NSSAI values
between HPLMN and Serving PLMN), or all the S-NSSAI(s) marked
as default in the Subscribed S-NSSAIs in the case that
no Requested NSSAI was provided or none of the S-NSSAIs
in the Requested NSSAI are permitted,
i.e. do not match any of the Subscribed S-NSSAIs or not available
at the current UE's Tracking Area (see clause 5.15.3).
2021-03-25 23:06:59 +09:00
Kenny Barlee 5d2fea994b
NGAP - N2 path name (#870) 2021-03-23 21:26:13 +09:00
Sukchan Lee 52cd51ca6a fix: adjust the actual path amf.plmn_support (#825) 2021-03-20 09:17:14 +09:00
Sukchan Lee 79df32638c 5gc: Add defaultt NSI configuration for NSSF (#859) 2021-03-19 11:04:02 +09:00
Sukchan Lee d0eec31f5c upf/sgwu: fix the PDR creation bug (#860)
When PDR is created without deleting session, there is a bug to create
new PDR.
2021-03-19 10:08:37 +09:00