Changes of Revision 23

open5gs_2.4.8.202207190002.dsc -> open5gs_2.4.8.202207200002.dsc Changed
x
 
1
@@ -2,7 +2,7 @@
2
 Source: open5gs
3
 Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
 Architecture: any
5
-Version: 2.4.8.202207190002
6
+Version: 2.4.8.202207200002
7
 Maintainer: Harald Welte <laforge@gnumonks.org>
8
 Uploaders: Sukchan Lee <acetcom@gmail.com>
9
 Homepage: https://open5gs.org
10
@@ -30,8 +30,8 @@
11
  open5gs-udr deb net optional arch=any
12
  open5gs-upf deb net optional arch=any
13
 Checksums-Sha1:
14
- d85012cdd7f81a447b1bfdaad4303d9e302a99ca 11455644 open5gs_2.4.8.202207190002.tar.xz
15
+ a121a71edaff78387a597d3da2fa7654cfc7adab 11455648 open5gs_2.4.8.202207200002.tar.xz
16
 Checksums-Sha256:
17
- 33497874ad1e51a8e7f1f8151db13cb7aa09eb6348a079fa1ae85ebdfa085715 11455644 open5gs_2.4.8.202207190002.tar.xz
18
+ f834008fcf5b5695388649e83e584547f94dcd2ee642e61cf27126946911bc79 11455648 open5gs_2.4.8.202207200002.tar.xz
19
 Files:
20
- 64648eed88270791871aa187cfe5e929 11455644 open5gs_2.4.8.202207190002.tar.xz
21
+ c725df0c2fb3a7042cbe12a1333dd194 11455648 open5gs_2.4.8.202207200002.tar.xz
22
open5gs_2.4.8.202207190002.tar.xz/debian/changelog -> open5gs_2.4.8.202207200002.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-open5gs (2.4.8.202207190002) UNRELEASED; urgency=medium
3
+open5gs (2.4.8.202207200002) UNRELEASED; urgency=medium
4
 
5
   * Snapshot build
6
 
7
- -- Sukchan Lee <acetcom@gmail.com>  Tue, 19 Jul 2022 00:09:06 +0000
8
+ -- Sukchan Lee <acetcom@gmail.com>  Wed, 20 Jul 2022 00:09:30 +0000
9
 
10
 open5gs (2.4.8) unstable; urgency=medium
11
 
12
open5gs_2.4.8.202207190002.tar.xz/debian/control -> open5gs_2.4.8.202207200002.tar.xz/debian/control Changed
163
 
1
@@ -31,7 +31,7 @@
2
 Package: open5gs-common
3
 Architecture: any
4
 Multi-Arch: same
5
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
6
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
7
          ${misc:Depends}
8
 Description: 5G Core and EPC (Shared Files)
9
  Open5GS is a C-language implementation of 5G Core and EPC
10
@@ -43,7 +43,7 @@
11
 Package: open5gs-mme
12
 Architecture: any
13
 Multi-Arch: same
14
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
15
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
16
          ${misc:Depends},
17
          open5gs-common (= ${binary:Version})
18
 Description: MME (Mobility Management Entity)
19
@@ -58,7 +58,7 @@
20
 Package: open5gs-sgwc
21
 Architecture: any
22
 Multi-Arch: same
23
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
24
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
25
          ${misc:Depends},
26
          open5gs-common (= ${binary:Version})
27
 Description: SGW-C (Serving Gateway - Control Plane)
28
@@ -72,7 +72,7 @@
29
 Package: open5gs-smf
30
 Architecture: any
31
 Multi-Arch: same
32
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
33
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
34
          ${misc:Depends},
35
          open5gs-common (= ${binary:Version})
36
 Description: SMF (Session Management Function)
37
@@ -84,7 +84,7 @@
38
 Package: open5gs-amf
39
 Architecture: any
40
 Multi-Arch: same
41
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
42
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
43
          ${misc:Depends},
44
          open5gs-common (= ${binary:Version})
45
 Description: AMF (Access and Mobility Management Function)
46
@@ -96,7 +96,7 @@
47
 Package: open5gs-sgwu
48
 Architecture: any
49
 Multi-Arch: same
50
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
51
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
52
          ${misc:Depends},
53
          open5gs-common (= ${binary:Version})
54
 Description: SGW-U (Serving Gateway - User Plane)
55
@@ -110,7 +110,7 @@
56
 Package: open5gs-upf
57
 Architecture: any
58
 Multi-Arch: same
59
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
60
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
61
          ${misc:Depends},
62
          udev,
63
          open5gs-common (= ${binary:Version})
64
@@ -123,7 +123,7 @@
65
 Package: open5gs-hss
66
 Architecture: any
67
 Multi-Arch: same
68
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
69
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
70
          ${misc:Depends},
71
          mongodb-org | mongodb,
72
          open5gs-common (= ${binary:Version})
73
@@ -140,7 +140,7 @@
74
 Package: open5gs-pcrf
75
 Architecture: any
76
 Multi-Arch: same
77
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
78
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
79
          ${misc:Depends},
80
          mongodb-org | mongodb,
81
          open5gs-common (= ${binary:Version})
82
@@ -156,7 +156,7 @@
83
 Package: open5gs-nrf
84
 Architecture: any
85
 Multi-Arch: same
86
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
87
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
88
          ${misc:Depends},
89
          open5gs-common (= ${binary:Version})
90
 Description: NRF (Network Repository Function)
91
@@ -168,7 +168,7 @@
92
 Package: open5gs-ausf
93
 Architecture: any
94
 Multi-Arch: same
95
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
96
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
97
          ${misc:Depends},
98
          open5gs-common (= ${binary:Version})
99
 Description: AUSF (Authentication Server Function)
100
@@ -180,7 +180,7 @@
101
 Package: open5gs-udm
102
 Architecture: any
103
 Multi-Arch: same
104
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
105
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
106
          ${misc:Depends},
107
          open5gs-common (= ${binary:Version})
108
 Description: UDM (Unified Data Management)
109
@@ -192,7 +192,7 @@
110
 Package: open5gs-pcf
111
 Architecture: any
112
 Multi-Arch: same
113
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
114
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
115
          ${misc:Depends},
116
          open5gs-common (= ${binary:Version})
117
 Description: PCF (Policy Control Function)
118
@@ -204,7 +204,7 @@
119
 Package: open5gs-nssf
120
 Architecture: any
121
 Multi-Arch: same
122
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
123
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
124
          ${misc:Depends},
125
          open5gs-common (= ${binary:Version})
126
 Description: NSSF (Network Slice Selection Function)
127
@@ -216,7 +216,7 @@
128
 Package: open5gs-bsf
129
 Architecture: any
130
 Multi-Arch: same
131
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
132
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
133
          ${misc:Depends},
134
          open5gs-common (= ${binary:Version})
135
 Description: BSF (Binding Support Function)
136
@@ -228,7 +228,7 @@
137
 Package: open5gs-udr
138
 Architecture: any
139
 Multi-Arch: same
140
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${shlibs:Depends},
141
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${shlibs:Depends},
142
          ${misc:Depends},
143
          open5gs-common (= ${binary:Version})
144
 Description: UDR (Unified Data Repository)
145
@@ -240,7 +240,7 @@
146
 Package: open5gs
147
 Architecture: any
148
 Multi-Arch: same
149
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${misc:Depends},
150
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends},
151
          open5gs-common (= ${binary:Version}),
152
          open5gs-mme (= ${binary:Version}),
153
          open5gs-sgwc (= ${binary:Version}),
154
@@ -266,7 +266,7 @@
155
 Package: open5gs-dbg
156
 Architecture: any
157
 Multi-Arch: same
158
-Depends: osmocom-nightly (= 1.0.0.202207190002), ${misc:Depends},
159
+Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends},
160
          open5gs (= ${binary:Version})
161
 Description: Debug symbols for Open5GS
162
  Open5GS is a C-language implementation of 5G Core and EPC
163
open5gs_2.4.8.202207190002.tar.xz/lib/nas/5gs/types.h -> open5gs_2.4.8.202207200002.tar.xz/lib/nas/5gs/types.h Changed
112
 
1
@@ -106,34 +106,53 @@
2
 
3
 /* 9.11.3.2 5GMM cause
4
  * M V 1 */
5
+
6
+/* REQUEST_ACCEPTED(16) cause is defined by Open5GS */
7
+#define OGS_5GMM_CAUSE_REQUEST_ACCEPTED 16
8
+
9
+/* Annex A (informative): Cause values for 5GS mobility management
10
+ * A.1 Causes related to UE identification */
11
 #define OGS_5GMM_CAUSE_ILLEGAL_UE 3
12
-#define OGS_5GMM_CAUSE_PEI_NOT_ACCEPTED 5
13
 #define OGS_5GMM_CAUSE_ILLEGAL_ME 6
14
-#define OGS_5GMM_CAUSE_5GS_SERVICES_NOT_ALLOWED 7
15
 #define OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK 9
16
 #define OGS_5GMM_CAUSE_IMPLICITLY_DE_REGISTERED 10
17
+
18
+/* A.2 Cause related to subscription options */
19
+#define OGS_5GMM_CAUSE_PEI_NOT_ACCEPTED 5
20
+#define OGS_5GMM_CAUSE_5GS_SERVICES_NOT_ALLOWED 7
21
 #define OGS_5GMM_CAUSE_PLMN_NOT_ALLOWED 11
22
 #define OGS_5GMM_CAUSE_TRACKING_AREA_NOT_ALLOWED 12
23
 #define OGS_5GMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA 13
24
 #define OGS_5GMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA 15
25
+#define OGS_5GMM_CAUSE_N1_MODE_NOT_ALLOWED 27
26
+#define OGS_5GMM_CAUSE_REDIRECTION_TO_EPC_REQUIRED 31
27
+#define OGS_5GMM_CAUSE_NON_3GPP_ACCESS_TO_5GCN_NOT_ALLOWED 72
28
+#define OGS_5GMM_CAUSE_TEMPORARILY_NOT_AUTHORIZED_FOR_THIS_SNPN 74
29
+#define OGS_5GMM_CAUSE_PERMANENTLY_NOT_AUTHORIZED_FOR_THIS_SNPN 75
30
+#define OGS_5GMM_CAUSE_NOT_AUTHORIZED_FOR_THIS_CAG_OR_AUITHORIZED_FOR_CAG_CELLS_ONLY 76
31
+#define WIRELESS_ACCESS_AREA_NOT_ALLOWED 76
32
+
33
+/* A.3 Causes related to PLMN or SNPN specific network failures
34
+ * and congestion/authentication failures */
35
 #define OGS_5GMM_CAUSE_MAC_FAILURE 20
36
 #define OGS_5GMM_CAUSE_SYNCH_FAILURE 21
37
 #define OGS_5GMM_CAUSE_CONGESTION 22
38
 #define OGS_5GMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH 23
39
 #define OGS_5GMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED 24
40
 #define OGS_5GMM_CAUSE_NON_5G_AUTHENTICATION_UNACCEPTABLE 26
41
-#define OGS_5GMM_CAUSE_N1_MODE_NOT_ALLOWED 27
42
 #define OGS_5GMM_CAUSE_RESTRICTED_SERVICE_AREA 28
43
 #define OGS_5GMM_CAUSE_LADN_NOT_AVAILABLE 43
44
+#define OGS_5GMM_CAUSE_NO_NETWORK_SLICES_AVAILABLE 62
45
 #define OGS_5GMM_CAUSE_MAXIMUM_NUMBER_OF_PDU_SESSIONS_REACHED 65
