Changes of Revision 435

commit_bbdfca29bf90660579cfac873a69374d76da00e0.txt Deleted
commit_d3a779e7153b1962788e42f916e0148b0225dcda.txt Added
open5gs_2.7.0.130.bbdf.dsc Deleted
x
 
1
@@ -1,39 +0,0 @@
2
-Format: 3.0 (native)
3
-Source: open5gs
4
-Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
5
-Architecture: any
6
-Version: 2.7.0.130.bbdf
7
-Maintainer: Harald Welte <laforge@gnumonks.org>
8
-Uploaders: Sukchan Lee <acetcom@gmail.com>
9
-Homepage: https://open5gs.org
10
-Standards-Version: 4.3.0
11
-Vcs-Browser: https://github.com/open5gs/open5gs
12
-Vcs-Git: git://github.com/open5gs/open5gs
13
-Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
-Package-List:
15
- open5gs deb net optional arch=any
16
- open5gs-amf deb net optional arch=any
17
- open5gs-ausf deb net optional arch=any
18
- open5gs-bsf deb net optional arch=any
19
- open5gs-common deb net optional arch=any
20
- open5gs-dbg deb net optional arch=any
21
- open5gs-hss deb net optional arch=any
22
- open5gs-mme deb net optional arch=any
23
- open5gs-nrf deb net optional arch=any
24
- open5gs-nssf deb net optional arch=any
25
- open5gs-pcf deb net optional arch=any
26
- open5gs-pcrf deb net optional arch=any
27
- open5gs-scp deb net optional arch=any
28
- open5gs-sepp deb net optional arch=any
29
- open5gs-sgwc deb net optional arch=any
30
- open5gs-sgwu deb net optional arch=any
31
- open5gs-smf deb net optional arch=any
32
- open5gs-udm deb net optional arch=any
33
- open5gs-udr deb net optional arch=any
34
- open5gs-upf deb net optional arch=any
35
-Checksums-Sha1:
36
- 52d54fef9ca2b44ec01294877cd4d94d324f735e 14489080 open5gs_2.7.0.130.bbdf.tar.xz
37
-Checksums-Sha256:
38
- fc06cc739d68331468a2175331f4273c1c2b4f39cce116a99e993808101dca59 14489080 open5gs_2.7.0.130.bbdf.tar.xz
39
-Files:
40
- 31f8500c3c953ec86b2fd63c11f749ed 14489080 open5gs_2.7.0.130.bbdf.tar.xz
41
open5gs_2.7.0.134.d3a7.dsc Added
41
 
1
@@ -0,0 +1,39 @@
2
+Format: 3.0 (native)
3
+Source: open5gs
4
+Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
5
+Architecture: any
6
+Version: 2.7.0.134.d3a7
7
+Maintainer: Harald Welte <laforge@gnumonks.org>
8
+Uploaders: Sukchan Lee <acetcom@gmail.com>
9
+Homepage: https://open5gs.org
10
+Standards-Version: 4.3.0
11
+Vcs-Browser: https://github.com/open5gs/open5gs
12
+Vcs-Git: git://github.com/open5gs/open5gs
13
+Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
+Package-List:
15
+ open5gs deb net optional arch=any
16
+ open5gs-amf deb net optional arch=any
17
+ open5gs-ausf deb net optional arch=any
18
+ open5gs-bsf deb net optional arch=any
19
+ open5gs-common deb net optional arch=any
20
+ open5gs-dbg deb net optional arch=any
21
+ open5gs-hss deb net optional arch=any
22
+ open5gs-mme deb net optional arch=any
23
+ open5gs-nrf deb net optional arch=any
24
+ open5gs-nssf deb net optional arch=any
25
+ open5gs-pcf deb net optional arch=any
26
+ open5gs-pcrf deb net optional arch=any
27
+ open5gs-scp deb net optional arch=any
28
+ open5gs-sepp deb net optional arch=any
29
+ open5gs-sgwc deb net optional arch=any
30
+ open5gs-sgwu deb net optional arch=any
31
+ open5gs-smf deb net optional arch=any
32
+ open5gs-udm deb net optional arch=any
33
+ open5gs-udr deb net optional arch=any
34
+ open5gs-upf deb net optional arch=any
35
+Checksums-Sha1:
36
+ 7168bdc6758c9835f44f9bab801759bfa93c3707 14490140 open5gs_2.7.0.134.d3a7.tar.xz
37
+Checksums-Sha256:
38
+ 27ff53dd6ea9afb74483b29f6fe9df4f1085795daee61dbb8f17080ad415f5d8 14490140 open5gs_2.7.0.134.d3a7.tar.xz
39
+Files:
40
+ c921164d4b6006ba7a0ba6ec63276cf1 14490140 open5gs_2.7.0.134.d3a7.tar.xz
41
open5gs_2.7.0.130.bbdf.tar.xz/.tarball-version -> open5gs_2.7.0.134.d3a7.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-2.7.0.130-bbdf
3
+2.7.0.134-d3a7
4
open5gs_2.7.0.130.bbdf.tar.xz/debian/changelog -> open5gs_2.7.0.134.d3a7.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-open5gs (2.7.0.130.bbdf) unstable; urgency=medium
3
+open5gs (2.7.0.134.d3a7) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Sun, 07 Apr 2024 14:13:31 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Mon, 08 Apr 2024 22:42:01 +0000
9
 
10
 open5gs (2.7.0) unstable; urgency=medium
11
 
12
open5gs_2.7.0.130.bbdf.tar.xz/lib/diameter/common/logger.c -> open5gs_2.7.0.134.d3a7.tar.xz/lib/diameter/common/logger.c Changed
74
 
