Changes of Revision 710

open5gs_2.7.1.30.1111b.202405302026.dsc Deleted
x
 
1
@@ -1,39 +0,0 @@
2
-Format: 3.0 (native)
3
-Source: open5gs
4
-Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
5
-Architecture: any
6
-Version: 2.7.1.30.1111b.202405302026
7
-Maintainer: Harald Welte <laforge@gnumonks.org>
8
-Uploaders: Sukchan Lee <acetcom@gmail.com>
9
-Homepage: https://open5gs.org
10
-Standards-Version: 4.3.0
11
-Vcs-Browser: https://github.com/open5gs/open5gs
12
-Vcs-Git: git://github.com/open5gs/open5gs
13
-Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
-Package-List:
15
- open5gs deb net optional arch=any
16
- open5gs-amf deb net optional arch=any
17
- open5gs-ausf deb net optional arch=any
18
- open5gs-bsf deb net optional arch=any
19
- open5gs-common deb net optional arch=any
20
- open5gs-dbg deb net optional arch=any
21
- open5gs-hss deb net optional arch=any
22
- open5gs-mme deb net optional arch=any
23
- open5gs-nrf deb net optional arch=any
24
- open5gs-nssf deb net optional arch=any
25
- open5gs-pcf deb net optional arch=any
26
- open5gs-pcrf deb net optional arch=any
27
- open5gs-scp deb net optional arch=any
28
- open5gs-sepp deb net optional arch=any
29
- open5gs-sgwc deb net optional arch=any
30
- open5gs-sgwu deb net optional arch=any
31
- open5gs-smf deb net optional arch=any
32
- open5gs-udm deb net optional arch=any
33
- open5gs-udr deb net optional arch=any
34
- open5gs-upf deb net optional arch=any
35
-Checksums-Sha1:
36
- d60b0555d5f044880d4e38158c8e987182612f18 14495156 open5gs_2.7.1.30.1111b.202405302026.tar.xz
37
-Checksums-Sha256:
38
- ab68e182799832b14b5094e936dc6eb5fccddbc7ded59bd53b641ebe2e696cd7 14495156 open5gs_2.7.1.30.1111b.202405302026.tar.xz
39
-Files:
40
- 7741c5a224c966090f74b0b21357db3b 14495156 open5gs_2.7.1.30.1111b.202405302026.tar.xz
41
open5gs_2.7.1.31.53a6.202405312026.dsc Added
41
 
1
@@ -0,0 +1,39 @@
2
+Format: 3.0 (native)
3
+Source: open5gs
4
+Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
5
+Architecture: any
6
+Version: 2.7.1.31.53a6.202405312026
7
+Maintainer: Harald Welte <laforge@gnumonks.org>
8
+Uploaders: Sukchan Lee <acetcom@gmail.com>
9
+Homepage: https://open5gs.org
10
+Standards-Version: 4.3.0
11
+Vcs-Browser: https://github.com/open5gs/open5gs
12
+Vcs-Git: git://github.com/open5gs/open5gs
13
+Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
+Package-List:
15
+ open5gs deb net optional arch=any
16
+ open5gs-amf deb net optional arch=any
17
+ open5gs-ausf deb net optional arch=any
18
+ open5gs-bsf deb net optional arch=any
19
+ open5gs-common deb net optional arch=any
20
+ open5gs-dbg deb net optional arch=any
21
+ open5gs-hss deb net optional arch=any
22
+ open5gs-mme deb net optional arch=any
23
+ open5gs-nrf deb net optional arch=any
24
+ open5gs-nssf deb net optional arch=any
25
+ open5gs-pcf deb net optional arch=any
26
+ open5gs-pcrf deb net optional arch=any
27
+ open5gs-scp deb net optional arch=any
28
+ open5gs-sepp deb net optional arch=any
29
+ open5gs-sgwc deb net optional arch=any
30
+ open5gs-sgwu deb net optional arch=any
31
+ open5gs-smf deb net optional arch=any
32
+ open5gs-udm deb net optional arch=any
33
+ open5gs-udr deb net optional arch=any
34
+ open5gs-upf deb net optional arch=any
35
+Checksums-Sha1:
36
+ a97012cf9e439b68a15fb8ceede937df50b36760 14496312 open5gs_2.7.1.31.53a6.202405312026.tar.xz
37
+Checksums-Sha256:
38
+ c08b7cf43888f84e9b1156a6ba7a9d78bbc34b2e00d218a37e30377fa9ec3394 14496312 open5gs_2.7.1.31.53a6.202405312026.tar.xz
39
+Files:
40
+ f3ccd0165afa292c48f0ef5af3b32ac0 14496312 open5gs_2.7.1.31.53a6.202405312026.tar.xz
41
open5gs_2.7.1.30.1111b.202405302026.tar.xz/.tarball-version -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-2.7.1.30-1111b.202405302026
3
+2.7.1.31-53a6.202405312026
4
open5gs_2.7.1.30.1111b.202405302026.tar.xz/debian/changelog -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-open5gs (2.7.1.30.1111b.202405302026) unstable; urgency=medium
3
+open5gs (2.7.1.31.53a6.202405312026) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom nightly feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Thu, 30 May 2024 20:27:41 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Fri, 31 May 2024 20:27:41 +0000
9
 
