Changes of Revision 532

commit_0e441cf710bae0f11014c8e6945cfdf4567f3100.txt Deleted
commit_151275d708fc9b9b0c3af60ab40960168f9fd0a1.txt Added
open5gs_2.7.2.4530.0e44.dsc -> open5gs_2.7.2.4531.1512.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-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
 Architecture: any
5
-Version: 2.7.2.4530.0e44
6
+Version: 2.7.2.4531.1512
7
 Maintainer: Harald Welte <laforge@gnumonks.org>
8
 Uploaders: Sukchan Lee <acetcom@gmail.com>
9
 Homepage: https://open5gs.org
10
@@ -32,8 +32,8 @@
11
  open5gs-udr deb net optional arch=any
12
  open5gs-upf deb net optional arch=any
13
 Checksums-Sha1:
14
- ba56d0188b67eeea39cbb30b91dda24edae61940 14508800 open5gs_2.7.2.4530.0e44.tar.xz
15
+ 80ef6be38d24a2de7428cd58bffe076d3f6ad4b4 14510912 open5gs_2.7.2.4531.1512.tar.xz
16
 Checksums-Sha256:
17
- 02ee8c54e88d6938b6b5af61673bf499c75c3b8be40081e536dc4d8a6da76ec6 14508800 open5gs_2.7.2.4530.0e44.tar.xz
18
+ c22978228070dc76feb5278c54a28921fad34fd5c762390b2a858fac23b9892a 14510912 open5gs_2.7.2.4531.1512.tar.xz
19
 Files:
20
- 8d0b0b772638e1e5d67646005d53233d 14508800 open5gs_2.7.2.4530.0e44.tar.xz
21
+ 796ab10328be55f03b990a45beb538ed 14510912 open5gs_2.7.2.4531.1512.tar.xz
22
open5gs_2.7.2.4530.0e44.tar.xz/.tarball-version -> open5gs_2.7.2.4531.1512.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-2.7.2.4530-0e44
3
+2.7.2.4531-1512
4
open5gs_2.7.2.4530.0e44.tar.xz/debian/changelog -> open5gs_2.7.2.4531.1512.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-open5gs (2.7.2.4530.0e44) unstable; urgency=medium
3
+open5gs (2.7.2.4531.1512) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Sun, 20 Oct 2024 07:41:29 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Sun, 20 Oct 2024 09:54:44 +0000
9
 
10
 open5gs (2.7.2) unstable; urgency=medium
11
 
12
open5gs_2.7.2.4530.0e44.tar.xz/lib/pfcp/build.c -> open5gs_2.7.2.4531.1512.tar.xz/lib/pfcp/build.c Changed
119
 
1
@@ -476,7 +476,8 @@
2
 }
3
 