1
@@ -27,8 +27,8 @@
2
 
3
 static ogs_diam_logger_user_handler user_handler = NULL;
4
 
5
-static void ogs_diam_logger_cb(enum fd_hook_type type, struct msg * msg, 
6
-    struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, 
7
+static void ogs_diam_logger_cb(enum fd_hook_type type, struct msg * msg,
8
+    struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd,
9
     void * regdata);
10
 static void * diam_stats_worker(void * arg);
11
 
12
@@ -41,7 +41,7 @@
13
     self.mode = mode;
14
     self.duration = 60;       /* 60 seconds */
15
 
16
-    CHECK_FCT( fd_hook_register( 
17
+    CHECK_FCT( fd_hook_register(
18
             mask_peers, ogs_diam_logger_cb, NULL, NULL, &logger_hdl) );
19
 
20
     CHECK_POSIX( pthread_mutex_init(&self.stats_lock, NULL) );
21
@@ -81,8 +81,8 @@
22
 }
23
 
24
 /* The callback called when messages are received and sent */
25
-static void ogs_diam_logger_cb(enum fd_hook_type type, struct msg * msg, 
26
-    struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, 
27
+static void ogs_diam_logger_cb(enum fd_hook_type type, struct msg * msg,
28
+    struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd,
29
     void * regdata)
30
 {
31
     const char * peer_name = peer ? peer->info.pi_diamid : "<unknown peer>";
32
@@ -117,7 +117,7 @@
33
 }
34
 
35
 /* Function to display statistics periodically */
36
-static void * diam_stats_worker(void * arg) 
37
+static void * diam_stats_worker(void * arg)
38
 {
39
     struct timespec start, now;
40
     struct fd_stats copy;
41
@@ -146,7 +146,7 @@
42
                     (int)(now.tv_sec - start.tv_sec),
43
                     (long)(now.tv_nsec - start.tv_nsec) / 1000);
44
         }
45
-        else 
46
+        else
47
         {
48
             ogs_trace(" Executing for: %d.%06ld sec",
49
                     (int)(now.tv_sec - 1 - start.tv_sec),
50
@@ -154,7 +154,7 @@
51
         }
52
 
53
         if (self.mode & FD_MODE_SERVER) {
54
-            ogs_trace(" Server: %llu message(s) echoed", 
55
+            ogs_trace(" Server: %llu message(s) echoed",
56
                     copy.nb_echoed);
57
         }
58
         if (self.mode & FD_MODE_CLIENT) {
59
@@ -162,11 +162,11 @@
60
             ogs_trace("   %llu message(s) sent", copy.nb_sent);
61
             ogs_trace("   %llu error(s) received", copy.nb_errs);
62
             ogs_trace("   %llu answer(s) received", copy.nb_recv);
63
-            ogs_trace("     fastest: %ld.%06ld sec.", 
64
+            ogs_trace("     fastest: %ld.%06ld sec.",
65
                     copy.shortest / 1000000, copy.shortest % 1000000);
66
-            ogs_trace("     slowest: %ld.%06ld sec.", 
67
+            ogs_trace("     slowest: %ld.%06ld sec.",
68
                     copy.longest / 1000000, copy.longest % 1000000);
69
-            ogs_trace("     Average: %ld.%06ld sec.", 
70
+            ogs_trace("     Average: %ld.%06ld sec.",
71
                     copy.avg / 1000000, copy.avg % 1000000);
72
         }
73
         ogs_trace("-------------------------------------");
74
open5gs_2.7.0.130.bbdf.tar.xz/lib/diameter/common/logger.h -> open5gs_2.7.0.134.d3a7.tar.xz/lib/diameter/common/logger.h Changed
19
 
1
@@ -33,7 +33,7 @@
2
 #define FD_MODE_SERVER   0x1
3
 #define FD_MODE_CLIENT   0x2
4
     int mode;        /* default FD_MODE_SERVER | FD_MODE_CLIENT */
5
-    
6
+
7
     int duration; /* default 10 */
8
     struct fd_stats {
9
         unsigned long long nb_echoed; /* server */
10
@@ -56,7 +56,7 @@
11
 int ogs_diam_logger_stats_start(void);
12
 
13
 typedef void (*ogs_diam_logger_user_handler)(
14
-    enum fd_hook_type type, struct msg *msg, struct peer_hdr *peer, 
15
+    enum fd_hook_type type, struct msg *msg, struct peer_hdr *peer,
16
     void *other, struct fd_hook_permsgdata *pmd, void *regdata);
17
 
18
 void ogs_diam_logger_register(ogs_diam_logger_user_handler instance);
19
open5gs_2.7.0.130.bbdf.tar.xz/lib/diameter/gy/message.h -> open5gs_2.7.0.134.d3a7.tar.xz/lib/diameter/gy/message.h Changed
35
 
1
@@ -40,8 +40,10 @@
2
 #define OGS_DIAM_GY_AVP_CODE_CC_REQUEST_TYPE                (416)
3
 #define OGS_DIAM_GY_AVP_CODE_CC_TIME                        (420)
4
 #define OGS_DIAM_GY_AVP_CODE_CC_TOTAL_OCTETS                (421)
5
+#define OGS_DIAM_GY_AVP_CODE_FINAL_UNIT_INDICATION          (430)
6
 #define OGS_DIAM_GY_AVP_CODE_GRANTED_SERVICE_UNIT           (431)
7
 #define OGS_DIAM_GY_AVP_CODE_VALIDITY_TIME                  (448)
8
+#define OGS_DIAM_GY_AVP_CODE_FINAL_UNIT_ACTION              (449)
9
 #define OGS_DIAM_GY_AVP_CODE_MULTIPLE_SERVICES_CREDIT_CONTROL (456)
10
 #define OGS_DIAM_GY_AVP_CODE_SUPPORTED_FEATURES             (628)
11
 #define OGS_DIAM_GY_AVP_CODE_TIME_QUOTA_THRESHOLD           (868)
12
@@ -155,6 +157,14 @@
13
     uint64_t cc_output_octets;
14
 } ogs_diam_gy_service_unit_t;
15
 
16
+typedef struct gs_diam_gy_final_unit_s {
17
+    bool cc_final_action_present;
18
+#define OGS_DIAM_GY_FINAL_UNIT_ACTION_TERMINATE                 0
19
+#define OGS_DIAM_GY_FINAL_UNIT_ACTION_REDIRECT                  1
20
+#define OGS_DIAM_GY_FINAL_UNIT_ACTION_REDIRECT_ACCESS           2
21
+    int32_t cc_final_action;
22
+} ogs_diam_gy_final_unit_t;
23
+
24
 typedef struct ogs_diam_gy_message_s {
25
 #define OGS_DIAM_GY_CMD_CODE_CREDIT_CONTROL                         272
26
 #define OGS_DIAM_GY_CMD_RE_AUTH                                     258
27
@@ -187,6 +197,7 @@
28
             uint32_t time_threshold;
29
             uint32_t volume_threshold;
30
             ogs_diam_gy_service_unit_t granted;
31
+            ogs_diam_gy_final_unit_t final;
32
             uint32_t result_code;
33
             uint32_t *err;
34
         } cca;
35
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/hss-context.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/hss-context.c Changed
60
 
1
@@ -337,6 +337,8 @@
2
 #else
3
                     self.use_mongodb_change_stream = false;
4
 #endif
5
+                } else if (!strcmp(hss_key, "metrics")) {
6
+                    /* handle config in metrics library */
7
                 } else
8
                     ogs_warn("unknown key `%s`", hss_key);
9
             }
10
@@ -519,6 +521,7 @@
11
     ogs_hash_set(self.imsi_hash, imsi->id, strlen(imsi->id), imsi);
12
 
13
     ogs_list_add(&self.imsi_list, imsi);
14
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_GAUGE_IMSI);
15
 
16
     return imsi;
17
 }
18
@@ -528,6 +531,7 @@
19
     ogs_assert(imsi);
20
 
21
     ogs_list_remove(&self.imsi_list, imsi);
22
+    hss_metrics_inst_global_dec(HSS_METR_GLOB_GAUGE_IMSI);
23
 
24
     ogs_assert(imsi->id);
25
     ogs_hash_set(self.imsi_hash, imsi->id, strlen(imsi->id), NULL);
26
@@ -569,6 +573,7 @@
27
     ogs_hash_set(self.impi_hash, impi->id, strlen(impi->id), impi);
28
 
29
     ogs_list_add(&self.impi_list, impi);
30
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_GAUGE_IMPI);
31
 
32
     return impi;
33
 }
34
@@ -578,6 +583,7 @@
35
     ogs_assert(impi);
36
 
37
     ogs_list_remove(&self.impi_list, impi);
38
+    hss_metrics_inst_global_dec(HSS_METR_GLOB_GAUGE_IMPI);
39
 
40
     impu_remove_all(impi);
41
 
42
@@ -633,7 +639,9 @@
43
     ogs_hash_set(self.impu_hash, impu->id, strlen(impu->id), impu);
44
 
45
     impu->impi = impi;
46
+
47
     ogs_list_add(&impi->impu_list, impu);
48
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_GAUGE_IMPU);
49
 