10
 open5gs (2.7.1) unstable; urgency=medium
11
 
12
open5gs_2.7.1.30.1111b.202405302026.tar.xz/lib/gtp/xact.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/lib/gtp/xact.c Changed
22
 
1
@@ -803,6 +803,20 @@
2
                 xact->step, xact->seqxact->step-1.type,
3
                 OGS_ADDR(&xact->gnode->addr, buf),
4
                 OGS_PORT(&xact->gnode->addr));
5
+        /*
6
+         * Even for remotely created transactions, there are things
7
+         * that need to be done, such as returning memory
8
+         * when the transaction is deleted after a holding timeout.
9
+         * We added a Callback Function for that purpose.
10
+         *
11
+         * You can set it up and use it as follows.
12
+         *
13
+         *   xact->cb = gtp_remote_holding_timeout;
14
+         *   xact->data = bearer;
15
+         */
16
+        if (xact->cb)
17
+            xact->cb(xact, xact->data);
18
+
19
         ogs_gtp_xact_delete(xact);
20
     }
21
 }
22
open5gs_2.7.1.30.1111b.202405302026.tar.xz/lib/gtp/xact.h -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/lib/gtp/xact.h Changed
28
 
1
@@ -58,6 +58,26 @@
2
  */
3
 typedef struct ogs_gtp_xact_s {
4
     ogs_lnode_t     node;           /**< A node of list */
5
+
6
+    /*
7
+     * Issues #3240
8
+     *
9
+     * SMF->SGW-C->MME: First Update Bearer Request
10
+     * MME->UE:         First Modify EPS bearer context request
11
+     * SMF->SGW-C->MME: Second Update Bearer Request
12
+     * MME->UE:         Second Modify EPS bearer context request
13
+     * UE->MME:         First Modify EPS bearer context accept
14
+     * MME->SGW-C->SMF: First Update Bearer Response
15
+     * UE->MME:         Second Modify EPS bearer context accept
16
+     * MME->SGW-C->SMF: Second Update Bearer Response
17
+     *
18
+     * In the above situation, while NAS-ESM messages are exchanged
19
+     * between the MME and UE, the bearer may have multiple transactions
20
+     * that need to be managed. to_update_node is used as a node
21
+     * in the Transaction List related to Update Bearer Request/Response.
22
+     */
23
+    ogs_lnode_t     to_update_node;
24
+
25
     ogs_pool_id_t   index;
26
 
27
     uint8_t gtp_version;            /**< 1 or 2 */
28
open5gs_2.7.1.30.1111b.202405302026.tar.xz/src/mme/mme-context.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/src/mme/mme-context.c Changed
30
 
1
@@ -4149,6 +4149,8 @@
2
     ogs_assert(bearer);
3
     memset(bearer, 0, sizeof *bearer);
4
 
5
+    ogs_list_init(&bearer->update.xact_list);
6
+
7
     ogs_pool_alloc(&mme_ue->ebi_pool, &bearer->ebi_node);
8
     ogs_assert(bearer->ebi_node);
9
 
10
@@ -4176,6 +4178,7 @@
11
 void mme_bearer_remove(mme_bearer_t *bearer)
12
 {
13
     mme_event_t e;
14
+    ogs_gtp_xact_t *xact = NULL, *next_xact = NULL;
15
 
16
     ogs_assert(bearer);
17
     ogs_assert(bearer->mme_ue);
18
@@ -4195,6 +4198,11 @@
19
     if (bearer->ebi_node)
20
         ogs_pool_free(&bearer->mme_ue->ebi_pool, bearer->ebi_node);
21
 
22
+    ogs_list_for_each_entry_safe(&bearer->update.xact_list,
23
+            next_xact, xact, to_update_node) {
24
+        ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node);
25
+    }
26
+
27
     ogs_pool_free(&mme_bearer_pool, bearer);
28
 }