4
 void ogs_pfcp_build_update_pdr(
5
-    ogs_pfcp_tlv_update_pdr_t *message, int i, ogs_pfcp_pdr_t *pdr)
6
+    ogs_pfcp_tlv_update_pdr_t *message, int i,
7
+    ogs_pfcp_pdr_t *pdr, uint64_t modify_flags)
8
 {
9
     ogs_pfcp_sdf_filter_t pfcp_sdf_filterOGS_MAX_NUM_OF_FLOW_IN_PDR;
10
     int j = 0;
11
@@ -485,64 +486,55 @@
12
     ogs_assert(message);
13
     ogs_assert(pdr);
14
 
15
+    ogs_assert(modify_flags &
16
+            (OGS_PFCP_MODIFY_TFT_NEW|OGS_PFCP_MODIFY_TFT_ADD|
17
+             OGS_PFCP_MODIFY_TFT_REPLACE|OGS_PFCP_MODIFY_TFT_DELETE|
18
+             OGS_PFCP_MODIFY_EPC_TFT_UPDATE|
19
+             OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL));
20
+
21
     message->presence = 1;
22
     message->pdr_id.presence = 1;
23
     message->pdr_id.u16 = pdr->id;
24
 
25
-    message->pdi.presence = 1;
26
-    message->pdi.source_interface.presence = 1;
27
-    message->pdi.source_interface.u8 = pdr->src_if;
28
-
29
-    if (pdr->dnn) {
30
-        message->pdi.network_instance.presence = 1;
31
-        message->pdi.network_instance.len = ogs_fqdn_build(
32
-            pdrbufi.dnn, pdr->dnn, strlen(pdr->dnn));
33
-        message->pdi.network_instance.data = pdrbufi.dnn;
34
-    }
35
-
36
-    memset(pfcp_sdf_filter, 0, sizeof(pfcp_sdf_filter));
37
-    for (j = 0; j < pdr->num_of_flow && j < OGS_MAX_NUM_OF_FLOW_IN_PDR; j++) {
38
-        ogs_assert(pdr->flowj.fd || pdr->flowj.bid);
39
-
40
-        if (pdr->flowj.fd) {
41
-            pfcp_sdf_filterj.fd = 1;
42
-            pfcp_sdf_filterj.flow_description_len =
43
-                    strlen(pdr->flowj.description);
44
-            pfcp_sdf_filterj.flow_description = pdr->flowj.description;
45
+    if (modify_flags &
46
+            (OGS_PFCP_MODIFY_TFT_NEW|OGS_PFCP_MODIFY_TFT_ADD|
47
+             OGS_PFCP_MODIFY_TFT_REPLACE|OGS_PFCP_MODIFY_TFT_DELETE|
48
+             OGS_PFCP_MODIFY_EPC_TFT_UPDATE)) {
49
+        message->pdi.presence = 1;
50
+        message->pdi.source_interface.presence = 1;
51
+        message->pdi.source_interface.u8 = pdr->src_if;
52
+
53
+        memset(pfcp_sdf_filter, 0, sizeof(pfcp_sdf_filter));
54
+        for (j = 0; j < pdr->num_of_flow && j < OGS_MAX_NUM_OF_FLOW_IN_PDR; j++) {
55
+            ogs_assert(pdr->flowj.fd || pdr->flowj.bid);
56
+
57
+            if (pdr->flowj.fd) {
58
+                pfcp_sdf_filterj.fd = 1;
59
+                pfcp_sdf_filterj.flow_description_len =
60
+                        strlen(pdr->flowj.description);
61
+                pfcp_sdf_filterj.flow_description = pdr->flowj.description;
62
+            }
63
+            if (pdr->flowj.bid) {
64
+                pfcp_sdf_filterj.bid = 1;
65
+                pfcp_sdf_filterj.sdf_filter_id = pdr->flowj.sdf_filter_id;
66
+            }
67
+
68
+            len = sizeof(ogs_pfcp_sdf_filter_t) +
69
+                    pfcp_sdf_filterj.flow_description_len;
70
+
71
+            message->pdi.sdf_filterj.presence = 1;
72
+            pdrbufi.sdf_filterj = ogs_calloc(1, len);
73
+            ogs_assert(pdrbufi.sdf_filterj);
74
+            ogs_pfcp_build_sdf_filter(&message->pdi.sdf_filterj,
75
+                    &pfcp_sdf_filterj, pdrbufi.sdf_filterj, len);
76
         }
77
-        if (pdr->flowj.bid) {
78
-            pfcp_sdf_filterj.bid = 1;
79
-            pfcp_sdf_filterj.sdf_filter_id = pdr->flowj.sdf_filter_id;
80
-        }
81
-
82
-        len = sizeof(ogs_pfcp_sdf_filter_t) +
83
-                pfcp_sdf_filterj.flow_description_len;
84
-
85
-        message->pdi.sdf_filterj.presence = 1;
86
-        pdrbufi.sdf_filterj = ogs_calloc(1, len);
87
-        ogs_assert(pdrbufi.sdf_filterj);
88
-        ogs_pfcp_build_sdf_filter(&message->pdi.sdf_filterj,
89
-                &pfcp_sdf_filterj, pdrbufi.sdf_filterj, len);
90
     }
91
-
92
-    if (pdr->ue_ip_addr_len) {
93
-        message->pdi.ue_ip_address.presence = 1;
94
-        message->pdi.ue_ip_address.data = &pdr->ue_ip_addr;
95
-        message->pdi.ue_ip_address.len = pdr->ue_ip_addr_len;
96
-    }
97
-
98
-    if (pdr->f_teid_len) {
99
-        memcpy(&pdrbufi.f_teid, &pdr->f_teid, pdr->f_teid_len);
100
-        pdrbufi.f_teid.teid = htobe32(pdr->f_teid.teid);
101
-
102
-        message->pdi.local_f_teid.presence = 1;
103
-        message->pdi.local_f_teid.data = &pdrbufi.f_teid;
104
-        message->pdi.local_f_teid.len = pdr->f_teid_len;
105
-    }
106
-
107
-    if (pdr->qfi) {
108
-        message->pdi.qfi.presence = 1;
109
-        message->pdi.qfi.u8 = pdr->qfi;
110
+    if (modify_flags & OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL) {
111
+        if (pdr->outer_header_removal_len) {
112
+            message->outer_header_removal.presence = 1;
113
+            message->outer_header_removal.data = &pdr->outer_header_removal;
114
+            message->outer_header_removal.len = pdr->outer_header_removal_len;
115
+        }
116
     }
117
 }
118
 
119
open5gs_2.7.2.4530.0e44.tar.xz/lib/pfcp/build.h -> open5gs_2.7.2.4531.1512.tar.xz/lib/pfcp/build.h Changed
11
 
1
@@ -43,7 +43,8 @@
2
 bool ogs_pfcp_build_created_pdr(
3
     ogs_pfcp_tlv_created_pdr_t *message, int i, ogs_pfcp_pdr_t *pdr);
4
 void ogs_pfcp_build_update_pdr(
5
-    ogs_pfcp_tlv_update_pdr_t *message, int i, ogs_pfcp_pdr_t *pdr);
6
+    ogs_pfcp_tlv_update_pdr_t *message, int i,
7
+    ogs_pfcp_pdr_t *pdr, uint64_t modify_flags);
8
 
9
 void ogs_pfcp_build_create_far(
10
     ogs_pfcp_tlv_create_far_t *message, int i, ogs_pfcp_far_t *far);
11
open5gs_2.7.2.4530.0e44.tar.xz/lib/pfcp/context.h -> open5gs_2.7.2.4531.1512.tar.xz/lib/pfcp/context.h Changed
16
 
1
@@ -28,10 +28,10 @@
2
 extern "C" {
3
 #endif
4
 
5
-#define OGS_PFCP_DEFAULT_PDR_PRECEDENCE 255
6
-#define OGS_PFCP_INDIRECT_PDR_PRECEDENCE 1
7
-#define OGS_PFCP_UP2CP_PDR_PRECEDENCE 1
8
-#define OGS_PFCP_CP2UP_PDR_PRECEDENCE 1000
9
+#define OGS_PFCP_DEFAULT_PDR_PRECEDENCE 65535
10
+#define OGS_PFCP_INDIRECT_PDR_PRECEDENCE 4096
11
+#define OGS_PFCP_UP2CP_PDR_PRECEDENCE 255
12
+#define OGS_PFCP_CP2UP_PDR_PRECEDENCE 255
13
 
14
 #define OGS_PFCP_DEFAULT_CHOOSE_ID 5
15
 #define OGS_PFCP_INDIRECT_DATA_FORWARDING_CHOOSE_ID 10
16
open5gs_2.7.2.4530.0e44.tar.xz/lib/pfcp/xact.h -> open5gs_2.7.2.4531.1512.tar.xz/lib/pfcp/xact.h Changed
40
 
1
@@ -100,21 +100,23 @@
2
 #define OGS_PFCP_MODIFY_QOS_CREATE ((uint64_t)1<<14)
3
 #define OGS_PFCP_MODIFY_QOS_MODIFY ((uint64_t)1<<15)
4
 #define OGS_PFCP_MODIFY_QOS_DELETE ((uint64_t)1<<16)
5
-#define OGS_PFCP_MODIFY_ACTIVATE ((uint64_t)1<<17)
6
-#define OGS_PFCP_MODIFY_DEACTIVATE ((uint64_t)1<<18)
7
-#define OGS_PFCP_MODIFY_END_MARKER ((uint64_t)1<<19)
8
-#define OGS_PFCP_MODIFY_ERROR_INDICATION ((uint64_t)1<<20)
9
-#define OGS_PFCP_MODIFY_XN_HANDOVER ((uint64_t)1<<21)
10
-#define OGS_PFCP_MODIFY_N2_HANDOVER ((uint64_t)1<<22)
11
-#define OGS_PFCP_MODIFY_HANDOVER_CANCEL ((uint64_t)1<<23)
12
-#define OGS_PFCP_MODIFY_URR  ((uint64_t)1<<24) /* type of trigger */
13
-#define OGS_PFCP_MODIFY_URR_MEAS_METHOD ((uint64_t)1<<25)
14
-#define OGS_PFCP_MODIFY_URR_REPORT_TRIGGER ((uint64_t)1<<26)
15
-#define OGS_PFCP_MODIFY_URR_QUOTA_VALIDITY_TIME ((uint64_t)1<<27)
16
-#define OGS_PFCP_MODIFY_URR_VOLUME_QUOTA ((uint64_t)1<<28)
17
-#define OGS_PFCP_MODIFY_URR_TIME_QUOTA ((uint64_t)1<<29)
18
-#define OGS_PFCP_MODIFY_URR_VOLUME_THRESH ((uint64_t)1<<30)
19
-#define OGS_PFCP_MODIFY_URR_TIME_THRESH ((uint64_t)1<<31)
20
+#define OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL ((uint64_t)1<<17)
21
+#define OGS_PFCP_MODIFY_ACTIVATE ((uint64_t)1<<18)
22
+#define OGS_PFCP_MODIFY_DEACTIVATE ((uint64_t)1<<19)
23
+#define OGS_PFCP_MODIFY_END_MARKER ((uint64_t)1<<20)
24
+#define OGS_PFCP_MODIFY_ERROR_INDICATION ((uint64_t)1<<21)
25
+#define OGS_PFCP_MODIFY_XN_HANDOVER ((uint64_t)1<<22)
26
+#define OGS_PFCP_MODIFY_N2_HANDOVER ((uint64_t)1<<23)
27
+#define OGS_PFCP_MODIFY_HANDOVER_CANCEL ((uint64_t)1<<24)
28
+#define OGS_PFCP_MODIFY_HOME_ROUTED_ROAMING ((uint64_t)1<<25)
29
+#define OGS_PFCP_MODIFY_URR  ((uint64_t)1<<26) /* type of trigger */
30
+#define OGS_PFCP_MODIFY_URR_MEAS_METHOD ((uint64_t)1<<27)
31
+#define OGS_PFCP_MODIFY_URR_REPORT_TRIGGER ((uint64_t)1<<28)
32
+#define OGS_PFCP_MODIFY_URR_QUOTA_VALIDITY_TIME ((uint64_t)1<<29)
33
+#define OGS_PFCP_MODIFY_URR_VOLUME_QUOTA ((uint64_t)1<<30)
34
+#define OGS_PFCP_MODIFY_URR_TIME_QUOTA ((uint64_t)1<<31)
35
+#define OGS_PFCP_MODIFY_URR_VOLUME_THRESH ((uint64_t)1<<32)
36
+#define OGS_PFCP_MODIFY_URR_TIME_THRESH ((uint64_t)1<<33)
37
     uint64_t        modify_flags;
38
 
39
 #define OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED 1
40
open5gs_2.7.2.4530.0e44.tar.xz/src/sgwc/context.h -> open5gs_2.7.2.4531.1512.tar.xz/src/sgwc/context.h Changed
11
 
1
@@ -89,6 +89,9 @@
2
     /* APN Configuration */
3
     ogs_session_t   session;
4
 
5
+    /* PDN Address Allocation (PAA) */
6
+    ogs_paa_t       paa;
7
+
8
     ogs_list_t      bearer_list;
9
 
10
     /* Related Context */
11
open5gs_2.7.2.4530.0e44.tar.xz/src/sgwc/s11-handler.c -> open5gs_2.7.2.4531.1512.tar.xz/src/sgwc/s11-handler.c Changed
152
 
1
@@ -428,6 +428,7 @@
2
     sgwc_sess_t *sess = NULL;
3
     sgwc_bearer_t *bearer = NULL;
4
     sgwc_tunnel_t *dl_tunnel = NULL;
5
+    ogs_pfcp_pdr_t *pdr = NULL;
6
     ogs_pfcp_far_t *far = NULL;
7
     ogs_ip_t remote_ip;
8
     ogs_ip_t zero_ip;
9
@@ -515,8 +516,10 @@
10
             ogs_assert(current_xact);
11
 
12
             current_xact->assoc_xact_id = s11_xact->id;
13
-            current_xact->modify_flags = OGS_PFCP_MODIFY_SESSION|
14
-                OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE;
15
+            current_xact->modify_flags =
16
+                OGS_PFCP_MODIFY_SESSION|OGS_PFCP_MODIFY_DL_ONLY|
17
+                OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL|
18
+                OGS_PFCP_MODIFY_ACTIVATE;
19
             if (gtpbuf) {
20
                 current_xact->gtpbuf = ogs_pkbuf_copy(gtpbuf);
21
                 ogs_assert(current_xact->gtpbuf);
22
@@ -553,6 +556,24 @@
23
 
24
         memcpy(&dl_tunnel->remote_ip, &remote_ip, sizeof(ogs_ip_t));
25
 
26
+        pdr = dl_tunnel->pdr;
27
+        ogs_assert(pdr);
28
+
29
+        pdr->outer_header_removal_len = 1;
30
+        if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
31
+            pdr->outer_header_removal.description =
32
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
33
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
34
+            pdr->outer_header_removal.description =
35
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
36
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
37
+            pdr->outer_header_removal.description =
38
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
39
+        } else {
40
+            ogs_error("Invalid session_type %d", sess->session.session_type);
41
+            ogs_assert_if_reached();
42
+        }
43
+
44
         far = dl_tunnel->far;
45
         ogs_assert(far);
46
 
47
@@ -745,6 +766,7 @@
48
     sgwc_bearer_t *bearer = NULL;
49
     ogs_pool_id_t bearer_id = OGS_INVALID_POOL_ID;
50
     sgwc_tunnel_t *dl_tunnel = NULL, *ul_tunnel = NULL;
51
+    ogs_pfcp_pdr_t *pdr = NULL;
52
     ogs_pfcp_far_t *far = NULL;
53
 
54
     ogs_gtp_xact_t *s5c_xact = NULL;
55
@@ -912,6 +934,25 @@
56
     ogs_assert(OGS_OK ==
57
             ogs_gtp2_f_teid_to_ip(enb_s1u_teid, &dl_tunnel->remote_ip));
58
 
59
+    pdr = dl_tunnel->pdr;
60
+    ogs_assert(pdr);
61
+
62
+    pdr->outer_header_removal_len = 1;
63
+    if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
64
+        pdr->outer_header_removal.description =
65
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
66
+    } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
67
+        pdr->outer_header_removal.description =
68
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
69
+    } else if (sess->session.session_type ==
70
+            OGS_PDU_SESSION_TYPE_IPV4V6) {
71
+        pdr->outer_header_removal.description =
72
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
73
+    } else {
74
+        ogs_error("Invalid session_type %d", sess->session.session_type);
75
+        ogs_assert_if_reached();
76
+    }
77
+
78
     far = dl_tunnel->far;
79
     ogs_assert(far);
80
 
81
@@ -1341,6 +1382,7 @@
82
     sgwc_sess_t *sess = NULL;
83
     sgwc_bearer_t *bearer = NULL;
84
     sgwc_tunnel_t *tunnel = NULL;
85
+    ogs_pfcp_pdr_t *pdr = NULL;
86
     ogs_pfcp_far_t *far = NULL;
87
 
88
     ogs_gtp2_create_indirect_data_forwarding_tunnel_request_t *req = NULL;
89
@@ -1393,6 +1435,8 @@
90
         bearer = sgwc_bearer_find_by_ue_ebi(sgwc_ue,
91
                     req->bearer_contextsi.eps_bearer_id.u8);
92
         ogs_assert(bearer);
93
+        sess = sgwc_sess_find_by_id(bearer->sess_id);
94
+        ogs_assert(sess);
95
 
96
         if (req->bearer_contextsi.s1_u_enodeb_f_teid.presence) {
97
             req_teid = req->bearer_contextsi.s1_u_enodeb_f_teid.data;
98
@@ -1413,6 +1457,26 @@
99
                 return;
100
             }
101
 
102
+            pdr = tunnel->pdr;
103
+            ogs_assert(pdr);
104
+
105
+            pdr->outer_header_removal_len = 1;
106
+            if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
107
+                pdr->outer_header_removal.description =
108
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
109
+            } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
110
+                pdr->outer_header_removal.description =
111
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
112
+            } else if (sess->session.session_type ==
113
+                    OGS_PDU_SESSION_TYPE_IPV4V6) {
114
+                pdr->outer_header_removal.description =
115
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
116
+            } else {
117
+                ogs_error("Invalid session_type %d",
118
+                        sess->session.session_type);
119
+                ogs_assert_if_reached();
120
+            }
121
+
122
             far = tunnel->far;