46
 #define OGS_5GMM_CAUSE_INSUFFICIENT_RESOURCES_FOR_SPECIFIC_SLICE_AND_DNN 67
47
 #define OGS_5GMM_CAUSE_INSUFFICIENT_RESOURCES_FOR_SPECIFIC_SLICE 69
48
 #define OGS_5GMM_CAUSE_NGKSI_ALREADY_IN_USE 71
49
-#define OGS_5GMM_CAUSE_NON_3GPP_ACCESS_TO_5GCN_NOT_ALLOWED 72
50
 #define OGS_5GMM_CAUSE_SERVING_NETWORK_NOT_AUTHORIZED 73
51
 #define OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED 90
52
 #define OGS_5GMM_CAUSE_DNN_NOT_SUPPORTED_OR_NOT_SUBSCRIBED_IN_THE_SLICE 91
53
 #define OGS_5GMM_CAUSE_INSUFFICIENT_USER_PLANE_RESOURCES_FOR_THE_PDU_SESSION 92
54
+
55
+/* A.4 Causes related to invalid messages */
56
 #define OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95
57
 #define OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION 96
58
 #define OGS_5GMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97
59
@@ -291,7 +310,7 @@
60
     /*
61
      * Do not change 'ogs_5gs_tai_t' to 'ogs_nas_tracking_area_identity_t'.
62
      * Use 'ogs_5gs_tai_t' for easy implementation.
63
-     * ogs_nas_tai_list_build() changes to NAS 
64
+     * ogs_nas_tai_list_build() changes to NAS
65
      * format(ogs_nas_tracking_area_identity_t)
66
      * and is sent to the UE.
67
      */
68
@@ -639,6 +658,9 @@
69
 
70
 /* 9.11.4.2 5GSM cause
71
  * O TV 2 */
72
+
73
+/* Annex B (informative): Cause values for 5GS session management
74
+ * B.1 Causes related to nature of request */
75
 #define OGS_5GSM_CAUSE_OPERATOR_DETERMINED_BARRING 8
76
 #define OGS_5GSM_CAUSE_INSUFFICIENT_RESOURCES 26
77
 #define OGS_5GSM_CAUSE_MISSING_OR_UNKNOWN_DNN 27
78
@@ -647,11 +669,12 @@
79
 #define OGS_5GSM_CAUSE_REQUEST_REJECTED_UNSPECIFIED 31
80
 #define OGS_5GSM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED 32
81
 #define OGS_5GSM_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED 33
82
-#define OGS_5GSM_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER 34
83
 #define OGS_5GSM_CAUSE_PTI_ALREADY_IN_USE 35
84
 #define OGS_5GSM_CAUSE_REGULAR_DEACTIVATION 36
85
 #define OGS_5GSM_CAUSE_NETWORK_FAILURE 38
86
 #define OGS_5GSM_CAUSE_REACTIVATION_REQUESTED 39
87
+#define OGS_5GSM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION 41
88
+#define OGS_5GSM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION 42
89
 #define OGS_5GSM_CAUSE_INVALID_PDU_SESSION_IDENTITY 43
90
 #define OGS_5GSM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS 44
91
 #define OGS_5GSM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS 45
92
@@ -660,6 +683,10 @@
93
 #define OGS_5GSM_CAUSE_PDU_SESSION_TYPE_IPV4_ONLY_ALLOWED 50
94
 #define OGS_5GSM_CAUSE_PDU_SESSION_TYPE_IPV6_ONLY_ALLOWED 51
95
 #define OGS_5GSM_CAUSE_PDU_SESSION_DOES_NOT_EXIST 54
96
+#define OGS_5GSM_CAUSE_PDU_SESSION_TYPE_IPV4V6_ONLY_ALLOWED 57
97
+#define OGS_5GSM_CAUSE_PDU_SESSION_TYPE_UNSTRUCTURED_ONLY_ALLOWED 58
98
+#define OGS_5GSM_CAUSE_UNSUPPORTED_5QI_VALUE 59
99
+#define OGS_5GSM_CAUSE_PDU_SESSION_TYPE_ETHERNET_ONLY_ALLOWED 61
100
 #define OGS_5GSM_CAUSE_INSUFFICIENT_RESOURCES_FOR_SPECIFIC_SLICE_AND_DNN 67
101
 #define OGS_5GSM_CAUSE_NOT_SUPPORTED_SSC_MODE 68
102
 #define OGS_5GSM_CAUSE_INSUFFICIENT_RESOURCES_FOR_SPECIFIC_SLICE 69
103
@@ -669,6 +696,8 @@
104
 #define OGS_5GSM_CAUSE_SEMANTIC_ERROR_IN_THE_QOS_OPERATION 83
105
 #define OGS_5GSM_CAUSE_SYNTACTICAL_ERROR_IN_THE_QOS_OPERATION 84
106
 #define OGS_5GSM_CAUSE_INVALID_MAPPED_EPS_BEARER_IDENTITY 85
107
+
108
+/* B.2 Protocol errors (e.g., unknown message) */
109
 #define OGS_5GSM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95
110
 #define OGS_5GSM_CAUSE_INVALID_MANDATORY_INFORMATION 96
111
 #define OGS_5GSM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97
112
open5gs_2.4.8.202207190002.tar.xz/lib/nas/eps/types.h -> open5gs_2.4.8.202207200002.tar.xz/lib/nas/eps/types.h Changed
201
 
1
@@ -182,8 +182,8 @@
2
 } __attribute__ ((packed)) ogs_nas_csfb_response_t;
3
 
4
 /* 9.9.3.7 Detach type
5
- * M V 1/2 
6
- * 9.9.3.21 NAS key set identifier 
7
+ * M V 1/2
8
+ * 9.9.3.21 NAS key set identifier
9
  * M V 1/2 */
10
 #define OGS_NAS_DETACH_TYPE_FROM_UE_EPS_DETACH                  1
11
 #define OGS_NAS_DETACH_TYPE_FROM_UE_IMSI_DETACH                 2
12
@@ -222,51 +222,55 @@
13
 } __attribute__ ((packed)) ogs_nas_drx_parameter_t;
14
 
15
 /* 9.9.3.9 EMM cause
16
- * O TV 2 
17
- * Annex A (informative) Cause values for EPS mobility management 
18
+ * O TV 2 */
19
+
20
+/* REQUEST_ACCEPTED(16) cause is defined by Open5GS */
21
+#define EMM_CAUSE_REQUEST_ACCEPTED 16
22
+
23
+/* Annex A (informative) Cause values for EPS mobility management
24
  * A.1 Causes related to UE identification */
25
-#define EMM_CAUSE_IMSI_UNKNOWN_IN_HSS 2
26
-#define EMM_CAUSE_ILLEGAL_UE 3
27
-#define EMM_CAUSE_IMSI_UNKNOWN_IN_VLR 4
28
-#define EMM_CAUSE_ILLEGAL_ME 6
29
-#define EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK 9
30
-#define EMM_CAUSE_IMPLICITLY_DETACHED 10
31
+#define OGS_NAS_EMM_CAUSE_IMSI_UNKNOWN_IN_HSS 2
32
+#define OGS_NAS_EMM_CAUSE_ILLEGAL_UE 3
33
+#define OGS_NAS_EMM_CAUSE_IMSI_UNKNOWN_IN_VLR 4
34
+#define OGS_NAS_EMM_CAUSE_ILLEGAL_ME 6
35
+#define OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK 9
36
+#define OGS_NAS_EMM_CAUSE_IMPLICITLY_DETACHED 10
37
 /* A.2 Cause related to subscription options */
38
-#define EMM_CAUSE_IMEI_NOT_ACCEPTED 5
39
-#define EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED 7
40
-#define EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED 8
41
-#define EMM_CAUSE_PLMN_NOT_ALLOWED 11
42
-#define EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED 12
43
-#define EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA 13
44
-#define EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN 14
45
-#define EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA 15
46
-#define EMM_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED_IN_THIS_PLMN 35
47
-#define EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED 40
48
-/* A.3 Causes related to PLMN specific network failures and 
49
+#define OGS_NAS_EMM_CAUSE_IMEI_NOT_ACCEPTED 5
50
+#define OGS_NAS_EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED 7
51
+#define OGS_NAS_EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED 8
52
+#define OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED 11
53
+#define OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED 12
54
+#define OGS_NAS_EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA 13
55
+#define OGS_NAS_EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN 14
56
+#define OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA 15
57
+#define OGS_NAS_EMM_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED_IN_THIS_PLMN 35
58
+#define OGS_NAS_EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED 40
59
+/* A.3 Causes related to PLMN specific network failures and
60
  *     congestion/authentication failures */
61
-#define EMM_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE 16
62
-#define EMM_CAUSE_NETWORK_FAILURE 17
63
-#define EMM_CAUSE_CS_DOMAIN_NOT_AVAILABLE 18
64
-#define EMM_CAUSE_ESM_FAILURE 19
65
-#define EMM_CAUSE_MAC_FAILURE 20
66
-#define EMM_CAUSE_SYNCH_FAILURE 21
67
-#define EMM_CAUSE_CONGESTION 22
68
-#define EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH 23
69
-#define EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED 24
70
-#define EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE 26
71
-#define EMM_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE 39
72
-#define EMM_CAUSE_SEVERE_NETWORK_FAILURE 42
73
-/* A.4 Causes related to nature of request 
74
+#define OGS_NAS_EMM_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE 16
75
+#define OGS_NAS_EMM_CAUSE_NETWORK_FAILURE 17
76
+#define OGS_NAS_EMM_CAUSE_CS_DOMAIN_NOT_AVAILABLE 18
77
+#define OGS_NAS_EMM_CAUSE_ESM_FAILURE 19
78
+#define OGS_NAS_EMM_CAUSE_MAC_FAILURE 20
79
+#define OGS_NAS_EMM_CAUSE_SYNCH_FAILURE 21
80
+#define OGS_NAS_EMM_CAUSE_CONGESTION 22
81
+#define OGS_NAS_EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH 23
82
+#define OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED 24
83
+#define OGS_NAS_EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE 26
84
+#define OGS_NAS_EMM_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE 39
85
+#define OGS_NAS_EMM_CAUSE_SEVERE_NETWORK_FAILURE 42
86
+/* A.4 Causes related to nature of request
87
  * NOTE:   This subclause has no entries in this version of the specification *
88
  * A.5 Causes related to invalid messages */
89
-#define EMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95
90
-#define EMM_CAUSE_INVALID_MANDATORY_INFORMATION 96
91
-#define EMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97
92
-#define EMM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 98
93
-#define EMM_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED 99
94
-#define EMM_CAUSE_CONDITIONAL_IE_ERROR 100
95
-#define EMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 101
96
-#define EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED 111
97
+#define OGS_NAS_EMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95
98
+#define OGS_NAS_EMM_CAUSE_INVALID_MANDATORY_INFORMATION 96
99
+#define OGS_NAS_EMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97
100
+#define OGS_NAS_EMM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 98
101
+#define OGS_NAS_EMM_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED 99
102
+#define OGS_NAS_EMM_CAUSE_CONDITIONAL_IE_ERROR 100
103
+#define OGS_NAS_EMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 101
104
+#define OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED 111
105
 typedef uint8_t ogs_nas_emm_cause_t;
106
 