29
 
30
open5gs_2.7.1.30.1111b.202405302026.tar.xz/src/mme/mme-context.h -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/src/mme/mme-context.h Changed
30
 
1
@@ -873,9 +873,27 @@
2
     mme_ue_t        *mme_ue;
3
     mme_sess_t      *sess;
4
 
5
+    /*
6
+     * Issues #3240
7
+     *
8
+     * SMF->SGW-C->MME: First Update Bearer Request
9
+     * MME->UE:         First Modify EPS bearer context request
10
+     * SMF->SGW-C->MME: Second Update Bearer Request
11
+     * MME->UE:         Second Modify EPS bearer context request
12
+     * UE->MME:         First Modify EPS bearer context accept
13
+     * MME->SGW-C->SMF: First Update Bearer Response
14
+     * UE->MME:         Second Modify EPS bearer context accept
15
+     * MME->SGW-C->SMF: Second Update Bearer Response
16
+     *
17
+     * We'll start by managing only Update Bearer Request/Response
18
+     * as a list so that we can manage multiple of them.
19
+     */
20
     struct {
21
         ogs_gtp_xact_t  *xact;
22
-    } create, update, delete, notify;
23
+    } create, delete, notify;
24
+    struct {
25
+        ogs_list_t  xact_list;
26
+    } update;
27
 } mme_bearer_t;
28
 
29
 void mme_context_init(void);
30
open5gs_2.7.1.30.1111b.202405302026.tar.xz/src/mme/mme-gtp-path.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/src/mme/mme-gtp-path.c Changed
39
 
1
@@ -427,7 +427,7 @@
2
 {
3
     int rv;
4
 
5
-    ogs_gtp_xact_t *xact = NULL;
6
+    ogs_gtp_xact_t *xact = NULL, *next_xact = NULL;
7
     mme_ue_t *mme_ue = NULL;
8
     sgw_ue_t *sgw_ue = NULL;
9
 
10
@@ -439,7 +439,27 @@
11
     ogs_assert(mme_ue);
12
     sgw_ue = mme_ue->sgw_ue;
13
     ogs_assert(sgw_ue);
14
-    xact = ogs_gtp_xact_cycle(bearer->update.xact);
15
+
16
+    /*
17
+     * Issues #3240
18
+     *
19
+     * SMF->SGW-C->MME: First Update Bearer Request
20
+     * MME->UE:         First Modify EPS bearer context request
21
+     * SMF->SGW-C->MME: Second Update Bearer Request
22
+     * MME->UE:         Second Modify EPS bearer context request
23
+     * UE->MME:         First Modify EPS bearer context accept
24
+     * MME->SGW-C->SMF: First Update Bearer Response
25
+     * UE->MME:         Second Modify EPS bearer context accept
26
+     * MME->SGW-C->SMF: Second Update Bearer Response
27
+     *
28
+     * After sending the Update Bearer Response, remove the corresponding
29
+     * Transaction Node from the list managed by the Bearer Context.
30
+     */
31
+    ogs_list_for_each_entry_safe(
32
+            &bearer->update.xact_list, next_xact, xact, to_update_node) {
33
+        ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node);
34
+        break;
35
+    }
36
     if (!xact) {
37
         ogs_warn("GTP transaction(UPDATE) has already been removed");
38
         return OGS_OK;
39
open5gs_2.7.1.30.1111b.202405302026.tar.xz/src/mme/mme-path.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/src/mme/mme-path.c Changed
16
 
1
@@ -218,7 +218,13 @@
2
                 mme_gtp_send_update_bearer_response(
3
                     bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE));