123
             ogs_assert(far);
124
 
125
@@ -1448,6 +1512,26 @@
126
                 return;
127
             }
128
 
129
+            pdr = tunnel->pdr;
130
+            ogs_assert(pdr);
131
+
132
+            pdr->outer_header_removal_len = 1;
133
+            if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
134
+                pdr->outer_header_removal.description =
135
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
136
+            } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
137
+                pdr->outer_header_removal.description =
138
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
139
+            } else if (sess->session.session_type ==
140
+                    OGS_PDU_SESSION_TYPE_IPV4V6) {
141
+                pdr->outer_header_removal.description =
142
+                    OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
143
+            } else {
144
+                ogs_error("Invalid session_type %d",
145
+                        sess->session.session_type);
146
+                ogs_assert_if_reached();
147
+            }
148
+
149
             far = tunnel->far;
150
             ogs_assert(far);
151
 
152
open5gs_2.7.2.4530.0e44.tar.xz/src/sgwc/s5c-handler.c -> open5gs_2.7.2.4531.1512.tar.xz/src/sgwc/s5c-handler.c Changed
97
 
1
@@ -76,6 +76,7 @@
2
     sgwc_ue_t *sgwc_ue = NULL;
3
     sgwc_bearer_t *bearer = NULL;
4
     sgwc_tunnel_t *ul_tunnel = NULL;