50
     return impu;
51
 }
52
@@ -647,6 +655,7 @@
53
     ogs_assert(impi);
54
 
55
     ogs_list_remove(&impi->impu_list, impu);
56
+    hss_metrics_inst_global_dec(HSS_METR_GLOB_GAUGE_IMPU);
57
 
58
     ogs_assert(impu->id);
59
     ogs_hash_set(self.impu_hash, impu->id, strlen(impu->id), NULL);
60
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/hss-context.h -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/hss-context.h Changed
9
 
1
@@ -25,6 +25,7 @@
2
 #include "ogs-diameter-swx.h"
3
 #include "ogs-dbi.h"
4
 #include "ogs-app.h"
5
+#include "metrics.h"
6
 
7
 #ifdef __cplusplus
8
 extern "C" {
9
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/hss-cx-path.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/hss-cx-path.c Changed
62
 
1
@@ -34,17 +34,18 @@
2
 static struct disp_hdl *hdl_cx_lir = NULL;
3
 
4
 /* Default callback for the application. */
5
-static int hss_ogs_diam_cx_fb_cb(struct msg **msg, struct avp *avp, 
6
+static int hss_ogs_diam_cx_fb_cb(struct msg **msg, struct avp *avp,
7
         struct session *session, void *opaque, enum disp_action *act)
8
 {
9
     /* This CB should never be called */
10
     ogs_warn("Unexpected message received!");
11
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_CX_RX_UNKNOWN);
12
 
13
     return ENOTSUP;
14
 }
15
 
16
 /* Callback for incoming User-Authorization-Request messages */
17
-static int hss_ogs_diam_cx_uar_cb( struct msg **msg, struct avp *avp, 
18
+static int hss_ogs_diam_cx_uar_cb( struct msg **msg, struct avp *avp,
19
         struct session *session, void *opaque, enum disp_action *act)
20
 {
21
     int rv, ret;
22
@@ -66,7 +67,8 @@
23
 
24
     ogs_assert(msg);
25
 
26
-    ogs_debug("User-Authorization-Request");
27
+    ogs_debug("Rx User-Authorization-Request");
28
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_CX_RX_UAR);
29
 
30
     /* Create answer header */
31
     qry = *msg;
32
@@ -250,7 +252,8 @@
33
 
34
     ogs_assert(msg);
35
 
36
-    ogs_debug("Multimedia-Auth-Request");
37
+    ogs_debug("Rx Multimedia-Auth-Request");
38
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_CX_RX_MAR);
39
 
40
     /* Create answer header */
41
     qry = *msg;
42
@@ -627,7 +630,8 @@
43
 
44
     ogs_assert(msg);
45
 
46
-    ogs_debug("Server-Assignment-Request");
47
+    ogs_debug("Rx Server-Assignment-Request");
48
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_CX_RX_SAR);
49
 