4
         } else {
5
-            ogs_gtp_xact_t *xact = ogs_gtp_xact_cycle(bearer->update.xact);
6
+            ogs_gtp_xact_t *xact = NULL;
7
+
8
+            /* Get the first Entry */
9
+            ogs_list_for_each_entry(
10
+                    &bearer->update.xact_list, xact, to_update_node) {
11
+                break;
12
+            }
13
             if (!xact) {
14
                 ogs_error("No GTP xact");
15
                 goto cleanup;
16
open5gs_2.7.1.30.1111b.202405302026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/src/mme/mme-s11-handler.c Changed
133
 
1
@@ -59,6 +59,94 @@
2
     return OGS_NAS_ESM_CAUSE_NETWORK_FAILURE;
3
 }
4
 
5
+static void gtp_remote_holding_timeout(ogs_gtp_xact_t *xact, void *data)
6
+{
7
+    char bufOGS_ADDRSTRLEN;
8
+    mme_bearer_t *bearer = data;
9
+    uint8_t type;
10
+
11
+    ogs_assert(xact);
12
+    bearer = mme_bearer_cycle(bearer);
13
+    ogs_assert(bearer);
14
+
15
+    type = xact->seqxact->step-1.type;
16
+
17
+    ogs_warn("%d %s HOLDING TIMEOUT "
18
+            "for step %d type %d peer %s:%d",
19
+            xact->xid,
20
+            xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
21
+            xact->step, type,
22
+            OGS_ADDR(&xact->gnode->addr, buf),
23
+            OGS_PORT(&xact->gnode->addr));
24
+
25
+    /*
26
+     * Issues #3240
27
+     *
28
+     * SMF->SGW-C->MME: First Update Bearer Request
29
+     * MME->UE:         First Modify EPS bearer context request
30
+     * SMF->SGW-C->MME: Second Update Bearer Request
31
+     * MME->UE:         Second Modify EPS bearer context request
32
+     * UE->MME:         First Modify EPS bearer context accept
33
+     * MME->SGW-C->SMF: First Update Bearer Response
34
+     * UE->MME:         Second Modify EPS bearer context accept
35
+     * MME->SGW-C->SMF: Second Update Bearer Response
36
+     */
37
+    switch (type) {
38
+    case OGS_GTP2_UPDATE_BEARER_REQUEST_TYPE:
39
+        /*
40
+         * In this case, a timeout occurs while waiting
41
+         * for Modify EPS bearer context accept from UE.
42
+         *
43
+         * If the UE does not send a Modify EPS bearer context accept,
44
+         * the MME fails to send an Update Bearer Response.
45
+         *
46
+         * Therefore, we need to delete the Transaction Node
47
+         * that was managed by the Bearer Context from the List.
48
+         */
49
+        if (ogs_list_exists(
50
+                    &bearer->update.xact_list,
51
+                    &xact->to_update_node) == true) {
52
+            ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node);
53
+        } else {
54
+            ogs_error("%d %s HAVE ALREADY BEEN REMOVED "
55
+                    "for step %d type %d peer %s:%d",
56
+                    xact->xid,
57
+                    xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
58
+                    xact->step, type,
59
+                    OGS_ADDR(&xact->gnode->addr, buf),
60
+                    OGS_PORT(&xact->gnode->addr));
61
+        }
62
+        break;
63
+    case OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE:
64
+        /*
65
+         * The following is the case where the UE sends
66
+         * Modify EPS bearer context accept to the MME.
67
+         *
68
+         * In this case, the MME sends Update Bearer Response
69
+         * to SGW-C and deletes the Transaction Node.
70
+         *
71
+         * Therefore, there is no need to delete the Transaction Node
72
+         * from the list managed by the Bearer Context here.
73
+         */
74
+        if (ogs_list_exists(
75
+                    &bearer->update.xact_list,
76
+                    &xact->to_update_node) == true) {
77
+            ogs_error("%d %s SHOULD HAVE REMOVED "
78
+                    "for step %d type %d peer %s:%d",
79
+                    xact->xid,
80
+                    xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
81
+                    xact->step, type,
82
+                    OGS_ADDR(&xact->gnode->addr, buf),
83
+                    OGS_PORT(&xact->gnode->addr));
84
+        }
85
+        break;
86
+    default:
87
+        ogs_fatal("Unknown type%d", type);
88
+        ogs_assert_if_reached();
89
+        break;
90
+    }
91
+}
92
+
93
 void mme_s11_handle_echo_request(
94
         ogs_gtp_xact_t *xact, ogs_gtp2_echo_request_t *req)