5
+    ogs_pfcp_pdr_t *pdr = NULL;
6
     ogs_pfcp_far_t *far = NULL;
7
 
8
     ogs_gtp2_f_teid_t *pgw_s5c_teid = NULL;
9
@@ -145,6 +146,17 @@
10
     if (rsp->pdn_address_allocation.presence == 0) {
11
         ogs_error("No PDN Address Allocation Cause:%d", session_cause);
12
         cause_value = OGS_GTP2_CAUSE_CONDITIONAL_IE_MISSING;
13
+    } else {
14
+        memcpy(&sess->paa, rsp->pdn_address_allocation.data,
15
+                rsp->pdn_address_allocation.len);
16
+        sess->session.session_type = sess->paa.session_type;
17
+        if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
18
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
19
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
20
+        } else {
21
+            ogs_error("Unknown session-type %d", sess->session.session_type);
22
+            cause_value = OGS_GTP2_CAUSE_PREFERRED_PDN_TYPE_NOT_SUPPORTED;
23
+        }
24
     }
25
 
26
     if (rsp->cause.presence == 0) {
27
@@ -253,6 +265,24 @@
28
             return;
29
         }
30
 
31
+        pdr = ul_tunnel->pdr;
32
+        ogs_assert(pdr);
33
+
34
+        pdr->outer_header_removal_len = 1;
35
+        if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
36
+            pdr->outer_header_removal.description =
37
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
38
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
39
+            pdr->outer_header_removal.description =
40
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
41
+        } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
42
+            pdr->outer_header_removal.description =
43
+                OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
44
+        } else {
45
+            ogs_error("Invalid session_type %d", sess->session.session_type);
46
+            ogs_assert_if_reached();
47
+        }
48
+
49
         far = ul_tunnel->far;