107
 /* 9.9.3.10 * EPS attach result
108
@@ -280,7 +284,7 @@
109
 
110
 /* 9.9.3.11 EPS attach type
111
  * M V 1/2
112
- * 9.9.3.21 NAS key set identifier 
113
+ * 9.9.3.21 NAS key set identifier
114
  * M V 1/2 */
115
 #define OGS_NAS_KEY_SET_IDENTIFIER_NATIVE 0
116
 #define OGS_NAS_KEY_SET_IDENTIFIER_MAPPED 1
117
@@ -320,7 +324,7 @@
118
     };
119
 } __attribute__ ((packed)) ogs_nas_eps_mobile_identity_t;
120
 
121
-/* 9.9.3.12A EPS network feature support 
122
+/* 9.9.3.12A EPS network feature support
123
  * O TLV 3 */
124
 typedef struct ogs_nas_eps_network_feature_support_s {
125
     uint8_t length;
126
@@ -353,8 +357,8 @@
127
 } __attribute__ ((packed)) ogs_nas_eps_update_result_t;
128
 
129
 /* 9.9.3.14 EPS update type
130
- * M V 1/2 
131
- * 9.9.3.21 NAS key set identifier 
132
+ * M V 1/2
133
+ * 9.9.3.21 NAS key set identifier
134
  * M V 1/2 */
135
 #define OGS_NAS_EPS_UPDATE_TYPE_TA_UPDATING                                 0
136
 #define OGS_NAS_EPS_UPDATE_TYPE_COMBINED_TA_LA_UPDATING                     1
137
@@ -430,7 +434,7 @@
138
     uint8_t spare:3;)
139
 } __attribute__ ((packed)) ogs_nas_ms_network_capability_t;
140
 
141
-/* 9.9.3.20A MS network feature support 
142
+/* 9.9.3.20A MS network feature support
143
  * See subclause 10.5.1.15 in 3GPP TS 24.008 13.
144
  * O TV 1 */
145
 typedef struct ogs_nas_ms_network_feature_support_s {
146
@@ -470,12 +474,12 @@
147
     uint8_t identity:1;)
148
 } ogs_nas_paging_identity_t;
149
 
150
-/* 9.9.3.26 P-TMSI signature 
151
+/* 9.9.3.26 P-TMSI signature
152
  * See subclause 10.5.5.8 in 3GPP TS 24.008
153
  * O TV 4 */
154
 typedef uint32_t ogs_nas_p_tmsi_signature_t; /* TV : 4bytes */
155
 
156
-/* 9.9.3.26A Extended EMM cause 
157
+/* 9.9.3.26A Extended EMM cause
158
  * O TV 1 */
159
 typedef struct ogs_nas_extended_emm_cause_s {
160
 ED4(uint8_t type:4;,
161
@@ -485,8 +489,8 @@
162
 } ogs_nas_extended_emm_cause_t;
163
 
164
 /* 9.9.3.27 Service type
165
- * M V 1/2 
166
- * 9.9.3.21 NAS key set identifier 
167
+ * M V 1/2
168
+ * 9.9.3.21 NAS key set identifier
169
  * M V 1/2 */
170
 #define OGS_NAS_SERVICE_TYPE_CS_FALLBACK_FROM_UE 0
171
 #define OGS_NAS_SERVICE_TYPE_CS_FALLBACK_TO_UE 1
172
@@ -540,7 +544,7 @@
173
     /*
174
      * Do not change 'ogs_eps_tai_t' to 'ogs_nas_tracking_area_identity_t'.
175
      * Use 'ogs_eps_tai_t' for easy implementation.
176
-     * ogs_nas_tai_list_build() changes to NAS 
177
+     * ogs_nas_tai_list_build() changes to NAS
178
      * format(ogs_nas_tracking_area_identity_t)
179
      * and is sent to the UE.
180
      */
181
@@ -565,9 +569,9 @@
182
 } __attribute__ ((packed)) ogs_nas_ue_radio_capability_information_update_needed_t;
183
 
184
 /* 9.9.3.38 CLI
185
- * O TLV 3-14 
186
- * The coding of the CLI value part is the same as for 
187
- * octets 3 to 14 of the Calling party BCD number information element 
188
+ * O TLV 3-14
189
+ * The coding of the CLI value part is the same as for
190
+ * octets 3 to 14 of the Calling party BCD number information element
191
  * defined in subclause 10.5.4.9 of 3GPP TS 24.008 13. */
192
 #define NAX_MAX_CLI_LEN 12
193
 typedef struct ogs_nas_cli_s {
194
@@ -576,8 +580,8 @@
195
 } __attribute__ ((packed)) ogs_nas_cli_t;
196
 
197
 /* 9.9.3.39 SS Code
198
- * O TV 2 
199
- * The coding of the SS Code value is given in subclause 17.7.5 of 
200
+ * O TV 2
201
open5gs_2.4.8.202207190002.tar.xz/src/amf/amf-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/amf/amf-sm.c Changed
39
 
1
@@ -497,7 +497,10 @@
2
             ogs_sbi_xact_remove(sbi_xact);
3
 
4
             sess = amf_sess_cycle(sess);
5
-            ogs_assert(sess);
6
+            if (!sess) {
7
+                ogs_error("Session has already been removed");
8
+                break;
9
+            }
10
 
11
             amf_ue = sess->amf_ue;
12
             ogs_assert(amf_ue);
13
@@ -574,6 +577,12 @@
14
             case OGS_SBI_OBJ_UE_TYPE:
15
                 amf_ue = (amf_ue_t *)sbi_object;
16
                 ogs_assert(amf_ue);
17
+                amf_ue = amf_ue_cycle(amf_ue);
18
+                if (!amf_ue) {
19
+                    ogs_error("UE(amf_ue) Context has already been removed");
20
+                    break;
21
+                }
22
+
23
                 ogs_error("%s Cannot receive SBI message", amf_ue->suci);
24
                 ogs_assert(OGS_OK ==
25
                     nas_5gs_send_gmm_reject_from_sbi(amf_ue,
26
@@ -583,6 +592,12 @@
27
             case OGS_SBI_OBJ_SESS_TYPE:
28
                 sess = (amf_sess_t *)sbi_object;
29
                 ogs_assert(sess);
30
+                sess = amf_sess_cycle(sess);
31
+                if (!sess) {
32
+                    ogs_error("Session has already been removed");
33
+                    break;
34
+                }
35
+
36
                 ogs_error("%d:%d Cannot receive SBI message",
37
                         sess->psi, sess->pti);
38
                 if (sess->payload_container_type) {
39
open5gs_2.4.8.202207190002.tar.xz/src/amf/gmm-handler.c -> open5gs_2.4.8.202207200002.tar.xz/src/amf/gmm-handler.c Changed
201
 
1
@@ -28,11 +28,11 @@
2
 #undef OGS_LOG_DOMAIN
3
 #define OGS_LOG_DOMAIN __gmm_log_domain
4
 
5
-static int gmm_handle_nas_message_container(
6
+static ogs_nas_5gmm_cause_t gmm_handle_nas_message_container(
7
         amf_ue_t *amf_ue, uint8_t message_type,
8
         ogs_nas_message_container_t *nas_message_container);
9
 
10
-int gmm_handle_registration_request(amf_ue_t *amf_ue,
11
+ogs_nas_5gmm_cause_t gmm_handle_registration_request(amf_ue_t *amf_ue,
12
         ogs_nas_security_header_type_t h, NGAP_ProcedureCode_t ngap_code,
13
         ogs_nas_5gs_registration_request_t *registration_request)
14
 {
15
@@ -112,28 +112,19 @@
16
         ~OGS_REGISTRATION_CLEARTEXT_PRESENT) {
17
         ogs_error("Non cleartext IEs is included 0x%llx",
18
                 (long long)registration_request->presencemask);
19
-        ogs_assert(OGS_OK ==
20
-            nas_5gs_send_registration_reject(amf_ue,
21
-                OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE));
22
-        return OGS_ERROR;
23
+        return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
24
     }
25
 
26
     if (!h.integrity_protected &&
27
         (registration_request->presencemask &
28
         OGS_NAS_5GS_REGISTRATION_REQUEST_NAS_MESSAGE_CONTAINER_PRESENT)) {
29
         ogs_error("NAS container present without Integrity-protected");
30
-        ogs_assert(OGS_OK ==
31
-            nas_5gs_send_registration_reject(amf_ue,
32
-                OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE));
33
-        return OGS_ERROR;
34
+        return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
35
     }
36
 
37
     if (!mobile_identity->length || !mobile_identity->buffer) {
38
         ogs_error("No Mobile Identity");
39
-        ogs_assert(OGS_OK ==
40
-            nas_5gs_send_registration_reject(amf_ue,
41
-                OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE));
42
-        return OGS_ERROR;
43
+        return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
44
     }
45
 
46
     mobile_identity_header =
47
@@ -152,11 +143,7 @@
48
                 OGS_NAS_5GS_ECIES_SCHEME_PROFILE_B) {
49
             ogs_error("Invalid ProtectionSchemeID(%d) in SUCI",
50
                 mobile_identity_suci->protection_scheme_id);
51
-            ogs_assert(OGS_OK ==
52
-                nas_5gs_send_registration_reject(amf_ue,
53
-                    OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE)
54
-            );
55
-            return OGS_ERROR;
56
+            return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
57
         }
58
         amf_ue_set_suci(amf_ue, mobile_identity);
59
         ogs_info("%s    SUCI", amf_ue->suci);
60
@@ -166,7 +153,7 @@
61
             (ogs_nas_5gs_mobile_identity_guti_t *)mobile_identity->buffer;
62
         if (!mobile_identity_guti) {
63
             ogs_error("No mobile identity");
64
-            return OGS_ERROR;
65
+            return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
66
         }
67
 
68
         ogs_nas_5gs_mobile_identity_guti_to_nas_guti(
69
@@ -262,13 +249,9 @@
70
     /* Check TAI */
71
     served_tai_index = amf_find_served_tai(&amf_ue->nr_tai);
72
     if (served_tai_index < 0) {
73
-        /* Send Registration Reject */
74
-        ogs_warn("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
75
+        ogs_error("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
76
             ogs_plmn_id_hexdump(&amf_ue->nr_tai.plmn_id), amf_ue->nr_tai.tac.v);
77
-        ogs_assert(OGS_OK ==
78
-            nas_5gs_send_registration_reject(amf_ue,
79
-                OGS_5GMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
80
-        return OGS_ERROR;
81
+        return OGS_5GMM_CAUSE_TRACKING_AREA_NOT_ALLOWED;
82
     }
83
     ogs_debug("    SERVED_TAI_INDEX%d", served_tai_index);
84
 
85
@@ -285,18 +268,15 @@
86
         ogs_error("UE:0x%x:0x%x, NEA0 can be used in Encrypt0x%x, "
87
             "but Integrity0x%x cannot be bypassed with NIA0",
88
             ue_security_capability->nr_ea, ue_security_capability->nr_ia,
89
-            amf_selected_enc_algorithm(amf_ue), 
90
+            amf_selected_enc_algorithm(amf_ue),
91
             amf_selected_int_algorithm(amf_ue));
92
-        ogs_assert(OGS_OK ==
93
-            nas_5gs_send_registration_reject(amf_ue,
94
-                OGS_5GMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH));
95
-        return OGS_ERROR;
96
+        return OGS_5GMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH;
97
     }
98
 
99
-    return OGS_OK;
100
+    return OGS_5GMM_CAUSE_REQUEST_ACCEPTED;
101
 }
102
 
103
-int gmm_handle_registration_update(amf_ue_t *amf_ue,
104
+ogs_nas_5gmm_cause_t gmm_handle_registration_update(amf_ue_t *amf_ue,
105
         ogs_nas_5gs_registration_request_t *registration_request)
106
 {
107
     amf_sess_t *sess = NULL;
108
@@ -376,7 +356,7 @@
109
                         amf_ue->requested_nssai.s_nssaii.sst,
110
                         amf_ue->requested_nssai.s_nssaii.sd.v);
111
             }
112
-            return OGS_ERROR;
113
+            return OGS_5GMM_CAUSE_NO_NETWORK_SLICES_AVAILABLE;
114
         }