95
 {
96
@@ -1045,13 +1133,31 @@
97
     }
98
 
99
     /*
100
-     * Save Transaction. It will be handled after EMM-attached
101
+     * Issues #3240
102
      *
103
-     * You should not remove OLD bearer->xact.
104
-     * If GTP-xact Holding timer is expired,
105
-     * OLD bearer->xact memory will be automatically removed.
106
+     * SMF->SGW-C->MME: First Update Bearer Request
107
+     * MME->UE:         First Modify EPS bearer context request
108
+     * SMF->SGW-C->MME: Second Update Bearer Request
109
+     * MME->UE:         Second Modify EPS bearer context request
110
+     * UE->MME:         First Modify EPS bearer context accept
111
+     * MME->SGW-C->SMF: First Update Bearer Response
112
+     * UE->MME:         Second Modify EPS bearer context accept
113
+     * MME->SGW-C->SMF: Second Update Bearer Response
114
+     *
115
+     * If the UE does not send a Modify EPS bearer context accept,
116
+     * the MME cannot send an Update Bearer Response to the SGW-C.
117
+     *
118
+     * In this case, REMOTE holding timeout occurs, and a callback function
119
+     * is registered as follows to free memory.
120
+     *
121
+     * Also, as shown above, multiple Update Bearer Request/Response can occur,
122
+     * so we manage the Transaction Node as a list within the Bearer Context.
123
      */
124
-    bearer->update.xact = xact;
125
+
126
+    xact->cb = gtp_remote_holding_timeout;
127
+    xact->data = bearer;
128
+
129
+    ogs_list_add(&bearer->update.xact_list, &xact->to_update_node);
130
 
131
     if (req->bearer_contexts.bearer_level_qos.presence == 1) {
132
         /* Bearer QoS */
133
open5gs_2.7.1.30.1111b.202405302026.tar.xz/tests/volte/rx-test.c -> open5gs_2.7.1.31.53a6.202405312026.tar.xz/tests/volte/rx-test.c Changed
201
 
1
@@ -3410,6 +3410,398 @@
2
 }
3
 #endif
4
 