50
     /* Create answer header */
51
     qry = *msg;
52
@@ -875,7 +879,8 @@
53
 
54
     ogs_assert(msg);
55
 
56
-    ogs_debug("Location-Info-Request");
57
+    ogs_debug("Rx Location-Info-Request");
58
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_CX_RX_LIR);
59
 
60
     /* Create answer header */
61
     qry = *msg;
62
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/hss-init.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/hss-init.c Changed
48
 
1
@@ -20,6 +20,7 @@
2
 #include "hss-context.h"
3
 #include "hss-fd-path.h"
4
 #include "hss-sm.h"
5
+#include "metrics.h"
6
 
7
 
8
 static ogs_thread_t *thread;
9
@@ -35,9 +36,14 @@
10
     rv = ogs_app_parse_local_conf(APP_NAME);
11
     if (rv != OGS_OK) return rv;
12
 
13
+    hss_metrics_init();
14
+
15
     hss_context_init();
16
     hss_event_init();
17
 
18
+    rv = ogs_metrics_context_parse_config(APP_NAME);
19
+    if (rv != OGS_OK) return rv;
20
+
21
     rv = hss_context_parse_config();
22
     if (rv != OGS_OK) return rv;
23
 
24
@@ -45,6 +51,8 @@
25
             ogs_app()->logger.domain, ogs_app()->logger.level);
26
     if (rv != OGS_OK) return rv;
27
 
28
+    ogs_metrics_context_open(ogs_metrics_self());
29
+
30
     rv = ogs_dbi_init(ogs_app()->db_uri);
31
     if (rv != OGS_OK) return rv;
32
 
33
@@ -65,12 +73,14 @@
34
 
35
     hss_event_term();
36
     ogs_thread_destroy(thread);
37
+    ogs_metrics_context_close(ogs_metrics_self());
38
 
39
     hss_fd_final();
40
 
41
     ogs_dbi_final();
42
     hss_context_final();
43
     hss_event_final();
44
+    hss_metrics_final();
45
 
46
     return;
47
 }
48
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/hss-s6a-path.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/hss-s6a-path.c Changed
95
 
1
@@ -58,6 +58,7 @@
2
 {
3
     /* This CB should never be called */
4
     ogs_warn("Unexpected message received!");
5
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_UNKNOWN);
6
 
7
     return ENOTSUP;
8
 }
9
@@ -96,7 +97,8 @@
10
 
11
     ogs_assert(msg);
12
 
13
-    ogs_debug("Authentication-Information-Request");
14
+    ogs_debug("Rx Authentication-Information-Request");
15
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_AIR);
16
 
17
     /* Create answer header */
18
     qry = *msg;
19
@@ -765,7 +767,8 @@
20
 
21
     ogs_assert(msg);
22
 
23
-    ogs_debug("Update-Location-Request");
24
+    ogs_debug("Rx Update-Location-Request");
25
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_ULR);
26
 
27
     memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
28
 
29
@@ -1032,7 +1035,8 @@
30
 
31
     ogs_assert(msg);
32
 
33
-    ogs_debug("Purge-UE-Request");
34
+    ogs_debug("Rx Purge-UE-Request");
35
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_PUR);
36
 
37
     memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
38
 
39
@@ -1167,7 +1171,7 @@
40
     struct sess_state *sess_data = NULL, *svg;
41
     struct session *session = NULL;
42
 
43
-    ogs_debug("HSS Cancel-Location-Request");
44
+    ogs_debug("HSS Tx Cancel-Location-Request");
45
 
46
     /* Create the random value to store with the session */
47
     sess_data = ogs_calloc(1, sizeof(*sess_data));
48
@@ -1276,6 +1280,8 @@
49
     ret = fd_msg_send(&req, hss_s6a_cla_cb, svg);
50
     ogs_assert(ret == 0);
51
 
52
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_TX_CLR);
53
+
54
     /* Increment the counter */
55
     ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
56
     ogs_diam_logger_self()->stats.nb_sent++;
57
@@ -1292,7 +1298,8 @@
58
     struct session *session;
59
     int new;
60
 
61
-    ogs_debug("HSS Cancel-Location-Answer");
62
+    ogs_debug("HSS Rx Cancel-Location-Answer");
63
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_CLA);
64
 
65
     /* Search the session, retrieve its data */
66
     ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new);
67
@@ -1341,7 +1348,7 @@
68
 
69
     ogs_subscription_data_t subscription_data;
70
 
71
-    ogs_debug("HSS Insert-Subscriber-Data-Request");
72
+    ogs_debug("HSS Tx Insert-Subscriber-Data-Request");
73
 
74
     memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
75
 
76
@@ -1477,6 +1484,8 @@
77
     ret = fd_msg_send(&req, hss_s6a_ida_cb, svg);