50
         ogs_assert(far);
51
 
52
@@ -286,7 +316,9 @@
53
     ogs_assert(OGS_OK ==
54
         sgwc_pfcp_send_session_modification_request(
55
             sess, s11_xact->id, gtpbuf,
56
-            OGS_PFCP_MODIFY_UL_ONLY|OGS_PFCP_MODIFY_ACTIVATE));
57
+            OGS_PFCP_MODIFY_UL_ONLY|
58
+            OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL|
59
+            OGS_PFCP_MODIFY_ACTIVATE));
60
 }
61
 
62
 void sgwc_s5c_handle_modify_bearer_response(
63
@@ -536,6 +568,7 @@
64
     sgwc_ue_t *sgwc_ue = NULL;
65
     sgwc_bearer_t *bearer = NULL;
66
     sgwc_tunnel_t *ul_tunnel = NULL;
67
+    ogs_pfcp_pdr_t *pdr = NULL;
68
     ogs_pfcp_far_t *far = NULL;
69
 
70
     ogs_gtp2_create_bearer_request_t *req = NULL;
71
@@ -630,6 +663,25 @@
72
         return;
73
     }
74
 
75
+    pdr = ul_tunnel->pdr;
76
+    ogs_assert(pdr);
77
+
78
+    pdr->outer_header_removal_len = 1;
79
+    if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
80
+        pdr->outer_header_removal.description =
81
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
82
+    } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV6) {
83
+        pdr->outer_header_removal.description =
84
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV6;
85
+    } else if (sess->session.session_type ==
86
+            OGS_PDU_SESSION_TYPE_IPV4V6) {
87
+        pdr->outer_header_removal.description =
88
+            OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
89
+    } else {
90
+        ogs_error("Invalid session_type %d", sess->session.session_type);
91
+        ogs_assert_if_reached();
92
+    }
93
+
94
     far = ul_tunnel->far;