5
+static void test_issues3240_func(abts_case *tc, void *data)
6
+{
7
+    int rv;
8
+    ogs_socknode_t *s1ap;
9
+    ogs_socknode_t *gtpu;
10
+    ogs_pkbuf_t *emmbuf;
11
+    ogs_pkbuf_t *esmbuf;
12
+    ogs_pkbuf_t *sendbuf;
13
+    ogs_pkbuf_t *recvbuf;
14
+    ogs_s1ap_message_t message;
15
+
16
+    uint8_t *rx_sid = NULL;
17
+
18
+    ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci;
19
+    test_ue_t *test_ue = NULL;
20
+    test_sess_t *sess = NULL;
21
+    test_bearer_t *bearer = NULL;
22
+
23
+    uint32_t enb_ue_s1ap_id;
24
+    uint64_t mme_ue_s1ap_id;
25
+
26
+    bson_t *doc = NULL;
27
+
28
+    /* Setup Test UE & Session Context */
29
+    memset(&mobile_identity_suci, 0, sizeof(mobile_identity_suci));
30
+
31
+    mobile_identity_suci.h.supi_format = OGS_NAS_5GS_SUPI_FORMAT_IMSI;
32
+    mobile_identity_suci.h.type = OGS_NAS_5GS_MOBILE_IDENTITY_SUCI;
33
+    mobile_identity_suci.routing_indicator1 = 0;
34
+    mobile_identity_suci.routing_indicator2 = 0xf;
35
+    mobile_identity_suci.routing_indicator3 = 0xf;
36
+    mobile_identity_suci.routing_indicator4 = 0xf;
37
+    mobile_identity_suci.protection_scheme_id = OGS_PROTECTION_SCHEME_NULL;
38
+    mobile_identity_suci.home_network_pki_value = 0;
39
+
40
+    test_ue = test_ue_add_by_suci(&mobile_identity_suci, "1032548691");
41
+    ogs_assert(test_ue);
42
+
43
+    test_ue->e_cgi.cell_id = 0x1079baf;
44
+    test_ue->nas.ksi = 0;
45
+    test_ue->nas.value = OGS_NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTACH;
46
+
47
+    test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
48
+    test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
49
+
50
+    sess = test_sess_add_by_apn(test_ue, "internet", OGS_GTP2_RAT_TYPE_EUTRAN);
51
+    ogs_assert(sess);
52
+
53
+    /* eNB connects to MME */
54
+    s1ap = tests1ap_client(AF_INET);
55
+    ABTS_PTR_NOTNULL(tc, s1ap);
56
+
57
+    /* eNB connects to SGW */
58
+    gtpu = test_gtpu_server(1, AF_INET);
59
+    ABTS_PTR_NOTNULL(tc, gtpu);
60
+
61
+    /* Send S1-Setup Reqeust */
62
+    sendbuf = test_s1ap_build_s1_setup_request(
63
+            S1AP_ENB_ID_PR_macroENB_ID, 0x54f64);
64
+    ABTS_PTR_NOTNULL(tc, sendbuf);
65
+    rv = testenb_s1ap_send(s1ap, sendbuf);
66
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
67
+
68
+    /* Receive S1-Setup Response */
69
+    recvbuf = testenb_s1ap_read(s1ap);
70
+    ABTS_PTR_NOTNULL(tc, recvbuf);
71
+    tests1ap_recv(NULL, recvbuf);
72
+
73
+    /********** Insert Subscriber in Database */
74
+    doc = test_db_new_ims(test_ue);
75
+    ABTS_PTR_NOTNULL(tc, doc);
76
+    ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc));
77
+
78
+    /* Send Attach Request */
79
+    memset(&sess->pdn_connectivity_param,
80
+            0, sizeof(sess->pdn_connectivity_param));
81
+    sess->pdn_connectivity_param.eit = 1;
82
+    sess->pdn_connectivity_param.request_type =
83
+        OGS_NAS_EPS_REQUEST_TYPE_INITIAL;
84
+    esmbuf = testesm_build_pdn_connectivity_request(
85
+            sess, false, OGS_NAS_EPS_PDN_TYPE_IPV4V6);
86
+    ABTS_PTR_NOTNULL(tc, esmbuf);
87
+
88
+    memset(&test_ue->attach_request_param,
89
+            0, sizeof(test_ue->attach_request_param));
90
+    test_ue->attach_request_param.drx_parameter = 1;
91
+    test_ue->attach_request_param.ms_network_capability = 1;
92
+    test_ue->attach_request_param.tmsi_status = 1;
93
+    test_ue->attach_request_param.mobile_station_classmark_2 = 1;
94
+    test_ue->attach_request_param.ue_usage_setting = 1;
95
+    emmbuf = testemm_build_attach_request(test_ue, esmbuf, true, false);
96
+    ABTS_PTR_NOTNULL(tc, emmbuf);
97
+
98
+    memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param));
99
+    sendbuf = test_s1ap_build_initial_ue_message(
100
+            test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false);
101
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
102
+    rv = testenb_s1ap_send(s1ap, sendbuf);
103
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
104
+
105
+    /* Receive Authentication Request */
106
+    recvbuf = testenb_s1ap_read(s1ap);
107
+    ABTS_PTR_NOTNULL(tc, recvbuf);
108
+    tests1ap_recv(test_ue, recvbuf);
109
+
110
+    /* Send Authentication response */
111
+    emmbuf = testemm_build_authentication_response(test_ue);
112
+    ABTS_PTR_NOTNULL(tc, emmbuf);
113
+    sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
114
+    ABTS_PTR_NOTNULL(tc, sendbuf);
115
+    rv = testenb_s1ap_send(s1ap, sendbuf);
116
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
117
+
118
+    /* Receive Security mode Command */
119
+    recvbuf = testenb_s1ap_read(s1ap);
120
+    ABTS_PTR_NOTNULL(tc, recvbuf);
121
+    tests1ap_recv(test_ue, recvbuf);
122
+
123
+    /* Send Security mode complete */
124
+    test_ue->mobile_identity_imeisv_presence = true;
125
+    emmbuf = testemm_build_security_mode_complete(test_ue);
126
+    ABTS_PTR_NOTNULL(tc, emmbuf);
127
+    sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
128
+    ABTS_PTR_NOTNULL(tc, sendbuf);
129
+    rv = testenb_s1ap_send(s1ap, sendbuf);
130
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
131
+
132
+    /* Receive ESM Information Request */
133
+    recvbuf = testenb_s1ap_read(s1ap);
134
+    ABTS_PTR_NOTNULL(tc, recvbuf);
135
+    tests1ap_recv(test_ue, recvbuf);
136
+
137
+    /* Send ESM Information Response */
138
+    sess->esm_information_param.pco = 1;
139
+    esmbuf = testesm_build_esm_information_response(sess);
140
+    ABTS_PTR_NOTNULL(tc, esmbuf);
141
+    sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
142
+    ABTS_PTR_NOTNULL(tc, sendbuf);
143
+    rv = testenb_s1ap_send(s1ap, sendbuf);
144
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
145
+
146
+    /* Receive InitialContextSetupRequest +
147
+     * Attach Accept +
148
+     * Activate Default Bearer Context Request */
149
+    recvbuf = testenb_s1ap_read(s1ap);
150
+    ABTS_PTR_NOTNULL(tc, recvbuf);
151
+    tests1ap_recv(test_ue, recvbuf);
152
+
153
+    /* Send UE Capability Info Indication */
154
+    sendbuf = tests1ap_build_ue_radio_capability_info_indication(test_ue);
155
+    ABTS_PTR_NOTNULL(tc, sendbuf);
156
+    rv = testenb_s1ap_send(s1ap, sendbuf);
157
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
158
+
159
+    /* Send InitialContextSetupResponse */
160
+    sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
161
+    ABTS_PTR_NOTNULL(tc, sendbuf);
162
+    rv = testenb_s1ap_send(s1ap, sendbuf);
163
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
164
+
165
+    /* Send Attach Complete + Activate default EPS bearer cotext accept */
166
+    test_ue->nr_cgi.cell_id = 0x1234502;
167
+    bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
168
+    ogs_assert(bearer);
169
+    esmbuf = testesm_build_activate_default_eps_bearer_context_accept(
170
+            bearer, false);
171
+    ABTS_PTR_NOTNULL(tc, esmbuf);
172
+    emmbuf = testemm_build_attach_complete(test_ue, esmbuf);
173
+    ABTS_PTR_NOTNULL(tc, emmbuf);
174
+    sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
175
+    ABTS_PTR_NOTNULL(tc, sendbuf);
176
+    rv = testenb_s1ap_send(s1ap, sendbuf);
177
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
178
+
179
+    /* Receive EMM information */
180
+    recvbuf = testenb_s1ap_read(s1ap);
181
+    ABTS_PTR_NOTNULL(tc, recvbuf);
182
+    tests1ap_recv(test_ue, recvbuf);
183
+
184
+    /* Send GTP-U ICMP Packet */
185
+    rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4);
186
+    ABTS_INT_EQUAL(tc, OGS_OK, rv);
187
+
188
+    /* Receive GTP-U ICMP Packet */
189
+    recvbuf = test_gtpu_read(gtpu);
190
+    ABTS_PTR_NOTNULL(tc, recvbuf);
191
+    ogs_pkbuf_free(recvbuf);
192
+
193
+    /* Send PDN Connectivity Request */
194
+    sess = test_sess_add_by_apn(test_ue, "ims", OGS_GTP2_RAT_TYPE_EUTRAN);
195
+    ogs_assert(sess);
196
+    sess->pti = 5;
197
+
198
+    sess->pdn_connectivity_param.apn = 1;
199
+    sess->pdn_connectivity_param.pco = 1;
200
+    sess->pdn_connectivity_param.request_type =
201