Commit Graph

3731 Commits

Author SHA1 Message Date
Carlos Giraldo cfe21c61da
Structure AMF and MME metrics code similar to SMF (#1590)
* AMF metrics initial support

* MME metrics initial support

* set amf/mme metrics.[c|h] similar to smf
2022-06-09 21:39:03 +09:00
Sukchan Lee 0b97954208 Re-added to handle an exceptional case (#1589) 2022-06-09 21:35:59 +09:00
Bostjan Meglic 5084f6a71d
[AMF] Add support for SUCI protection schemes A and B (#1589)
For null protection scheme the SUCI needs to be BCD encoded. Whereas for
protection scheme profiles A and B the SUCI needs to be converted from
hexadecimal to ASCII.

This still needs the support for protection schemes A and B in UDM to
work.
2022-06-09 21:27:58 +09:00
Carlos Giraldo 109949d335
MME initial metrics support (#1587) 2022-06-09 06:23:51 +09:00
Pau Espin 9e25482d99
[SMF] Gn: Fixes handling/transmitting APN-AMBR IE (#1588) 2022-06-09 06:22:56 +09:00
Carlos Giraldo 816575dc8d
AMF metrics initial support (#1585) 2022-06-08 17:54:46 +09:00
Pau Espin 28e40a0f1b
Initial metrics support based on Prometheus (#1571)
* Initial metrics support based on Prometheus

This commit introduces initial support for metrics in open5gs.

The metrics code is added as libogsmetrics (lib/metrics/), with a well
defined opaque API to manage different types of metrics, allowing for
different implementations for different technologies to scrap the
metrics (placed as lib/metrics/<impl>/. The implementation is right now
selected at build time, in order to be able to opt-out the related dependencies
for users not interested in the features. 2 implementations are already
provided in this commit to start with:
* void: Default implementation. Empty stubs, acts as a NOOP.
* prometheus: open5gs processes become Prometheus servers, offering
  states through an http server to the Prometheus scrappers. Relies on
  libprom (prometheus-client-ci [1] project) to track the metrics and format
  them during export, and libmicrohttpd to make the export possible through
  HTTP.

[1] https://github.com/digitalocean/prometheus-client-c

The prometheus-client-c is not well maintained nowadays in upstream, and
furthermore it uses a quite peculiar mixture of build systems (autolib
on the main dir, cmake for libprom in a subdir). This makes it difficult
to have it widely available in distros, and difficult to find it if it
is installed in the system. Hence, the best is to include it as a
meson subproject like we already do for freeDiameter. An open5gs fork is
requried in order to have an extra patch adding a top-level
CMakeList.txt in order to be able to includ eit from open5gs's meson
build. Furthermore, this allows adding bugfixes to the subproject if any
are found in the future.

* [SMF] Initial metrics support

* [SMF] Add metrics at gtp_node level

* docs: Add tutorial documenting metrics with Prometheus
2022-06-08 05:51:02 +09:00
Pau Espin a9badd5520
GTP, SMF: More dec/enc improvements in QoS Profile IE MBR and GBRE fields (#1584) 2022-06-07 22:13:53 +09:00
Sukchan Lee 18cca7f5e4 Re-enabling HTTP/1.1 (#1570) 2022-06-06 22:20:52 +09:00
Sukchan Lee 828fa23d16 Increase Apply Action size to 2 bytes (#1581) 2022-06-06 21:12:18 +09:00
mitmitmitm a6abe1fffb
[NRF] Don't abort if there are too many registered NF instances (#1579)
Reply with an error instead.
2022-06-06 20:54:59 +09:00
Pau Espin 7dd5d27a71
[GTPv1] Several QoS Profile IE enc/dec fixes and improvements (#1575) 2022-06-03 06:56:28 +09:00
Pau Espin e32139009b
[SMF] Gn: Avoid building QoS Profile IE twice in UpdatePdpContextResp (#1574) 2022-06-03 01:02:14 +09:00
Pau Espin 502a886e43
[CORE] ogs-sockaddr: Fix trailing whitespace (#1573) 2022-06-02 20:20:16 +09:00
Pau Espin d99382d5bc
[CORE] Improve log error messages in ogs_ipsubnet() (#1572) 2022-06-02 20:19:55 +09:00
Sukchan Lee 8b3fa5ff9f Follow-up the contribution #1566, #1567 2022-05-31 21:44:53 +09:00
Pau Espin e1e8018919
[SMF] Avoid crash if Create{Session,PdpContext}Resp fails to be sent (#1566)
* [SMF] Gn: Drop unreachable return line

* [SMF] Avoid crash if Create{Session,PdpContext}Resp fails to be sent

Crash spotted in a running open5gs-smfd process, triggered by:
ERROR: ogs_gtp_sendto() failed (1:Operation not permitted) (../lib/gtp/path.c:119)
ERROR: ogs_gtp_xact_commit: Expectation `rv == OGS_OK' failed. (../lib/gtp/xact.c:730)
ERROR: smf_gtp2_send_create_session_response: Expectation `rv == OGS_OK' failed. (../src/smf/gtp-path.c:451)
FATAL: smf_gsm_state_wait_pfcp_establishment: Assertion `OGS_OK == smf_gtp2_send_create_session_response( sess, gtp_xact)' failed. (../src/smf/gsm-sm.c:676)

* [SMF] Avoid crash if Delete{Sesson,PdpContext}Resp fails to be sent

Let's simply continuing with release of the session, there's not much we
can do about it. Peer will eventually realize the conn is no longer
there.
2022-05-31 21:27:42 +09:00
Pau Espin c2bda0b576
[GTP] Several fixes and improvements around ogs_gtp_xact_find_by_xid (#1567)
* [GTP] Add missing msg types to ogs_gtp_xact_get_stage()

* [GTP] Avoid returning wrong xact by xif if none found

* [GTP] Avoid crash if ogs_gtp_xact_get_stage() fails

* [GTP] Rename s/ogs_gtp_xact_get_stage/ogs_gtp2_xact_get_stage/
2022-05-31 21:24:00 +09:00
Sukchan Lee b6f2146594 [SGWC] Update remote PGW GTPv2-C address (#1560)
In Create Sesion Response, we updated remote PGW GTPv2-C address.
2022-05-28 17:06:36 +09:00
Miguel 78b1dc77ff
Update open5gs-dbctl (#1562)
I added four additional commands which are useful in case not using the GUI (add UE using a specific APN, add UE using a specific slice and APN, modify a slice adding an APN, modify an UE adding a new slice + APN)
2022-05-28 11:10:03 +09:00
endika de0ba3f9dc
fix tipo in amf logs (#1558) 2022-05-26 20:12:30 +09:00
Pau Espin c18e9f32cb
[PGW] Gy+PFCP improvements (#1555)
* [SMF] Gy,PFCP: Improve {Time,Volume} {Threshold,Quota} handling

* [UPF] Implement URR Usage Report for ValidityTime/TimeQuota/TimeThreshold

* [UPF] Implement Usage report trigger for Volume Quota/Threshold

* [SMF] Set Gy Reporting-Reason based on PFCP Report Trigger
2022-05-24 22:54:30 +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 933f0b04c7 [TEST] Added IPv6 in GTPU (#1515) 2022-05-23 23:51:02 +09:00
Sukchan Lee 7d496e182b Update document for v2.4.7 2022-05-21 19:48:56 +09:00
Sukchan Lee dd845a2bb2 Release v2.4.7 2022-05-21 19:22:11 +09:00
Sukchan Lee 1679f57ac7 [CORE] fix the linked-list bug (#1187) 2022-05-21 18:54:42 +09:00
Pau Espin b6fe640641
[SMF] Gy CCR: Clarify use of Reporting-Request and set it to FINAL in TERMINATION_REQ (#1552) 2022-05-21 06:00:56 +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
Pau Espin 43a7259781
[SMF] Prevent concurrent access to ogs_pool allocating smf_event (#1546) 2022-05-20 05:57:27 +09:00
Supreeth Herle aba1867902
Fix AN-Trusted AVP sent in CCR (#1542)
AN-Trusted AVP is only relevant for non-3GPP access networks e.g. WLAN.
This commit adds a check for non-3GPP access network in order to include
AN-Trusted AVP in CCR or not.
Also, clears the M bit for AN-trusted AVP as per TS 29.212 version 16.4.0, Table 5.4.0.1
2022-05-19 13:25:49 +09:00
Sukchan Lee 12d189af07 Document Update 2022-05-17 23:37:41 +09:00
Sukchan Lee d6c8d49ef4 Update Document for v2.4.6 2022-05-17 23:30:16 +09:00
Sukchan Lee 1983d9d7a7 Release v2.4.6 2022-05-17 22:44:05 +09:00
Sukchan Lee 6710c13a44 update it 2022-05-17 21:44:52 +09:00
Sukchan Lee 67fd2efd76 [HOTFIX] Receive PTI information 2022-05-18 16:04:51 +09:00
Sukchan Lee c6c8dc1256 [PFCP] Support Multi-CP with One-UP
A problem occurred when there was one SGWU/UPF and multiple SGWC/SMF.

When SGWU and UPF create a session, if the SEID is the same,
the existing session information is used without creating an additional session.

These problems were solved by using the F-SEID including IP information
in the process of checking the existing session.
2022-05-18 10:29:58 +09:00
Pau Espin 46621538af
[SMF] Improve 3GPP-User-Location-Info in Gn,Gx,Gy (#1539)
* [GTP] Fix trailing whitespace

* [SMF] Improve 3GPP-User-Location-Info in Gn,Gx,Gy
2022-05-17 10:29:11 +09:00
Sukchan Lee b2f2016a67 Fix the compile error 2022-05-15 23:40:51 +09:00
Sukchan Lee e0a487f479 [SMF] Optimiza Session Modification Message
For video in VoNR, multiple QosFlow is required in one session.

In the past, since only one Session Modification Message was supported,
QoS-Flow was put into several Session Messages one by one and processed.

Now that multiple QoS-Flows can be supported,
it is optimized to process one session modification message.
2022-05-15 23:35:41 +09:00
Sukchan Lee a7e2a071e0 Merge branch 'main' of https://github.com/open5gs/open5gs into main 2022-05-15 22:38:38 +09:00
Sukchan Lee f97f5f794d Merge branch 'althea-net-sctp_crash_upstream' into main 2022-05-15 22:38:29 +09:00
Sukchan Lee afc562f7d5 [MME] refine Pull Request (#1497) 2022-05-15 22:37:38 +09:00
Sukchan Lee 478723203f Merge branch 'sctp_crash_upstream' of https://github.com/althea-net/open5gs into althea-net-sctp_crash_upstream 2022-05-15 22:22:01 +09:00
Sukchan Lee c391ac1334 [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
Pau Espin fe7f9d85bb
[SMF] Store IMEI from GTPv1C/2C and append AVP in Gy CCR (#1535) 2022-05-14 21:32:32 +09:00
Pau Espin c5715d6695
[SMF] Gy CCR: append 3GPP-RAT-Type AVP (#1536) 2022-05-14 06:15:28 +09:00
Sukchan Lee bb4a8f34d4 [AMF] Fix the bug NGResetAck (#1525) 2022-05-14 02:43:01 +09:00
Sukchan Lee 71572ae563 [PFCP] fixed memcpy (#1531)
dnn ‘memcpy’ reading 808 bytes from a region of size 128
2022-05-13 18:26:54 +09:00