95
     ogs_assert(far);
96
 
97
open5gs_2.7.2.4530.0e44.tar.xz/src/sgwc/sxa-build.c -> open5gs_2.7.2.4531.1512.tar.xz/src/sgwc/sxa-build.c Changed
35
 
1
@@ -131,6 +131,7 @@
2
     int num_of_remove_far = 0;
3
     int num_of_create_pdr = 0;
4
     int num_of_create_far = 0;
5
+    int num_of_update_pdr = 0;
6
     int num_of_update_far = 0;
7
 
8
     uint64_t modify_flags = 0;
9
@@ -259,10 +260,25 @@
10
                         ogs_assert_if_reached();
11
 
12
                 }
13
+
14
+                if (modify_flags & OGS_PFCP_MODIFY_OUTER_HEADER_REMOVAL) {
15
+                    /* Update PDR */
16
+                    pdr = tunnel->pdr;
17
+                    if (pdr) {
18
+                        ogs_pfcp_build_update_pdr(
19
+                                &req->update_pdrnum_of_update_pdr,
20
+                                num_of_update_pdr, pdr, modify_flags);
21
+                        num_of_update_pdr++;
22
+                    } else
23
+                        ogs_assert_if_reached();
24
+                }
25
             }
26
         }
27
     }
28
 