115
     }
116
 
117
@@ -442,10 +422,10 @@
118
         }
119
     }
120
 
121
-    return OGS_OK;
122
+    return OGS_5GMM_CAUSE_REQUEST_ACCEPTED;
123
 }
124
 
125
-int gmm_handle_service_request(amf_ue_t *amf_ue,
126
+ogs_nas_5gmm_cause_t gmm_handle_service_request(amf_ue_t *amf_ue,
127
         ogs_nas_security_header_type_t h, NGAP_ProcedureCode_t ngap_code,
128
         ogs_nas_5gs_service_request_t *service_request)
129
 {
130
@@ -483,20 +463,14 @@
131
         service_request->presencemask & ~OGS_SERVICE_CLEARTEXT_PRESENT) {
132
         ogs_error("Non cleartext IEs is included 0x%llx",
133
                 (long long)service_request->presencemask);
134
-        ogs_assert(OGS_OK ==
135
-            nas_5gs_send_service_reject(amf_ue,
136
-                OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE));
137
-        return OGS_ERROR;
138
+        return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
139
     }
140
 
141
     if (!h.integrity_protected &&
142
         (service_request->presencemask &
143
         OGS_NAS_5GS_SERVICE_REQUEST_NAS_MESSAGE_CONTAINER_PRESENT)) {
144
         ogs_error("NAS container present without Integrity-protected");
145
-        ogs_assert(OGS_OK ==
146
-            nas_5gs_send_service_reject(amf_ue,
147
-                OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE));
148
-        return OGS_ERROR;
149
+        return OGS_5GMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE;
150
     }
151
 
152
     amf_ue->nas.message_type = OGS_NAS_5GS_SERVICE_REQUEST;
153
@@ -550,13 +524,9 @@
154
     /* Check TAI */
155
     served_tai_index = amf_find_served_tai(&amf_ue->nr_tai);
156
     if (served_tai_index < 0) {
157
-        /* Send Registration Reject */
158
-        ogs_warn("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
159
+        ogs_error("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
160
             ogs_plmn_id_hexdump(&amf_ue->nr_tai.plmn_id), amf_ue->nr_tai.tac.v);
161
-        ogs_assert(OGS_OK ==
162
-            nas_5gs_send_registration_reject(amf_ue,
163
-                OGS_5GMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
164
-        return OGS_ERROR;
165
+        return OGS_5GMM_CAUSE_TRACKING_AREA_NOT_ALLOWED;
166
     }
167
     ogs_debug("    SERVED_TAI_INDEX%d", served_tai_index);
168
 
169
@@ -565,10 +535,10 @@
170
         ogs_amf_id_hexdump(&amf_ue->current.guti.amf_id),
171
         amf_ue->current.guti.m_tmsi);
172
 
173
-    return OGS_OK;
174
+    return OGS_5GMM_CAUSE_REQUEST_ACCEPTED;
175
 }
176
 
177
-int gmm_handle_service_update(amf_ue_t *amf_ue,
178
+ogs_nas_5gmm_cause_t gmm_handle_service_update(amf_ue_t *amf_ue,
179
         ogs_nas_5gs_service_request_t *service_request)
180
 {
181
     amf_sess_t *sess = NULL;
182
@@ -663,7 +633,7 @@
183
         ogs_assert(OGS_OK ==
184
             nas_5gs_send_service_accept(amf_ue));
185
 
186
-    return OGS_OK;
187
+    return OGS_5GMM_CAUSE_REQUEST_ACCEPTED;
188
 }
189
 
190
 int gmm_handle_deregistration_request(amf_ue_t *amf_ue,
191
@@ -800,7 +770,7 @@
192
     return OGS_OK;
193
 }
194
 
195
-int gmm_handle_security_mode_complete(amf_ue_t *amf_ue,
196
+ogs_nas_5gmm_cause_t gmm_handle_security_mode_complete(amf_ue_t *amf_ue,
197
     ogs_nas_5gs_security_mode_complete_t *security_mode_complete)
198
 {
199
     ogs_nas_5gs_mobile_identity_t *imeisv = NULL;
200
@@ -829,7 +799,7 @@
201
open5gs_2.4.8.202207190002.tar.xz/src/amf/gmm-handler.h -> open5gs_2.4.8.202207200002.tar.xz/src/amf/gmm-handler.h Changed
31
 
1
@@ -26,16 +26,16 @@
2
 extern "C" {
3
 #endif
4
 
5
-int gmm_handle_registration_request(amf_ue_t *amf_ue,
6
+ogs_nas_5gmm_cause_t gmm_handle_registration_request(amf_ue_t *amf_ue,
7
         ogs_nas_security_header_type_t h, NGAP_ProcedureCode_t ngap_code,
8
         ogs_nas_5gs_registration_request_t *registration_request);
9
-int gmm_handle_registration_update(amf_ue_t *amf_ue,
10
+ogs_nas_5gmm_cause_t gmm_handle_registration_update(amf_ue_t *amf_ue,
11
         ogs_nas_5gs_registration_request_t *registration_request);
12
 
13
-int gmm_handle_service_request(amf_ue_t *amf_ue,
14
+ogs_nas_5gmm_cause_t gmm_handle_service_request(amf_ue_t *amf_ue,
15
         ogs_nas_security_header_type_t h, NGAP_ProcedureCode_t ngap_code,
16
         ogs_nas_5gs_service_request_t *service_request);
17
-int gmm_handle_service_update(amf_ue_t *amf_ue,
18
+ogs_nas_5gmm_cause_t gmm_handle_service_update(amf_ue_t *amf_ue,
19
         ogs_nas_5gs_service_request_t *service_request);
20
 
21
 int gmm_handle_deregistration_request(amf_ue_t *amf_ue,
22
@@ -47,7 +47,7 @@
23
 int gmm_handle_identity_response(amf_ue_t *amf_ue,
24
         ogs_nas_5gs_identity_response_t *identity_response);
25
 
26
-int gmm_handle_security_mode_complete(amf_ue_t *amf_ue,
27
+ogs_nas_5gmm_cause_t gmm_handle_security_mode_complete(amf_ue_t *amf_ue,
28
         ogs_nas_5gs_security_mode_complete_t *security_mode_complete);
29
 
30
 int gmm_handle_ul_nas_transport(amf_ue_t *amf_ue,
31
open5gs_2.4.8.202207190002.tar.xz/src/amf/gmm-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/amf/gmm-sm.c Changed
201
 
1
@@ -91,6 +91,7 @@
2
 static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
3
 {
4
     int rv, xact_count = 0;
5
+    ogs_nas_5gmm_cause_t gmm_cause;
6
 
7
     amf_ue_t *amf_ue = NULL;
8
     amf_sess_t *sess = NULL;
9
@@ -102,7 +103,7 @@
10
     ogs_sbi_message_t *sbi_message = NULL;
11
 
12
     ogs_assert(e);
13
-        
14
+
15
     if (e->sess) {
16
         sess = e->sess;
17
         amf_ue = sess->amf_ue;
18
@@ -132,11 +133,14 @@
19
         switch (nas_message->gmm.h.message_type) {
20
         case OGS_NAS_5GS_REGISTRATION_REQUEST:
21
             ogs_info("Registration request");
22
-            rv = gmm_handle_registration_request(
23
+            gmm_cause = gmm_handle_registration_request(
24
                     amf_ue, h, e->ngap.code,
25
                     &nas_message->gmm.registration_request);
26
-            if (rv != OGS_OK) {
27
-                ogs_error("gmm_handle_registration_request() failed");
28
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
29
+                ogs_error("gmm_handle_registration_request() failed %d",
30
+                            gmm_cause);
31
+                ogs_assert(OGS_OK ==
32
+                    nas_5gs_send_registration_reject(amf_ue, gmm_cause));
33
                 OGS_FSM_TRAN(s, gmm_state_exception);
34
                 break;
35
             }
36
@@ -150,10 +154,13 @@
37
 
38
             if (h.integrity_protected && SECURITY_CONTEXT_IS_VALID(amf_ue)) {
39
 
40
-                rv = gmm_handle_registration_update(
41
+                gmm_cause = gmm_handle_registration_update(
42
                         amf_ue, &nas_message->gmm.registration_request);
43
-                if (rv != OGS_OK) {
44
-                    ogs_error("gmm_handle_registration_update() failed");
45
+                if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
46
+                    ogs_error("%s gmm_handle_registration_update() "
47
+                                "failed %d", amf_ue->suci, gmm_cause);
48
+                    ogs_assert(OGS_OK ==
49
+                        nas_5gs_send_registration_reject(amf_ue, gmm_cause));
50
                     OGS_FSM_TRAN(s, gmm_state_exception);
51
                     break;
52
                 }
53
@@ -204,10 +211,13 @@
54
         case OGS_NAS_5GS_SERVICE_REQUEST:
55
             ogs_info("Service request");
56
 
57
-            rv = gmm_handle_service_request(
58
+            gmm_cause = gmm_handle_service_request(
59
                     amf_ue, h, e->ngap.code, &nas_message->gmm.service_request);
60
-            if (rv != OGS_OK) {
61
-                ogs_error("gmm_handle_service_request() failed");
62
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
63
+                ogs_error("%s gmm_handle_service_request() failed %d",
64
+                            amf_ue->suci, gmm_cause);
65
+                ogs_assert(OGS_OK ==
66
+                    nas_5gs_send_service_reject(amf_ue, gmm_cause));
67
                 OGS_FSM_TRAN(s, gmm_state_exception);
68
                 break;
69
             }
70
@@ -232,10 +242,13 @@
71
                 break;
72
             }
73
 
74
-            rv = gmm_handle_service_update(
75
+            gmm_cause = gmm_handle_service_update(
76
                     amf_ue, &nas_message->gmm.service_request);
77
-            if (rv != OGS_OK) {
78
-                ogs_error("gmm_handle_service_update() failed");
79
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
80
+                ogs_error("%s gmm_handle_service_update() failed %d",
81
+                            amf_ue->suci, gmm_cause);
82
+                ogs_assert(OGS_OK ==
83
+                    nas_5gs_send_service_reject(amf_ue, gmm_cause));
84
                 OGS_FSM_TRAN(s, gmm_state_exception);
85
             }
86
 
87
@@ -495,6 +508,8 @@
88
 void gmm_state_authentication(ogs_fsm_t *s, amf_event_t *e)
89
 {
90
     int rv;
91
+    ogs_nas_5gmm_cause_t gmm_cause;
92
+
93
     amf_ue_t *amf_ue = NULL;
94
     amf_sess_t *sess = NULL;
95
 
96
@@ -510,7 +525,7 @@
97
 
98
     ogs_assert(s);
99
     ogs_assert(e);
100
-    
101
+
102
     amf_sm_debug(e);
103
 
104
     if (e->sess) {
105
@@ -602,12 +617,14 @@
106
             break;
107
         case OGS_NAS_5GS_REGISTRATION_REQUEST:
108
             ogs_warn("Registration request");
109
-            rv = gmm_handle_registration_request(
110
+            gmm_cause = gmm_handle_registration_request(
111
                     amf_ue, h, e->ngap.code,
112
                     &nas_message->gmm.registration_request);
113
-            if (rv != OGS_OK) {
114
-                ogs_error("%s gmm_handle_registration_request() failed",
115
-                            amf_ue->suci);
116
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
117
+                ogs_error("%s gmm_handle_registration_request() failed %d",
118
+                            amf_ue->suci, gmm_cause);
119
+                ogs_assert(OGS_OK ==
120
+                    nas_5gs_send_registration_reject(amf_ue, gmm_cause));
121
                 OGS_FSM_TRAN(s, gmm_state_exception);
122
                 break;
123
             }
124
@@ -744,6 +761,7 @@
125
 void gmm_state_security_mode(ogs_fsm_t *s, amf_event_t *e)
126
 {
127
     int rv;
128
+    ogs_nas_5gmm_cause_t gmm_cause;
129
     amf_ue_t *amf_ue = NULL;
130
     ogs_nas_5gs_message_t *nas_message = NULL;
131
     ogs_nas_security_header_type_t h;
132
@@ -797,13 +815,14 @@
133
                 break;
134
             }
135
 
136
-            rv = gmm_handle_security_mode_complete(
137
+            gmm_cause = gmm_handle_security_mode_complete(
138
                     amf_ue, &nas_message->gmm.security_mode_complete);
139
-            if (rv != OGS_OK) {
140
-                ogs_error("%s Cannot handle NAS message", amf_ue->suci);
141
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
142
+                ogs_error("%s gmm_handle_security_mode_complete() "
143
+                            "failed %d in type %d",
144
+                            amf_ue->suci, gmm_cause, amf_ue->nas.message_type);
145
                 ogs_assert(OGS_OK ==
146
-                    nas_5gs_send_gmm_reject(amf_ue,
147
-                        OGS_5GMM_CAUSE_5GS_SERVICES_NOT_ALLOWED));
148
+                    nas_5gs_send_gmm_reject(amf_ue, gmm_cause));
149
                 OGS_FSM_TRAN(s, gmm_state_exception);
150
                 break;
151
             }
152
@@ -837,11 +856,14 @@
153
             break;
154
         case OGS_NAS_5GS_REGISTRATION_REQUEST:
155
             ogs_warn("Registration request");
156
-            rv = gmm_handle_registration_request(
157
+            gmm_cause = gmm_handle_registration_request(
158
                     amf_ue, h, e->ngap.code,
159
                     &nas_message->gmm.registration_request);
160
-            if (rv != OGS_OK) {
161
-                ogs_error("%s Cannot handle NAS message", amf_ue->suci);
162
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
163
+                ogs_error("%s gmm_handle_registration_request() failed %d",
164
+                            amf_ue->suci, gmm_cause);
165
+                ogs_assert(OGS_OK ==
166
+                    nas_5gs_send_registration_reject(amf_ue, gmm_cause));
167
                 OGS_FSM_TRAN(s, gmm_state_exception);
168
                 break;
169
             }
170
@@ -916,6 +938,8 @@
171
 void gmm_state_initial_context_setup(ogs_fsm_t *s, amf_event_t *e)
172
 {
173
     int rv, xact_count = 0;
174
+    ogs_nas_5gmm_cause_t gmm_cause;
175
+
176
     amf_ue_t *amf_ue = NULL;
177
     amf_sess_t *sess = NULL;
178
     ogs_nas_5gs_message_t *nas_message = NULL;
179
@@ -1156,11 +1180,14 @@
180
 
181
         case OGS_NAS_5GS_REGISTRATION_REQUEST:
182
             ogs_warn("Registration request");
183
-            rv = gmm_handle_registration_request(
184
+            gmm_cause = gmm_handle_registration_request(
185
                     amf_ue, h, e->ngap.code,
186
                     &nas_message->gmm.registration_request);
187
-            if (rv != OGS_OK) {
188
-                ogs_error("%s Cannot handle NAS message", amf_ue->suci);
189
+            if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
190
+                ogs_error("%s gmm_handle_registration_request() failed %d",
191
+                            amf_ue->suci, gmm_cause);
192
+                ogs_assert(OGS_OK ==
193
+                    nas_5gs_send_registration_reject(amf_ue, gmm_cause));
194
                 OGS_FSM_TRAN(s, gmm_state_exception);
195
                 break;
196
             }
197
@@ -1236,7 +1263,8 @@
198
 
199
 void gmm_state_exception(ogs_fsm_t *s, amf_event_t *e)
200
 {
201
open5gs_2.4.8.202207190002.tar.xz/src/ausf/ausf-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/ausf/ausf-sm.c Changed
14
 
1
@@ -287,8 +287,10 @@
2
             ogs_sbi_xact_remove(sbi_xact);
3
 
4
             ausf_ue = ausf_ue_cycle(ausf_ue);
5
-            ogs_assert(ausf_ue);
6
-            ogs_assert(OGS_FSM_STATE(&ausf_ue->sm));
7
+            if (!ausf_ue) {
8
+                ogs_error("UE(ausf-ue) Context has already been removed");
9
+                break;
10
+            }
11
 
12
             e->ausf_ue = ausf_ue;
13
             e->sbi.message = &message;
14
open5gs_2.4.8.202207190002.tar.xz/src/mme/emm-build.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/emm-build.c Changed
11
 
1
@@ -119,7 +119,8 @@
2
             (eps_attach_result->result == OGS_NAS_ATTACH_TYPE_EPS_ATTACH)) {
3
             attach_accept->presencemask |=
4
                 OGS_NAS_EPS_ATTACH_ACCEPT_EMM_CAUSE_PRESENT;
5
-            attach_accept->emm_cause = EMM_CAUSE_CS_DOMAIN_NOT_AVAILABLE;
6
+            attach_accept->emm_cause =
7
+                OGS_NAS_EMM_CAUSE_CS_DOMAIN_NOT_AVAILABLE;
8
         }
9
     } else {
10
         switch (eps_attach_result->result) {
11
open5gs_2.4.8.202207190002.tar.xz/src/mme/emm-handler.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/emm-handler.c Changed
41
 
1
@@ -126,8 +126,8 @@
2
             ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
3
         ogs_assert(OGS_OK ==
4
             nas_eps_send_attach_reject(mme_ue,
5
-                EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED,
6
-                ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
7
+                OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED,
8
+                OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
9
         return OGS_ERROR;
10
     }
11
     ogs_debug("    SERVED_TAI_INDEX%d", served_tai_index);
12
@@ -169,8 +169,8 @@
13
             mme_selected_int_algorithm(mme_ue));
14
         ogs_assert(OGS_OK ==
15
             nas_eps_send_attach_reject(mme_ue,
16
-                EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH,
17
-                ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
18
+                OGS_NAS_EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH,
19
+                OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
20
         return OGS_ERROR;
21
     }
22
 
23
@@ -519,7 +519,7 @@
24
             ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
25
         ogs_assert(OGS_OK ==
26
             nas_eps_send_tau_reject(
27
-                mme_ue, EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
28
+                mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
29
         return OGS_ERROR;
30
     }
31
     ogs_debug("    SERVED_TAI_INDEX%d", served_tai_index);
32
@@ -637,7 +637,7 @@
33
             ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
34
         ogs_assert(OGS_OK ==
35
             nas_eps_send_tau_reject(
36
-                mme_ue, EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
37
+                mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
38
         return OGS_ERROR;
39
     }
40
     ogs_debug("    SERVED_TAI_INDEX%d", served_tai_index);
41
open5gs_2.4.8.202207190002.tar.xz/src/mme/emm-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/emm-sm.c Changed
201
 
1
@@ -133,7 +133,7 @@
2
                 ogs_info("Service request : Unknown UE");
3
                 ogs_assert(OGS_OK ==
4
                     nas_eps_send_service_reject(mme_ue,
5
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
6
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
7
                 OGS_FSM_TRAN(s, &emm_state_exception);
8
                 break;
9
             }
10
@@ -142,7 +142,7 @@
11
                 ogs_warn("No Security Context : IMSI%s", mme_ue->imsi_bcd);
12
                 ogs_assert(OGS_OK ==
13
                     nas_eps_send_service_reject(mme_ue,
14
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
15
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
16
                 OGS_FSM_TRAN(s, &emm_state_exception);
17
                 break;
18
             }
19
@@ -151,7 +151,7 @@
20
                 ogs_warn("No Session Context : IMSI%s", mme_ue->imsi_bcd);
21
                 ogs_assert(OGS_OK ==
22
                     nas_eps_send_service_reject(mme_ue,
23
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
24
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
25
                 OGS_FSM_TRAN(s, &emm_state_exception);
26
                 break;
27
             }
28
@@ -160,7 +160,7 @@
29
                 ogs_warn("No active EPS bearers : IMSI%s", mme_ue->imsi_bcd);
30
                 ogs_assert(OGS_OK ==
31
                     nas_eps_send_service_reject(mme_ue,
32
-                        EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED));
33
+                        OGS_NAS_EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED));
34
                 OGS_FSM_TRAN(s, &emm_state_exception);
35
                 break;
36
             }
37
@@ -227,8 +227,8 @@
38
                         ogs_error("nas_eps_send_emm_to_esm() failed");
39
                         ogs_assert(OGS_OK ==
40
                             nas_eps_send_attach_reject(mme_ue,
41
-                                EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
42
-                                ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
43
+                                OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
44
+                                OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
45
                         OGS_FSM_TRAN(s, &emm_state_exception);
46
                         break;
47
                     }
48
@@ -259,7 +259,7 @@
49
                 ogs_info("TAU request : Unknown UE");
50
                 ogs_assert(OGS_OK ==
51
                     nas_eps_send_tau_reject(mme_ue,
52
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
53
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
54
                 OGS_FSM_TRAN(s, &emm_state_exception);
55
                 break;
56
             }
57
@@ -268,7 +268,7 @@
58
                 ogs_warn("No PDN Connection : UE%s", mme_ue->imsi_bcd);
59
                 ogs_assert(OGS_OK ==
60
                     nas_eps_send_tau_reject(mme_ue,
61
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
62
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
63
                 OGS_FSM_TRAN(s, emm_state_exception);
64
                 break;
65
             }
66
@@ -277,7 +277,7 @@
67
                 ogs_warn("No active EPS bearers : IMSI%s", mme_ue->imsi_bcd);
68
                 ogs_assert(OGS_OK ==
69
                     nas_eps_send_tau_reject(mme_ue,
70
-                        EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED));
71
+                        OGS_NAS_EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED));
72
                 OGS_FSM_TRAN(s, &emm_state_exception);
73
                 break;
74
             }
75
@@ -400,7 +400,7 @@
76
                 ogs_warn("Extended Service request : Unknown UE");
77
                 ogs_assert(OGS_OK ==
78
                     nas_eps_send_service_reject(mme_ue,
79
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
80
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
81
                 OGS_FSM_TRAN(s, &emm_state_exception);
82
                 break;
83
             }
84
@@ -409,7 +409,7 @@
85
                 ogs_warn("No PDN Connection : UE%s", mme_ue->imsi_bcd);
86
                 ogs_assert(OGS_OK ==
87
                     nas_eps_send_service_reject(mme_ue,
88
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
89
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
90
                 OGS_FSM_TRAN(s, emm_state_exception);
91
                 break;
92
             }
93
@@ -418,7 +418,7 @@
94
                 ogs_warn("No Security Context : IMSI%s", mme_ue->imsi_bcd);
95
                 ogs_assert(OGS_OK ==
96
                     nas_eps_send_service_reject(mme_ue,
97
-                    EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
98
+                    OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
99
                 OGS_FSM_TRAN(s, &emm_state_exception);
100
                 break;
101
             }
102
@@ -430,7 +430,7 @@
103
                     ogs_warn("No P-TMSI : UE%s", mme_ue->imsi_bcd);
104
                     ogs_assert(OGS_OK ==
105
                         nas_eps_send_service_reject(mme_ue,
106
-                        EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
107
+                        OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
108
                     );
109
                     mme_send_release_access_bearer_or_ue_context_release(
110
                             enb_ue);
111
@@ -457,7 +457,7 @@
112
                             mme_ue->nas_eps.service.value);
113
                     ogs_assert(OGS_OK ==
114
                         nas_eps_send_service_reject(mme_ue,
115
-                        EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
116
+                        OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
117
                     );
118
                     OGS_FSM_TRAN(s, &emm_state_exception);
119
                     break;
120
@@ -474,7 +474,7 @@
121
                     ogs_warn("No P-TMSI : UE%s", mme_ue->imsi_bcd);
122
                     ogs_assert(OGS_OK ==
123
                         nas_eps_send_service_reject(mme_ue,
124
-                        EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
125
+                        OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
126
                     );
127
                     break;
128
                 }
129
@@ -499,7 +499,7 @@
130
                             mme_ue->nas_eps.service.value);
131
                     ogs_assert(OGS_OK ==
132
                         nas_eps_send_service_reject(mme_ue,
133
-                        EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
134
+                        OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
135
                     );
136
                     OGS_FSM_TRAN(s, &emm_state_exception);
137
                     break;
138
@@ -704,26 +704,26 @@
139
                         authentication_failure_parameter;
140
 
141
             ogs_debug("Authentication failure");
142
-            ogs_debug("    IMSI%s EMM_CAUSE%d", mme_ue->imsi_bcd,
143
+            ogs_debug("    IMSI%s OGS_NAS_EMM_CAUSE%d", mme_ue->imsi_bcd,
144
                     authentication_failure->emm_cause);
145
 
146
             CLEAR_MME_UE_TIMER(mme_ue->t3460);
147
 
148
             switch (authentication_failure->emm_cause) {
149
-            case EMM_CAUSE_MAC_FAILURE:
150
+            case OGS_NAS_EMM_CAUSE_MAC_FAILURE:
151
                 ogs_warn("Authentication failure(MAC failure)");
152
                 break;
153
-            case EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE:
154
+            case OGS_NAS_EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE:
155
                 ogs_error("Authentication failure"
156
                         "(Non-EPS authentication unacceptable)");
157
                 break;
158
-            case EMM_CAUSE_SYNCH_FAILURE:
159
+            case OGS_NAS_EMM_CAUSE_SYNCH_FAILURE:
160
                 ogs_info("Authentication failure(Synch failure)");
161
                 mme_s6a_send_air(mme_ue,
162
                         authentication_failure_parameter);
163
                 return;
164
             default:
165
-                ogs_error("Unknown EMM_CAUSE{%d in Authentication"
166
+                ogs_error("Unknown OGS_NAS_EMM_CAUSE{%d in Authentication"
167
                         " failure",
168
                         authentication_failure->emm_cause);
169
                 break;
170
@@ -837,7 +837,7 @@
171
             ogs_debug("Service request");
172
             ogs_assert(OGS_OK ==
173
                 nas_eps_send_service_reject(mme_ue,
174
-                    EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED));
175
+                    OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED));
176
             OGS_FSM_TRAN(s, &emm_state_exception);
177
             break;
178
         }
179
@@ -856,8 +856,8 @@
180
 
181
                 ogs_assert(OGS_OK ==
182
                     nas_eps_send_attach_reject(mme_ue,
183
-                        EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
184
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
185
+                        OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
186
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
187
                 OGS_FSM_TRAN(s, &emm_state_exception);
188
                 break;
189
             }
190
@@ -866,8 +866,8 @@
191
                 ogs_warn("%s No Security Context", mme_ue->imsi_bcd);
192
                 ogs_assert(OGS_OK ==
193
                     nas_eps_send_attach_reject(mme_ue,
194
-                        EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
195
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
196
+                        OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
197
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
198
                 OGS_FSM_TRAN(s, &emm_state_exception);
199
                 break;
200
             }
201
open5gs_2.4.8.202207190002.tar.xz/src/mme/esm-build.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/esm-build.c Changed
35
 
1
@@ -174,13 +174,13 @@
2
         if (session->paa.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
3
             pdn_address->pdn_type = OGS_PDU_SESSION_TYPE_IPV4;
4
             activate_default_eps_bearer_context_request->esm_cause =
5
-                ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED;
6
+                OGS_NAS_ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED;
7
             activate_default_eps_bearer_context_request->presencemask |=
8
                 OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
9
         } else if (session->paa.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
10
             pdn_address->pdn_type = OGS_PDU_SESSION_TYPE_IPV6;
11
             activate_default_eps_bearer_context_request->esm_cause =
12
-                ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED;
13
+                OGS_NAS_ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED;
14
             activate_default_eps_bearer_context_request->presencemask |=
15
                 OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
16
         }
17
@@ -188,7 +188,7 @@
18
         if (session->paa.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
19
             pdn_address->pdn_type = OGS_PDU_SESSION_TYPE_IPV6;
20
             activate_default_eps_bearer_context_request->esm_cause =
21
-                ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED;
22
+                OGS_NAS_ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED;
23
             activate_default_eps_bearer_context_request->presencemask |=
24
                 OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
25
         }
26
@@ -196,7 +196,7 @@
27
         if (session->paa.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
28
             pdn_address->pdn_type = OGS_PDU_SESSION_TYPE_IPV4;
29
             activate_default_eps_bearer_context_request->esm_cause =
30
-                ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED;
31
+                OGS_NAS_ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED;
32
             activate_default_eps_bearer_context_request->presencemask |=
33
                 OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
34
         }
35
open5gs_2.4.8.202207190002.tar.xz/src/mme/esm-handler.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/esm-handler.c Changed
55
 
1
@@ -67,7 +67,7 @@
2
             /* Invalid APN */
3
             ogs_assert(OGS_OK ==
4
                 nas_eps_send_pdn_connectivity_reject(
5
-                    sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
6
+                    sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
7
             ogs_warn("Invalid APN%s", req->access_point_name.apn);
8
             return OGS_ERROR;
9
         }
10
@@ -82,7 +82,7 @@
11
                     sess->request_type.type, sess->session->session_type);
12
                 ogs_assert(OGS_OK ==
13
                     nas_eps_send_pdn_connectivity_reject(
14
-                        sess, ESM_CAUSE_UNKNOWN_PDN_TYPE, create_action));
15
+                        sess, OGS_NAS_ESM_CAUSE_UNKNOWN_PDN_TYPE, create_action));
16
                 return OGS_ERROR;
17
             }
18
         } else {
19
@@ -139,7 +139,7 @@
20
         ogs_error("No APN");
21
         ogs_assert(OGS_OK ==
22
             nas_eps_send_pdn_connectivity_reject(
23
-                sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
24
+                sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
25
         return OGS_ERROR;
26
     }
27
 
28
@@ -185,7 +185,7 @@
29
                     sess->request_type.type, sess->session->session_type);
30
                 ogs_assert(OGS_OK ==
31
                     nas_eps_send_pdn_connectivity_reject(
32
-                        sess, ESM_CAUSE_UNKNOWN_PDN_TYPE,
33
+                        sess, OGS_NAS_ESM_CAUSE_UNKNOWN_PDN_TYPE,
34
                         OGS_GTP_CREATE_IN_ATTACH_REQUEST));
35
                 return OGS_ERROR;
36
             }
37
@@ -219,7 +219,7 @@
38
 
39
         ogs_assert(OGS_OK ==
40
             nas_eps_send_pdn_connectivity_reject(
41
-                sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN,
42
+                sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN,
43
                 OGS_GTP_CREATE_IN_ATTACH_REQUEST));
44
         return OGS_ERROR;
45
     }
46
@@ -241,7 +241,7 @@
47
 
48
     ogs_assert(OGS_OK ==
49
         nas_eps_send_bearer_resource_allocation_reject(
50
-            mme_ue, sess->pti, ESM_CAUSE_NETWORK_FAILURE));
51
+            mme_ue, sess->pti, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
52
 
53
     return OGS_OK;
54
 }
55
open5gs_2.4.8.202207190002.tar.xz/src/mme/esm-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/esm-sm.c Changed
50
 
1
@@ -35,13 +35,13 @@
2
 static uint8_t gtp_cause_from_esm(uint8_t esm_cause)
3
 {
4
     switch (esm_cause) {
5
-    case ESM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION:
6
+    case OGS_NAS_ESM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION:
7
         return OGS_GTP2_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION;
8
-    case ESM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION:
9
+    case OGS_NAS_ESM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION:
10
         return OGS_GTP2_CAUSE_SYNTACTIC_ERROR_IN_THE_TFT_OPERATION;
11
-    case ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS:
12
+    case OGS_NAS_ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS:
13
         return OGS_GTP2_CAUSE_SYNTACTIC_ERRORS_IN_PACKET_FILTER;
14
-    case ESM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS:
15
+    case OGS_NAS_ESM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS:
16
         return OGS_GTP2_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTER;
17
     default:
18
         break;
19
@@ -139,8 +139,8 @@
20
                 ogs_error("%s No Integrity Protected", mme_ue->imsi_bcd);
21
                 ogs_assert(OGS_OK ==
22
                     nas_eps_send_attach_reject(mme_ue,
23
-                        EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
24
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
25
+                        OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
26
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
27
                 ogs_assert(mme_ue->enb_ue);
28
                 ogs_assert(OGS_OK ==
29
                     s1ap_send_ue_context_release_command(mme_ue->enb_ue,
30
@@ -154,8 +154,8 @@
31
                 ogs_warn("%s No Security Context", mme_ue->imsi_bcd);
32
                 ogs_assert(OGS_OK ==
33
                     nas_eps_send_attach_reject(mme_ue,
34
-                        EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
35
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
36
+                        OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
37
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
38
                 ogs_assert(mme_ue->enb_ue);
39
                 ogs_assert(OGS_OK ==
40
                     s1ap_send_ue_context_release_command(mme_ue->enb_ue,
41
@@ -232,7 +232,7 @@
42
 
43
                 ogs_assert(OGS_OK ==
44
                     nas_eps_send_pdn_connectivity_reject(sess,
45
-                        ESM_CAUSE_ESM_INFORMATION_NOT_RECEIVED,
46
+                        OGS_NAS_ESM_CAUSE_ESM_INFORMATION_NOT_RECEIVED,
47
                         e->create_action));
48
             } else {
49
                 rv = nas_eps_send_esm_information_request(bearer);
50
open5gs_2.4.8.202207190002.tar.xz/src/mme/mme-context.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/mme-context.c Changed
74
 
1
@@ -3113,8 +3113,8 @@
2
             ogs_error("No Bearer : EBI%d", ebi);
3
             ogs_assert(OGS_OK ==
4
                 nas_eps_send_attach_reject(mme_ue,
5
-                    EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
6
-                    ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
7
+                    OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
8
+                    OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
9
             return NULL;
10
         }
11
 
12
@@ -3125,8 +3125,8 @@
13
         ogs_error("Both PTI%d and EBI%d are 0", pti, ebi);
14
         ogs_assert(OGS_OK ==
15
             nas_eps_send_attach_reject(mme_ue,
16
-                EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
17
-                ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
18
+                OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
19
+                OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
20
         return NULL;
21
     }
22
 
23
@@ -3143,8 +3143,8 @@
24
                     linked_eps_bearer_identity->eps_bearer_identity);
25
             ogs_assert(OGS_OK ==
26
                 nas_eps_send_attach_reject(mme_ue,
27
-                    EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
28
-                    ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
29
+                    OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
30
+                    OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
31
             return NULL;
32
         }
33
     } else if (message->esm.h.message_type ==
34
@@ -3162,7 +3162,8 @@
35
                     linked_eps_bearer_identity->eps_bearer_identity);
36
             ogs_assert(OGS_OK ==
37
                 nas_eps_send_bearer_resource_allocation_reject(
38
-                    mme_ue, pti, ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
39
+                    mme_ue, pti,
40
+                    OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
41
             return NULL;
42
         }
43
 
44
@@ -3181,7 +3182,8 @@
45
                     linked_eps_bearer_identity->eps_bearer_identity);
46
             ogs_assert(OGS_OK ==
47
                 nas_eps_send_bearer_resource_modification_reject(
48
-                    mme_ue, pti, ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
49
+                    mme_ue, pti,
50
+                    OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
51
             return NULL;
52
         }
53
     }
54
@@ -3205,7 +3207,7 @@
55
                 ogs_assert(OGS_OK ==
56
                     nas_eps_send_pdn_connectivity_reject(
57
                         sess,
58
-                        ESM_CAUSE_MULTIPLE_PDN_CONNECTIONS_FOR_A_GIVEN_APN_NOT_ALLOWED,
59
+                        OGS_NAS_ESM_CAUSE_MULTIPLE_PDN_CONNECTIONS_FOR_A_GIVEN_APN_NOT_ALLOWED,
60
                         create_action));
61
                 ogs_warn("APN duplicated %s",
62
                     pdn_connectivity_request->access_point_name.apn);
63
@@ -3228,8 +3230,8 @@
64
                     message->esm.h.message_type, pti);
65
             ogs_assert(OGS_OK ==
66
                 nas_eps_send_attach_reject(mme_ue,
67
-                    EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
68
-                    ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
69
+                    OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
70
+                    OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
71
             return NULL;
72
         }
73
     }
74
open5gs_2.4.8.202207190002.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/mme-s11-handler.c Changed
91
 
1
@@ -36,17 +36,17 @@
2
 {
3
     switch (gtp_cause) {
4
     case OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND:
5
-        return ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY;
6
+        return OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY;
7
     case OGS_GTP2_CAUSE_SERVICE_NOT_SUPPORTED:
8
-        return ESM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED;
9
+        return OGS_NAS_ESM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED;
10
     case OGS_GTP2_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION:
11
-        return ESM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION;
12
+        return OGS_NAS_ESM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION;
13
     case OGS_GTP2_CAUSE_SYNTACTIC_ERROR_IN_THE_TFT_OPERATION:
14
-        return ESM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION;
15
+        return OGS_NAS_ESM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION;
16
     case OGS_GTP2_CAUSE_SYNTACTIC_ERRORS_IN_PACKET_FILTER:
17
-        return ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS;
18
+        return OGS_NAS_ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS;
19
     case OGS_GTP2_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTER:
20
-        return ESM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS;
21
+        return OGS_NAS_ESM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS;
22
     default:
23
         break;
24
     }
25
@@ -56,7 +56,7 @@
26
      * OGS_GTP2_CAUSE_MANDATORY_IE_MISSING
27
      * ...
28
      */
29
-    return ESM_CAUSE_NETWORK_FAILURE;
30
+    return OGS_NAS_ESM_CAUSE_NETWORK_FAILURE;
31
 }
32
 
33
 void mme_s11_handle_echo_request(
34
@@ -140,7 +140,7 @@
35
         if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
36
             ogs_error("%s Attach reject", mme_ue->imsi_bcd);
37
             ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
38
-                    EMM_CAUSE_NETWORK_FAILURE, ESM_CAUSE_NETWORK_FAILURE));
39
+                    OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
40
         }
41
         mme_send_delete_session_or_mme_ue_context_release(mme_ue);
42
         return;
43
@@ -200,7 +200,7 @@
44
         if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
45
             ogs_error("%s Attach reject", mme_ue->imsi_bcd);
46
             ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
47
-                    EMM_CAUSE_NETWORK_FAILURE, ESM_CAUSE_NETWORK_FAILURE));
48
+                    OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
49
         }
50
         mme_send_delete_session_or_mme_ue_context_release(mme_ue);
51
         return;
52
@@ -224,7 +224,7 @@
53
             if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
54
                 ogs_error("%s Attach reject", mme_ue->imsi_bcd);
55
                 ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
56
-                        EMM_CAUSE_NETWORK_FAILURE, ESM_CAUSE_NETWORK_FAILURE));
57
+                        OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
58
             }
59
             mme_send_delete_session_or_mme_ue_context_release(mme_ue);
60
             return;
61
@@ -244,7 +244,7 @@
62
         if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
63
             ogs_error("%s Attach reject", mme_ue->imsi_bcd);
64
             ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
65
-                    EMM_CAUSE_NETWORK_FAILURE, ESM_CAUSE_NETWORK_FAILURE));
66
+                    OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
67
         }
68
         mme_send_delete_session_or_mme_ue_context_release(mme_ue);
69
         return;
70
@@ -611,8 +611,8 @@
71
                 ogs_error("nas_eps_send_emm_to_esm() failed");
72
                 ogs_assert(OGS_OK ==
73
                     nas_eps_send_attach_reject(mme_ue,
74
-                        EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
75
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
76
+                        OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
77
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
78
             }
79
         }
80
 
81
@@ -951,7 +951,8 @@
82
             /* MME received Bearer Resource Modification Request */
83
             ogs_assert(OGS_OK ==
84
                 nas_eps_send_bearer_resource_modification_reject(
85
-                    mme_ue, sess->pti, ESM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED));
86
+                    mme_ue, sess->pti,
87
+                    OGS_NAS_ESM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED));
88
         }
89
 
90
         ogs_assert(OGS_OK ==
91
open5gs_2.4.8.202207190002.tar.xz/src/mme/mme-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/mme-sm.c Changed
78
 
1
@@ -45,18 +45,19 @@
2
         switch (*dia_exp_err) {
3
         case OGS_DIAM_S6A_ERROR_USER_UNKNOWN:                   /* 5001 */
4
             ogs_info("%s User Unknown in HSS DB", mme_ue->imsi_bcd);
5
-            return EMM_CAUSE_PLMN_NOT_ALLOWED;
6
+            return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED;
7
         case OGS_DIAM_S6A_ERROR_UNKNOWN_EPS_SUBSCRIPTION:       /* 5420 */
8
             /* FIXME: Error diagnostic? */
9
-            return EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA;
10
+            return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA;
11
         case OGS_DIAM_S6A_ERROR_RAT_NOT_ALLOWED:                /* 5421 */
12
-            return EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA;
13
+            return OGS_NAS_EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA;
14
         case OGS_DIAM_S6A_ERROR_ROAMING_NOT_ALLOWED:            /* 5004 */
15
-            return EMM_CAUSE_PLMN_NOT_ALLOWED;
16
-            //return EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN; (ODB_HPLMN_APN)
17
-            //return EMM_CAUSE_ESM_FAILURE; (ODB_ALL_APN)
18
+            return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED;
19
+            /* return OGS_NAS_EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN;
20
+             * (ODB_HPLMN_APN) */
21
+            /* return OGS_NAS_EMM_CAUSE_ESM_FAILURE; (ODB_ALL_APN) */
22
         case OGS_DIAM_S6A_AUTHENTICATION_DATA_UNAVAILABLE:      /* 4181 */
23
-            return EMM_CAUSE_NETWORK_FAILURE;
24
+            return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE;
25
         }
26
     }
27
     if (dia_err) {
28
@@ -64,21 +65,21 @@
29
         case ER_DIAMETER_AUTHORIZATION_REJECTED:                /* 5003 */
30
         case ER_DIAMETER_UNABLE_TO_DELIVER:                     /* 3002 */
31
         case ER_DIAMETER_REALM_NOT_SERVED:                      /* 3003 */
32
-            return EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA;
33
+            return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA;
34
         case ER_DIAMETER_UNABLE_TO_COMPLY:                      /* 5012 */
35
         case ER_DIAMETER_INVALID_AVP_VALUE:                     /* 5004 */
36
         case ER_DIAMETER_AVP_UNSUPPORTED:                       /* 5001 */
37
         case ER_DIAMETER_MISSING_AVP:                           /* 5005 */
38
         case ER_DIAMETER_RESOURCES_EXCEEDED:                    /* 5006 */
39
         case ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES:             /* 5009 */
40
-            return EMM_CAUSE_NETWORK_FAILURE;
41
+            return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE;
42
         }
43
     }
44
 
45
     ogs_error("Unexpected Diameter Result Code %d/%d, defaulting to severe "
46
               "network failure",
47
               dia_err ? *dia_err : -1, dia_exp_err ? *dia_exp_err : -1);
48
-    return EMM_CAUSE_SEVERE_NETWORK_FAILURE;
49
+    return OGS_NAS_EMM_CAUSE_SEVERE_NETWORK_FAILURE;
50
 }
51
 
52
 void mme_state_initial(ogs_fsm_t *s, mme_event_t *e)
53
@@ -455,11 +456,11 @@
54
             uint8_t emm_cause = emm_cause_from_diameter(
55
                     mme_ue, s6a_message->err, s6a_message->exp_err);
56
 
57
-            ogs_info("%s Attach reject EMM_CAUSE:%d",
58
+            ogs_info("%s Attach reject OGS_NAS_EMM_CAUSE:%d",
59
                     mme_ue->imsi_bcd, emm_cause);
60
             ogs_assert(OGS_OK ==
61
                 nas_eps_send_attach_reject(mme_ue,
62
-                    emm_cause, ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
63
+                    emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
64
 
65
             ogs_assert(OGS_OK ==
66
                 s1ap_send_ue_context_release_command(enb_ue,
67
@@ -486,8 +487,8 @@
68
                     ogs_error("nas_eps_send_emm_to_esm() failed");
69
                     ogs_assert(OGS_OK ==
70
                         nas_eps_send_attach_reject(mme_ue,
71
-                        EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
72
-                        ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
73
+                        OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
74
+                        OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
75
                 }
76
             } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) {
77
                 ogs_assert(OGS_OK ==
78
open5gs_2.4.8.202207190002.tar.xz/src/mme/nas-path.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/nas-path.c Changed
19
 
1
@@ -301,7 +301,7 @@
2
         /* During the UE-attach process, we'll send Attach-Reject
3
          * with pyggybacking PDN-connectivity-Reject */
4
         rv = nas_eps_send_attach_reject(mme_ue,
5
-            EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED, esm_cause);
6
+            OGS_NAS_EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED, esm_cause);
7
         ogs_expect(rv == OGS_OK);
8
     } else {
9
         esmbuf = esm_build_pdn_connectivity_reject(
10
@@ -450,7 +450,7 @@
11
     ogs_assert(mme_ue);
12
 
13
     esmbuf = esm_build_deactivate_bearer_context_request(
14
-            bearer, ESM_CAUSE_REGULAR_DEACTIVATION);
15
+            bearer, OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
16
     ogs_expect_or_return_val(esmbuf, OGS_ERROR);
17
 
18
     s1apbuf = s1ap_build_e_rab_release_command(bearer, esmbuf,
19
open5gs_2.4.8.202207190002.tar.xz/src/mme/sgsap-handler.c -> open5gs_2.4.8.202207200002.tar.xz/src/mme/sgsap-handler.c Changed
21
 
1
@@ -124,8 +124,8 @@
2
 error:
3
     ogs_assert(OGS_OK ==
4
         nas_eps_send_attach_reject(mme_ue,
5
-            EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED,
6
-            ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
7
+            OGS_NAS_EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED,
8
+            OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
9
     mme_send_delete_session_or_mme_ue_context_release(mme_ue);
10
 }
11
 
12
@@ -205,7 +205,7 @@
13
 
14
     ogs_assert(OGS_OK ==
15
         nas_eps_send_attach_reject(mme_ue,
16
-            emm_cause, ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
17
+            emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
18
     mme_send_delete_session_or_mme_ue_context_release(mme_ue);
19
 
20
     return;
21
open5gs_2.4.8.202207190002.tar.xz/src/pcf/pcf-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/pcf/pcf-sm.c Changed
61
 
1
@@ -403,7 +403,11 @@
2
                     ogs_sbi_xact_remove(sbi_xact);
3
 
4
                     pcf_ue = pcf_ue_cycle(pcf_ue);
5
-                    ogs_assert(pcf_ue);
6
+                    if (!pcf_ue) {
7
+                        ogs_error("UE(pcf_ue) Context "
8
+                                    "has already been removed");
9
+                        break;
10
+                    }
11
 
12
                     e->pcf_ue = pcf_ue;
13
                     e->sbi.message = &message;
14
@@ -427,7 +431,10 @@
15
                     ogs_sbi_xact_remove(sbi_xact);
16
 
17
                     sess = pcf_sess_cycle(sess);
18
-                    ogs_assert(sess);
19
+                    if (!sess) {
20
+                        ogs_error("Session has already been removed");
21
+                        break;
22
+                    }
23
 
24
                     pcf_ue = sess->pcf_ue;
25
                     ogs_assert(pcf_ue);
26
@@ -475,7 +482,10 @@
27
                 ogs_sbi_xact_remove(sbi_xact);
28
 
29
                 sess = pcf_sess_cycle(sess);
30
-                ogs_assert(sess);
31
+                if (!sess) {
32
+                    ogs_error("Session has already been removed");
33
+                    break;
34
+                }
35
 
36
                 pcf_ue = sess->pcf_ue;
37
                 ogs_assert(pcf_ue);
38
@@ -568,12 +578,22 @@
39
             case OGS_SBI_OBJ_UE_TYPE:
40
                 pcf_ue = (pcf_ue_t *)sbi_object;
41
                 ogs_assert(pcf_ue);
42
+                pcf_ue = pcf_ue_cycle(pcf_ue);
43
+                if (!pcf_ue) {
44
+                    ogs_error("UE(pcf_ue) has already been removed");
45
+                    break;
46
+                }
47
                 ogs_error("%s Cannot receive SBI message", pcf_ue->supi);
48
                 break;
49
 
50
             case OGS_SBI_OBJ_SESS_TYPE:
51
                 sess = (pcf_sess_t *)sbi_object;
52
                 ogs_assert(sess);
53
+                sess = pcf_sess_cycle(sess);
54
+                if (!sess) {
55
+                    ogs_error("Session has already been removed");
56
+                    break;
57
+                }
58
                 ogs_error("%d Cannot receive SBI message", sess->psi);
59
                 break;
60
 
61
open5gs_2.4.8.202207190002.tar.xz/src/udm/udm-sm.c -> open5gs_2.4.8.202207200002.tar.xz/src/udm/udm-sm.c Changed
13
 
1
@@ -321,7 +321,10 @@
2
                 ogs_sbi_xact_remove(sbi_xact);
3
 
4
                 udm_ue = udm_ue_cycle(udm_ue);
5
-                ogs_assert(udm_ue);
6
+                if (!udm_ue) {
7
+                    ogs_error("UE(udm_ue) Context has already been removed");
8
+                    break;
9
+                }
10
 
11
                 e->udm_ue = udm_ue;
12
                 e->sbi.message = &message;
13
open5gs_2.4.8.202207190002.tar.xz/tests/attach/auth-test.c -> open5gs_2.4.8.202207200002.tar.xz/tests/attach/auth-test.c Changed
28
 
1
@@ -315,7 +315,7 @@
2
 
3
     /* Send Authentication failure - SYNCH failure */
4
     emmbuf = testemm_build_authentication_failure(
5
-            test_ue, EMM_CAUSE_SYNCH_FAILURE, 0x11223344);
6
+            test_ue, OGS_NAS_EMM_CAUSE_SYNCH_FAILURE, 0x11223344);
7
     ABTS_PTR_NOTNULL(tc, emmbuf);
8
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
9
     ABTS_PTR_NOTNULL(tc, sendbuf);
10
@@ -329,7 +329,7 @@
11
 
12
     /* Send Authentication failure - MAC failure */
13
     emmbuf = testemm_build_authentication_failure(
14
-            test_ue, EMM_CAUSE_MAC_FAILURE, 0);
15
+            test_ue, OGS_NAS_EMM_CAUSE_MAC_FAILURE, 0);
16
     ABTS_PTR_NOTNULL(tc, emmbuf);
17
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
18
     ABTS_PTR_NOTNULL(tc, sendbuf);
19
@@ -388,7 +388,7 @@
20
 
21
     /* Send Authentication failure - MAC failure */
22
     emmbuf = testemm_build_authentication_failure(
23
-            test_ue, EMM_CAUSE_MAC_FAILURE, 0);
24
+            test_ue, OGS_NAS_EMM_CAUSE_MAC_FAILURE, 0);
25
     ABTS_PTR_NOTNULL(tc, emmbuf);
26
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
27
     ABTS_PTR_NOTNULL(tc, sendbuf);
28
open5gs_2.4.8.202207190002.tar.xz/tests/attach/emm-status-test.c -> open5gs_2.4.8.202207200002.tar.xz/tests/attach/emm-status-test.c Changed
12
 
1
@@ -150,8 +150,8 @@
2
     tests1ap_recv(test_ue, recvbuf);
3
 
4
     /* Send EMM Status */
5
-    emmbuf = testemm_build_emm_status(
6
-            test_ue, ESM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
7
+    emmbuf = testemm_build_emm_status(test_ue,
8
+            OGS_NAS_ESM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
9
     ABTS_PTR_NOTNULL(tc, emmbuf);
10
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
11
     ABTS_PTR_NOTNULL(tc, sendbuf);
12
open5gs_2.4.8.202207190002.tar.xz/tests/common/emm-build.c -> open5gs_2.4.8.202207200002.tar.xz/tests/common/emm-build.c Changed
10
 
1
@@ -342,7 +342,7 @@
2
 
3
     authentication_failure->emm_cause = emm_cause;
4
 
5
-    if (emm_cause == EMM_CAUSE_SYNCH_FAILURE) {
6
+    if (emm_cause == OGS_NAS_EMM_CAUSE_SYNCH_FAILURE) {
7
         authentication_failure->presencemask |=
8
             OGS_NAS_EPS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT;
9
 
10
open5gs_2.4.8.202207190002.tar.xz/tests/unit/nas-message-test.c -> open5gs_2.4.8.202207200002.tar.xz/tests/unit/nas-message-test.c Changed
10
 
1
@@ -175,7 +175,7 @@
2
     memset(&message, 0, sizeof(message));
3
     message.emm.h.protocol_discriminator = OGS_NAS_PROTOCOL_DISCRIMINATOR_EMM;
4
     message.emm.h.message_type = OGS_NAS_EPS_ATTACH_REJECT;
5
-    attach_reject->emm_cause = EMM_CAUSE_NETWORK_FAILURE; 
6
+    attach_reject->emm_cause = OGS_NAS_EMM_CAUSE_NETWORK_FAILURE; 
7
 
8
     pkbuf = ogs_nas_eps_plain_encode(&message);
9
     ABTS_INT_EQUAL(tc, sizeof(buffer), pkbuf->len);
10
open5gs_2.4.8.202207190002.tar.xz/tests/volte/rx-test.c -> open5gs_2.4.8.202207200002.tar.xz/tests/volte/rx-test.c Changed
10
 
1
@@ -430,7 +430,7 @@
2
     sess->pti = 10;
3
     esmbuf = testesm_build_bearer_resource_modification_request(
4
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
5
-            ESM_CAUSE_REGULAR_DEACTIVATION);
6
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
7
     ABTS_PTR_NOTNULL(tc, esmbuf);
8
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
9
     ABTS_PTR_NOTNULL(tc, sendbuf);
10
open5gs_2.4.8.202207190002.tar.xz/tests/volte/video-test.c -> open5gs_2.4.8.202207200002.tar.xz/tests/volte/video-test.c Changed
55
 
1
@@ -347,7 +347,7 @@
2
     ogs_assert(bearer);
3
     esmbuf = testesm_build_bearer_resource_modification_request(
4
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
5
-            ESM_CAUSE_REGULAR_DEACTIVATION);
6
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
7
     ABTS_PTR_NOTNULL(tc, esmbuf);
8
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
9
     ABTS_PTR_NOTNULL(tc, sendbuf);
10
@@ -509,7 +509,7 @@
11
     ogs_assert(bearer);
12
     esmbuf = testesm_build_bearer_resource_modification_request(
13
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
14
-            ESM_CAUSE_REGULAR_DEACTIVATION);
15
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
16
     ABTS_PTR_NOTNULL(tc, esmbuf);
17
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
18
     ABTS_PTR_NOTNULL(tc, sendbuf);
19
@@ -671,7 +671,7 @@
20
     ogs_assert(bearer);
21
     esmbuf = testesm_build_bearer_resource_modification_request(
22
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
23
-            ESM_CAUSE_REGULAR_DEACTIVATION);
24
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
25
     ABTS_PTR_NOTNULL(tc, esmbuf);
26
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
27
     ABTS_PTR_NOTNULL(tc, sendbuf);
28
@@ -833,7 +833,7 @@
29
     ogs_assert(bearer);
30
     esmbuf = testesm_build_bearer_resource_modification_request(
31
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
32
-            ESM_CAUSE_REGULAR_DEACTIVATION);
33
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
34
     ABTS_PTR_NOTNULL(tc, esmbuf);
35
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
36
     ABTS_PTR_NOTNULL(tc, sendbuf);
37
@@ -995,7 +995,7 @@
38
     ogs_assert(bearer);
39
     esmbuf = testesm_build_bearer_resource_modification_request(
40
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
41
-            ESM_CAUSE_REGULAR_DEACTIVATION);
42
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
43
     ABTS_PTR_NOTNULL(tc, esmbuf);
44
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
45
     ABTS_PTR_NOTNULL(tc, sendbuf);
46
@@ -1157,7 +1157,7 @@
47
     ogs_assert(bearer);
48
     esmbuf = testesm_build_bearer_resource_modification_request(
49
             bearer, OGS_GTP2_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING, 0,
50
-            ESM_CAUSE_REGULAR_DEACTIVATION);
51
+            OGS_NAS_ESM_CAUSE_REGULAR_DEACTIVATION);
52
     ABTS_PTR_NOTNULL(tc, esmbuf);
53
     sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
54
     ABTS_PTR_NOTNULL(tc, sendbuf);
55