78
     ogs_assert(ret == 0);
79
 
80
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_TX_IDR);
81
+
82
     /* Increment the counter */
83
     ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
84
     ogs_diam_logger_self()->stats.nb_sent++;
85
@@ -1496,7 +1505,8 @@
86
     struct session *session;
87
     int new;
88
 
89
-    ogs_debug("HSS Insert-Subscriber-Data-Answer");
90
+    ogs_debug("HSS Rx Insert-Subscriber-Data-Answer");
91
+    hss_metrics_inst_global_inc(HSS_METR_GLOB_CTR_S6A_RX_IDA);
92
 
93
     /* Search the session, retrieve its data */
94
     ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new);
95
open5gs_2.7.0.130.bbdf.tar.xz/src/hss/meson.build -> open5gs_2.7.0.134.d3a7.tar.xz/src/hss/meson.build Changed
35
 
1
@@ -22,6 +22,7 @@
2
     hss-event.h
3
     hss-timer.h
4
     hss-sm.h
5
+    metrics.h
6
 
7
     hss-init.c
8
     hss-context.c
9
@@ -34,11 +35,14 @@
10
     hss-swx-path.c
11
 
12
     hss-fd-path.c
13
+
14
+    metrics.c
15
 '''.split())
16
 
17
 libhss = static_library('hss',
18
     sources : libhss_sources,
19
-    dependencies : libapp_dep,
20
+    dependencies : libmetrics_dep,
21
+                    libapp_dep,
22
                     libcrypt_dep,
23
                     libdbi_dep,
24
                     libdiameter_s6a_dep,
25
@@ -48,7 +52,8 @@
26
 
27
 libhss_dep = declare_dependency(
28
     link_with : libhss,
29
-    dependencies : libapp_dep,
30
+    dependencies : libmetrics_dep,
31
+                    libapp_dep,
32
                     libcrypt_dep,
33
                     libdbi_dep,
34
                     libdiameter_s6a_dep,
35
open5gs_2.7.0.134.d3a7.tar.xz/src/hss/metrics.c Added
161
 
1
@@ -0,0 +1,159 @@
2
+#include "ogs-app.h"
3
+#include "hss-context.h"
4
+
5
+#include "metrics.h"
6
+
7
+typedef struct hss_metrics_spec_def_s {
8
+    unsigned int type;
9
+    const char *name;
10
+    const char *description;
11
+    int initial_val;
12
+    unsigned int num_labels;
13
+    const char **labels;
14
+} hss_metrics_spec_def_t;
15
+
16
+/* Helper generic functions: */
17
+static int hss_metrics_init_inst(ogs_metrics_inst_t **inst, ogs_metrics_spec_t **specs,
18
+        unsigned int len, unsigned int num_labels, const char **labels)
19
+{
20
+    unsigned int i;
21
+    for (i = 0; i < len; i++)
22
+        insti = ogs_metrics_inst_new(specsi, num_labels, labels);
23
+    return OGS_OK;
24
+}
25
+
26
+static int hss_metrics_free_inst(ogs_metrics_inst_t **inst,
27
+        unsigned int len)
28
+{
29
+    unsigned int i;
30
+    for (i = 0; i < len; i++)
31
+        ogs_metrics_inst_free(insti);
32
+    memset(inst, 0, sizeof(inst0) * len);
33
+    return OGS_OK;
34
+}
35
+
36
+static int hss_metrics_init_spec(ogs_metrics_context_t *ctx,
37
+        ogs_metrics_spec_t **dst, hss_metrics_spec_def_t *src, unsigned int len)
38
+{
39
+    unsigned int i;
40
+    for (i = 0; i < len; i++) {
41
+        dsti = ogs_metrics_spec_new(ctx, srci.type,
42
+                srci.name, srci.description,
43
+                srci.initial_val, srci.num_labels, srci.labels,
44
+                NULL);
45
+    }
46
+    return OGS_OK;
47
+}
48
+
49
+/* GLOBAL */
50
+ogs_metrics_spec_t *hss_metrics_spec_global_HSS_METR_GLOB_MAX;
51
+ogs_metrics_inst_t *hss_metrics_inst_global_HSS_METR_GLOB_MAX;
52
+hss_metrics_spec_def_t hss_metrics_spec_def_global_HSS_METR_GLOB_MAX = {
53
+/* Global Counters: */
54
+HSS_METR_GLOB_CTR_CX_RX_UNKNOWN = {
55
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
56
+    .name = "cx_rx_unknown",
57
+    .description = "Received Cx unknown messages",
58
+},
59
+HSS_METR_GLOB_CTR_CX_RX_MAR = {
60
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
61
+    .name = "cx_rx_mar",
62
+    .description = "Received Cx MAR messages",
63
+},
64
+HSS_METR_GLOB_CTR_CX_RX_SAR = {
65
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
66
+    .name = "cx_rx_sar",
67
+    .description = "Received Cx SAR messages",
68
+},
69
+HSS_METR_GLOB_CTR_CX_RX_UAR = {
70
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
71
+    .name = "cx_rx_uar",
72
+    .description = "Received Cx UAR messages",
73
+},
74
+HSS_METR_GLOB_CTR_CX_RX_LIR = {
75
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
76
+    .name = "cx_rx_lir",
77
+    .description = "Received Cx LIR messages",
78
+},
79
+HSS_METR_GLOB_CTR_S6A_RX_UNKNOWN = {
80
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
81
+    .name = "s6a_rx_unknown",
82
+    .description = "Received s6a unknown messages",
83
+},
84
+HSS_METR_GLOB_CTR_S6A_RX_AIR = {
85
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
86
+    .name = "s6a_rx_air",
87
+    .description = "Received s6a AIR messages",
88
+},
89
+HSS_METR_GLOB_CTR_S6A_RX_CLA = {
90
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
91
+    .name = "s6a_rx_cla",
92
+    .description = "Received s6a CLA messages",
93
+},
94
+HSS_METR_GLOB_CTR_S6A_RX_IDA = {
95
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
96
+    .name = "s6a_rx_ida",
97
+    .description = "Received s6a IDA messages",
98
+},
99
+HSS_METR_GLOB_CTR_S6A_RX_PUR = {
100
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
101
+    .name = "s6a_rx_pur",
102
+    .description = "Received s6a PUR messages",
103
+},
104
+HSS_METR_GLOB_CTR_S6A_RX_ULR = {
105
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
106
+    .name = "s6a_rx_ulr",
107
+    .description = "Received s6a ULR messages",
108
+},
109
+HSS_METR_GLOB_CTR_S6A_TX_CLR = {
110
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
111
+    .name = "s6a_tx_clr",
112
+    .description = "Transmitted s6a CLR messages",
113
+},
114
+HSS_METR_GLOB_CTR_S6A_TX_IDR = {
115
+    .type = OGS_METRICS_METRIC_TYPE_COUNTER,
116
+    .name = "s6a_tx_idr",
117
+    .description = "Transmitted s6a IDR messages",
118
+},
119
+/* Global Gauges: */
120
+HSS_METR_GLOB_GAUGE_IMSI = {
121
+    .type = OGS_METRICS_METRIC_TYPE_GAUGE,
122
+    .name = "hss_imsi",
123
+    .description = "Number of IMSIs attached to HSS",
124
+},
125
+HSS_METR_GLOB_GAUGE_IMPI = {
126
+    .type = OGS_METRICS_METRIC_TYPE_GAUGE,
127
+    .name = "hss_impi",
128
+    .description = "Number of IMPIs attached to HSS",
129
+},
130
+HSS_METR_GLOB_GAUGE_IMPU = {
131
+    .type = OGS_METRICS_METRIC_TYPE_GAUGE,
132
+    .name = "hss_impu",
133
+    .description = "Number of IMPUs attached to HSS",
134
+},
135
+};
136
+int hss_metrics_init_inst_global(void)
137
+{
138
+    return hss_metrics_init_inst(hss_metrics_inst_global, hss_metrics_spec_global,
139
+                _HSS_METR_GLOB_MAX, 0, NULL);
140
+}
141
+int hss_metrics_free_inst_global(void)
142
+{
143
+    return hss_metrics_free_inst(hss_metrics_inst_global, _HSS_METR_GLOB_MAX);
144
+}
145
+
146
+void hss_metrics_init(void)
147
+{
148
+    ogs_metrics_context_t *ctx = ogs_metrics_self();
149
+    ogs_metrics_context_init();
150
+
151
+    hss_metrics_init_spec(ctx, hss_metrics_spec_global, hss_metrics_spec_def_global,
152
+            _HSS_METR_GLOB_MAX);
153
+
154
+    hss_metrics_init_inst_global();
155
+}
156
+
157
+void hss_metrics_final(void)
158
+{
159
+    ogs_metrics_context_final();
160
+}
161
open5gs_2.7.0.134.d3a7.tar.xz/src/hss/metrics.h Added
53
 
1
@@ -0,0 +1,51 @@
2
+#ifndef HSS_METRICS_H
3
+#define HSS_METRICS_H
4
+
5
+#include "ogs-metrics.h"
6
+
7
+#ifdef __cplusplus
8
+extern "C" {
9
+#endif
10
+
11
+/* GLOBAL */
12
+typedef enum hss_metric_type_global_s {
13
+    HSS_METR_GLOB_CTR_CX_RX_UNKNOWN,
14
+    HSS_METR_GLOB_CTR_CX_RX_MAR,
15
+    HSS_METR_GLOB_CTR_CX_RX_SAR,
16
+    HSS_METR_GLOB_CTR_CX_RX_UAR,
17
+    HSS_METR_GLOB_CTR_CX_RX_LIR,
18
+    HSS_METR_GLOB_CTR_S6A_RX_UNKNOWN,
19
+    HSS_METR_GLOB_CTR_S6A_RX_AIR,
20
+    HSS_METR_GLOB_CTR_S6A_RX_CLA,
21
+    HSS_METR_GLOB_CTR_S6A_RX_IDA,
22
+    HSS_METR_GLOB_CTR_S6A_RX_PUR,
23
+    HSS_METR_GLOB_CTR_S6A_RX_ULR,
24
+    HSS_METR_GLOB_CTR_S6A_TX_CLR,
25
+    HSS_METR_GLOB_CTR_S6A_TX_IDR,
26
+    HSS_METR_GLOB_GAUGE_IMSI,
27
+    HSS_METR_GLOB_GAUGE_IMPI,
28
+    HSS_METR_GLOB_GAUGE_IMPU,
29
+    _HSS_METR_GLOB_MAX,
30
+} hss_metric_type_global_t;
31
+extern ogs_metrics_inst_t *hss_metrics_inst_global_HSS_METR_GLOB_MAX;
32
+
33
+int hss_metrics_init_inst_global(void);
34
+int hss_metrics_free_inst_global(void);
35
+
36
+static inline void hss_metrics_inst_global_set(hss_metric_type_global_t t, int val)
37
+{ ogs_metrics_inst_set(hss_metrics_inst_globalt, val); }
38
+static inline void hss_metrics_inst_global_add(hss_metric_type_global_t t, int val)
39
+{ ogs_metrics_inst_add(hss_metrics_inst_globalt, val); }
40
+static inline void hss_metrics_inst_global_inc(hss_metric_type_global_t t)
41
+{ ogs_metrics_inst_inc(hss_metrics_inst_globalt); }
42
+static inline void hss_metrics_inst_global_dec(hss_metric_type_global_t t)
43
+{ ogs_metrics_inst_dec(hss_metrics_inst_globalt); }
44
+
45
+void hss_metrics_init(void);
46
+void hss_metrics_final(void);
47
+
48
+#ifdef __cplusplus
49
+}
50
+#endif
51
+
52
+#endif /* HSS_METRICS_H */
53
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/context.h -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/context.h Changed
11
 
1
@@ -357,6 +357,9 @@
2
         uint64_t dl_octets;
3
         ogs_time_t duration;
4
         uint32_t reporting_reason; /* OGS_DIAM_GY_REPORTING_REASON_* */
5
+        /* Whether Gy Final-Unit-Indication was received.
6
+         * Triggers session release upon Rx of next PFCP Report Req */
7
+        bool final_unit;
8
         /* Snapshot of measurement when last report was sent: */
9
         struct {
10
             uint64_t ul_octets;
11
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/gsm-sm.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/gsm-sm.c Changed
24
 
1
@@ -727,6 +727,7 @@
2
 
3
     ogs_pfcp_xact_t *pfcp_xact = NULL;
4
     ogs_pfcp_message_t *pfcp_message = NULL;
5
+    uint8_t pfcp_cause;
6
 
7
     ogs_diam_gy_message_t *gy_message = NULL;
8
     uint32_t diam_err;
9
@@ -838,6 +839,14 @@
10
             OGS_FSM_TRAN(s, smf_gsm_state_epc_session_will_release);
11
             break;
12
 
13
+        case OGS_PFCP_SESSION_REPORT_REQUEST_TYPE:
14
+            pfcp_cause = smf_n4_handle_session_report_request(sess, pfcp_xact,
15
+                            &pfcp_message->pfcp_session_report_request);
16
+            if (pfcp_cause != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) {
17
+               OGS_FSM_TRAN(s, smf_gsm_state_wait_pfcp_deletion);
18
+            }
19
+            break;
20
+
21
         default:
22
             ogs_error("cannot handle PFCP message type%d",
23
                     pfcp_message->h.type);
24
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/gy-handler.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/gy-handler.c Changed
17
 
1
@@ -164,6 +164,7 @@
2
     /* Configure based on what we received from OCS: */
3
     urr_update_time(sess, bearer->urr, gy_message);
4
     urr_update_volume(sess, bearer->urr, gy_message);
5
+    sess->gy.final_unit = gy_message->cca.final.cc_final_action_present;
6
 
7
     /* Associate acconting URR each direction PDR: */
8
     ogs_pfcp_pdr_associate_urr(bearer->ul_pdr, bearer->urr);
9
@@ -221,6 +222,7 @@
10
 
11
     urr_update_time(sess, urr, gy_message);
12
     urr_update_volume(sess, urr, gy_message);
13
+    sess->gy.final_unit = gy_message->cca.final.cc_final_action_present;
14
     /* Associate accounting URR each direction PDR: */
15
     ogs_pfcp_pdr_associate_urr(bearer->ul_pdr, urr);
16
     ogs_pfcp_pdr_associate_urr(bearer->dl_pdr, urr);
17
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/gy-path.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/gy-path.c Changed
68
 
1
@@ -48,6 +48,8 @@
2
 
3
 static int decode_granted_service_unit(
4
         ogs_diam_gy_service_unit_t *su, struct avp *avpch1, int *perror);
5
+static int decode_final_unit_indication(
6
+        ogs_diam_gy_final_unit_t *fu, struct avp *avpch1, int *perror);
7
 static void smf_gy_cca_cb(void *data, struct msg **msg);
8
 
9
 static __inline__ struct sess_state *new_state(os0_t sid)
10
@@ -1149,6 +1151,11 @@
11
                 case OGS_DIAM_GY_AVP_CODE_VOLUME_QUOTA_THRESHOLD:
12
                     gy_message->cca.volume_threshold = hdr->avp_value->u32;
13
                     break;
14
+                case OGS_DIAM_GY_AVP_CODE_FINAL_UNIT_INDICATION:
15
+                    rv = decode_final_unit_indication(
16
+                            &gy_message->cca.final, avpch1, &error);
17
+                    ogs_assert(rv == OGS_OK);
18
+                    break;
19
                 default:
20
                     ogs_warn("Not supported(%d)", hdr->avp_code);
21
                     break;
22
@@ -1455,6 +1462,45 @@
23
         default:
24
             ogs_error("Not implemented(%d)", hdr->avp_code);
25
             break;
26
+        }
27
+        fd_msg_browse(avpch2, MSG_BRW_NEXT, &avpch2, NULL);
28
+    }
29
+
30
+    if (perror)
31
+        *perror = error;
32
+
33
+    return OGS_OK;
34
+}
35
+
36
+static int decode_final_unit_indication(
37
+        ogs_diam_gy_final_unit_t *fu, struct avp *avpch1, int *perror)
38
+{
39
+    int ret = 0, error = 0;
40
+    struct avp *avpch2;
41
+    struct avp_hdr *hdr;
42
+
43
+    ogs_assert(fu);
44
+    ogs_assert(avpch1);
45
+    memset(fu, 0, sizeof(*fu));
46
+
47
+    ret = fd_msg_browse(avpch1, MSG_BRW_FIRST_CHILD, &avpch2, NULL);
48
+    ogs_assert(ret == 0);
49
+    while (avpch2) {
50
+        ret = fd_msg_avp_hdr(avpch2, &hdr);
51
+        ogs_assert(ret == 0);
52
+        switch (hdr->avp_code) {
53
+        case OGS_DIAM_GY_AVP_CODE_FINAL_UNIT_ACTION:
54
+            fu->cc_final_action_present = true;
55
+            fu->cc_final_action = hdr->avp_value->i32;
56
+            break;
57
+        /* TODO:
58
+        case OGS_DIAM_GY_AVP_CODE_REDIRECT_SERVER:
59
+        case OGS_DIAM_GY_AVP_CODE_FILTER_ID:
60
+        case OGS_DIAM_GY_AVP_CODE_RESTRICTION_FILTER_RULE:
61
+        */
62
+        default:
63
+            ogs_error("Not implemented(%d)", hdr->avp_code);
64
+            break;
65
         }
66
         fd_msg_browse(avpch2, MSG_BRW_NEXT, &avpch2, NULL);
67
     }
68
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/n4-handler.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/n4-handler.c Changed
80
 
1
@@ -1147,7 +1147,9 @@
2
     return OGS_PFCP_CAUSE_REQUEST_ACCEPTED;
3
 }
4
 
5
-void smf_n4_handle_session_report_request(
6
+/* Returns OGS_PFCP_CAUSE_REQUEST_ACCEPTED on success,
7
+ * other cause value on failure */
8
+uint8_t smf_n4_handle_session_report_request(
9
         smf_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact,
10
         ogs_pfcp_session_report_request_t *pfcp_req)
11
 {
12
@@ -1185,7 +1187,7 @@
13
         ogs_pfcp_send_error_message(pfcp_xact, 0,
14
                 OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE,
15
                 cause_value, 0);
16
-        return;
17
+        return cause_value;
18
     }
19
 
20
     ogs_assert(sess);
21
@@ -1225,7 +1227,7 @@
22
                         ogs_pfcp_send_error_message(pfcp_xact, 0,
23
                                 OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE,
24
                                 OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED, 0);
25
-                        return;
26
+                        return OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED;
27
                     }
28
 
29
                     if (qfi) {
30
@@ -1235,7 +1237,7 @@
31
                             ogs_pfcp_send_error_message(pfcp_xact, 0,
32
                                 OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE,
33
                                 OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0);
34
-                            return;
35
+                            return OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND;
36
                         }
37
                     }
38
                 } else {
39
@@ -1260,7 +1262,7 @@
40
             ogs_pfcp_send_error_message(pfcp_xact, 0,
41
                     OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE,
42
                     OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0);
43
-            return;
44
+            return OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND;
45
         }
46
 
47
         switch (sess->up_cnx_state) {
48
@@ -1332,14 +1334,21 @@
49
             sess->gy.reporting_reason =
50
                 smf_pfcp_urr_usage_report_trigger2diam_gy_reporting_reason(&rep_trig);
51
         }
52
-        switch(smf_use_gy_iface()) {
53
+        switch (smf_use_gy_iface()) {
54
         case 1:
55
-            smf_gy_send_ccr(sess, pfcp_xact,
56
-                    OGS_DIAM_GY_CC_REQUEST_TYPE_UPDATE_REQUEST);
57
+            if (!sess->gy.final_unit) {
58
+                smf_gy_send_ccr(sess, pfcp_xact,
59
+                        OGS_DIAM_GY_CC_REQUEST_TYPE_UPDATE_REQUEST);
60
+            } else {
61
+                ogs_debug("%s:%s Rx PFCP report after Gy Final Unit Indication",
62
+                          smf_ue->imsi_bcd, sess->session.name);
63
+                /* This effectively triggers session release: */
64
+                cause_value = OGS_PFCP_CAUSE_NO_RESOURCES_AVAILABLE;
65
+            }
66
             break;
67
         case -1:
68
             ogs_error("No Gy Diameter Peer");
69
-            /* TODO: terminate connection */
70
+            cause_value = OGS_PFCP_CAUSE_NO_RESOURCES_AVAILABLE;
71
             break;
72
         /* default: continue below */
73
         }
74
@@ -1379,4 +1388,5 @@
75
                     0));
76
         }
77
     }
78
+    return cause_value;
79
 }
80
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/n4-handler.h -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/n4-handler.h Changed
10
 
1
@@ -47,7 +47,7 @@
2
         smf_sess_t *sess, ogs_pfcp_xact_t *xact,
3
         ogs_pfcp_session_deletion_response_t *rsp);
4
 
5
-void smf_n4_handle_session_report_request(
6
+uint8_t smf_n4_handle_session_report_request(
7
         smf_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact,
8
         ogs_pfcp_session_report_request_t *pfcp_req);
9
 
10
open5gs_2.7.0.130.bbdf.tar.xz/src/smf/pfcp-sm.c -> open5gs_2.7.0.134.d3a7.tar.xz/src/smf/pfcp-sm.c Changed
18
 
1
@@ -370,8 +370,14 @@
2
         case OGS_PFCP_SESSION_REPORT_REQUEST_TYPE:
3
             if (!message->h.seid_presence) ogs_error("No SEID");
4
 
5
-            smf_n4_handle_session_report_request(
6
-                sess, xact, &message->pfcp_session_report_request);
7
+            if (!sess) {
8
+                    ogs_error("No Session");
9
+                    ogs_pfcp_send_error_message(xact, 0,
10
+                        OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE,
11
+                        OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0);
12
+                    break;
13
+            }
14
+            ogs_fsm_dispatch(&sess->sm, e);
15
             break;
16
 
17
         default:
18