29
+    ogs_assert(num_of_remove_pdr + num_of_remove_far + num_of_create_pdr +
30
+            num_of_create_far + num_of_update_pdr + num_of_update_far);
31
+
32
     pfcp_message->h.type = type;
33
     pkbuf = ogs_pfcp_build_msg(pfcp_message);
34
     ogs_expect(pkbuf);
35
open5gs_2.7.2.4530.0e44.tar.xz/src/sgwu/gtp-path.c -> open5gs_2.7.2.4531.1512.tar.xz/src/sgwu/gtp-path.c Changed
11
 
1
@@ -236,8 +236,7 @@
2
                     continue;
3
 
4
                 /* Check if QFI */
5
-                if (header_desc.qos_flow_identifier &&
6
-                        pdr->qfi != header_desc.qos_flow_identifier)
7
+                if (pdr->qfi && pdr->qfi != header_desc.qos_flow_identifier)
8
                     continue;
9
 
10
                 /* Check if Rule List in PDR */
11
open5gs_2.7.2.4530.0e44.tar.xz/src/smf/context.c -> open5gs_2.7.2.4531.1512.tar.xz/src/smf/context.c Changed
124
 
1
@@ -1965,7 +1965,7 @@
2
 
3
     ul_pdr->src_if = OGS_PFCP_INTERFACE_ACCESS;
4
 
5
-    ul_pdr->outer_header_removal_len = 2;
6
+    ul_pdr->outer_header_removal_len = 1;
7
     if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4) {
8
         ul_pdr->outer_header_removal.description =
9
             OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4;
10
@@ -1975,10 +1975,10 @@
11
     } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
12
         ul_pdr->outer_header_removal.description =
13
             OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
14
-    } else
15
+    } else {
16
+        ogs_error("Invalid session_type %d", sess->session.session_type);
17
         ogs_assert_if_reached();
18
-    ul_pdr->outer_header_removal.gtpu_extheader_deletion =
19
-        OGS_PFCP_PDU_SESSION_CONTAINER_TO_BE_DELETED;
20
+    }
21
 
22
     /* FAR */
23
     dl_far = ogs_pfcp_far_add(&sess->pfcp);
24
@@ -2077,8 +2077,10 @@
25
         } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
26
             pdr->outer_header_removal.description =
27
                 OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
28
-        } else
29
+        } else {
30
+            ogs_error("Invalid session_type %d", sess->session.session_type);
31
             ogs_assert_if_reached();
32
+        }
33
 
34
         far = ogs_pfcp_far_add(&sess->pfcp);
35
         ogs_assert(far);
36
@@ -2245,9 +2247,15 @@
37
     ogs_assert(cp2up_pdr);
38
     sess->cp2up_pdr = cp2up_pdr;
39
 
40
+#if 0
41
+    /*
42
+     * DEPRECATED:
43
+     * In PDR, no need to distinguish the Network Instance from CP to UP.
44
+     */
45
     ogs_assert(sess->session.name);
46
     cp2up_pdr->apn = ogs_strdup(sess->session.name);
47
     ogs_assert(cp2up_pdr->apn);
48
+#endif
49
 
50
     cp2up_pdr->src_if = OGS_PFCP_INTERFACE_CP_FUNCTION;
51
 
52
@@ -2261,8 +2269,10 @@
53
     } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
54
         cp2up_pdr->outer_header_removal.description =
55
             OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
56
-    } else
57
+    } else {
58
+        ogs_error("Invalid session_type %d", sess->session.session_type);
59
         ogs_assert_if_reached();
60
+    }
61
 
62
     up2cp_pdr = ogs_pfcp_pdr_add(&sess->pfcp);
63
     ogs_assert(up2cp_pdr);
64
@@ -2284,8 +2294,10 @@
65
     } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
66
         up2cp_pdr->outer_header_removal.description =
67
             OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
68
-    } else
69
+    } else {
70
+        ogs_error("Invalid session_type %d", sess->session.session_type);
71
         ogs_assert_if_reached();
72
+    }
73
 
74
     qos_flow = smf_default_bearer_in_sess(sess);
75
     ogs_assert(qos_flow);
76
@@ -2302,14 +2314,27 @@
77
     sess->up2cp_far = up2cp_far;
78
 
79
     ogs_assert(sess->session.name);
80
+#if 0
81
+    /*
82
+     * DEPRECATED:
83
+     * In FAR, no need to distinguish the Network Instance from CP to UP.
84
+     */
85
     up2cp_far->apn = ogs_strdup(sess->session.name);
86
     ogs_assert(up2cp_far->apn);
87
+#endif
88
 
89
     up2cp_far->dst_if = OGS_PFCP_INTERFACE_CP_FUNCTION;
90
     ogs_pfcp_pdr_associate_far(up2cp_pdr, up2cp_far);
91
 
92
     up2cp_far->apply_action = OGS_PFCP_APPLY_ACTION_FORW;
93
 
94
+#if 0
95
+    /*
96
+     * MODIFIED the PDI matching for UP2CP
97
+     * to not distinguish the QoS Flow Identifier.
98
+     *
99
+     * When omitted, the UPF was also adjusted to not compare the QFI.
100
+     */
101
     if (qos_flow->qer && qos_flow->qfi) {
102
         /* To match the PDI of UP2CP_PDR(from ff02::2/128 to assigned)
103
          * Router-Solicitation has QFI in the Extended Header */
104
@@ -2319,6 +2344,7 @@
105
          * it includes QFI in extension header */
106
         ogs_pfcp_pdr_associate_qer(cp2up_pdr, qos_flow->qer);
107
     }
108
+#endif
109
 }
110
 
111
 void smf_sess_delete_cp_up_data_forwarding(smf_sess_t *sess)
112
@@ -2415,8 +2441,10 @@
113
     } else if (sess->session.session_type == OGS_PDU_SESSION_TYPE_IPV4V6) {
114
         ul_pdr->outer_header_removal.description =
115
             OGS_PFCP_OUTER_HEADER_REMOVAL_GTPU_UDP_IP;
116
-    } else
117
+    } else {
118
+        ogs_error("Invalid session_type %d", sess->session.session_type);
119
         ogs_assert_if_reached();
120
+    }
121
 
122
     /* FAR */
123
     dl_far = ogs_pfcp_far_add(&sess->pfcp);
124
open5gs_2.7.2.4530.0e44.tar.xz/src/smf/n4-build.c -> open5gs_2.7.2.4531.1512.tar.xz/src/smf/n4-build.c Changed
17
 
1
@@ -489,13 +489,13 @@
2
                 if (qos_flow->dl_pdr) {
3
                     ogs_pfcp_build_update_pdr(
4
                             &req->update_pdrnum_of_update_pdr,
5
-                            num_of_update_pdr, qos_flow->dl_pdr);
6
+                            num_of_update_pdr, qos_flow->dl_pdr, modify_flags);
7
                     num_of_update_pdr++;
8
                 }
9
                 if (qos_flow->ul_pdr) {
10
                     ogs_pfcp_build_update_pdr(
11
                             &req->update_pdrnum_of_update_pdr,
12
-                            num_of_update_pdr, qos_flow->ul_pdr);
13
+                            num_of_update_pdr, qos_flow->ul_pdr, modify_flags);
14
                     num_of_update_pdr++;
15
                 }
16
                 if (qos_flow->urr) {
17
open5gs_2.7.2.4530.0e44.tar.xz/src/smf/npcf-handler.c -> open5gs_2.7.2.4531.1512.tar.xz/src/smf/npcf-handler.c Changed
18
 
1
@@ -521,9 +521,16 @@
2
             &dl_pdr->ue_ip_addr, &dl_pdr->ue_ip_addr_len));
3
     dl_pdr->ue_ip_addr.sd = OGS_PFCP_UE_IP_DST;
4
 
5
+#if 0
6
+    /* DEPRECATED:
7
+     *
8
+     * The UE IP Address is unnecessary in the PDI of the UL PDR
9
+     * because the PDR can be found using the TEID.
10
+     */
11
     ogs_assert(OGS_OK ==
12
         ogs_pfcp_paa_to_ue_ip_addr(&sess->paa,
13
             &ul_pdr->ue_ip_addr, &ul_pdr->ue_ip_addr_len));
14
+#endif
15
 
16
     if (sess->session.ipv4_framed_routes &&
17
         sess->pfcp_node->up_function_features.frrt) {
18
open5gs_2.7.2.4530.0e44.tar.xz/src/upf/gtp-path.c -> open5gs_2.7.2.4531.1512.tar.xz/src/upf/gtp-path.c Changed
11
 
1
@@ -450,8 +450,7 @@
2
                     continue;
3
 
4
                 /* Check if QFI */
5
-                if (header_desc.qos_flow_identifier &&
6
-                    pdr->qfi != header_desc.qos_flow_identifier)
7
+                if (pdr->qfi && pdr->qfi != header_desc.qos_flow_identifier)
8
                     continue;
9
 
10
                 /* Check if Rule List in PDR */
11