apply new ogslib interface

This commit is contained in:
Sukchan Lee 2019-05-30 19:58:27 +09:00
parent 3da632dd1e
commit 338f359285
11 changed files with 90 additions and 108 deletions

View File

@ -36,7 +36,7 @@ int gtp_node_final(void)
return OGS_OK;
}
gtp_node_t *gtp_create_node(
gtp_node_t *gtp_node_new(
ogs_sockaddr_t *all_list, int no_ipv4, int no_ipv6, int prefer_ipv4)
{
int rv;
@ -82,7 +82,7 @@ gtp_node_t *gtp_create_node(
return node;
}
int gtp_delete_node(gtp_node_t *node)
void gtp_node_free(gtp_node_t *node)
{
ogs_assert(node);
@ -93,11 +93,9 @@ int gtp_delete_node(gtp_node_t *node)
ogs_freeaddrinfo(node->sa_list);
ogs_pool_free(&pool, node);
return OGS_OK;
}
gtp_node_t *gtp_add_node(ogs_list_t *list, gtp_f_teid_t *f_teid,
gtp_node_t *gtp_node_add(ogs_list_t *list, gtp_f_teid_t *f_teid,
uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4)
{
int rv;
@ -111,13 +109,13 @@ gtp_node_t *gtp_add_node(ogs_list_t *list, gtp_f_teid_t *f_teid,
rv = gtp_f_teid_to_sockaddr(f_teid, port, &sa_list);
ogs_assert(rv == OGS_OK);
node = gtp_create_node(sa_list, no_ipv4, no_ipv6, prefer_ipv4);
node = gtp_node_new(sa_list, no_ipv4, no_ipv6, prefer_ipv4);
ogs_list_add(list, node);
rv = gtp_f_teid_to_ip(f_teid, &node->ip);
ogs_assert(rv == OGS_OK);
rv = ogs_sock_fill_scope_id_in_local(node->sa_list);
rv = ogs_socknode_fill_scope_id_in_local(node->sa_list);
ogs_assert(rv == OGS_OK);
ogs_freeaddrinfo(sa_list);
@ -125,30 +123,24 @@ gtp_node_t *gtp_add_node(ogs_list_t *list, gtp_f_teid_t *f_teid,
return node;
}
int gtp_remove_node(ogs_list_t *list, gtp_node_t *node)
void gtp_node_remove(ogs_list_t *list, gtp_node_t *node)
{
int rv;
ogs_assert(node);
ogs_list_remove(list, node);
rv = gtp_delete_node(node);
ogs_assert(rv == OGS_OK);
return rv;
gtp_node_free(node);
}
int gtp_remove_all_nodes(ogs_list_t *list)
void gtp_node_remove_all(ogs_list_t *list)
{
gtp_node_t *node = NULL, *next_node = NULL;
ogs_list_for_each_safe(list, next_node, node)
gtp_remove_node(list, node);
return OGS_OK;
gtp_node_remove(list, node);
}
gtp_node_t *gtp_find_node(ogs_list_t *list, gtp_f_teid_t *f_teid)
gtp_node_t *gtp_node_find(ogs_list_t *list, gtp_f_teid_t *f_teid)
{
int rv;
gtp_node_t *node = NULL;

View File

@ -52,17 +52,17 @@ typedef struct gtp_node_s {
int gtp_node_init(void);
int gtp_node_final(void);
gtp_node_t *gtp_create_node(
gtp_node_t *gtp_node_new(
ogs_sockaddr_t *all_list, int no_ipv4, int no_ipv6, int prefer_ipv4);
int gtp_delete_node(gtp_node_t *node);
void gtp_node_free(gtp_node_t *node);
gtp_node_t *gtp_add_node(
gtp_node_t *gtp_node_add(
ogs_list_t *list, gtp_f_teid_t *f_teid,
uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4);
int gtp_remove_node(ogs_list_t *list, gtp_node_t *node);
int gtp_remove_all_nodes(ogs_list_t *list);
void gtp_node_remove(ogs_list_t *list, gtp_node_t *node);
void gtp_node_remove_all(ogs_list_t *list);
gtp_node_t *gtp_find_node(ogs_list_t *list, gtp_f_teid_t *f_teid);
gtp_node_t *gtp_node_find(ogs_list_t *list, gtp_f_teid_t *f_teid);
#ifdef __cplusplus
}

@ -1 +1 @@
Subproject commit 524af14708debad9be486bcfac62c8d1e719ebd5
Subproject commit 814d1871dabd6215c582c06dbea076344c21a0c9

View File

@ -121,10 +121,10 @@ void mme_context_final()
gtp_node_final();
ogs_sock_remove_all_nodes(&self.s1ap_list);
ogs_sock_remove_all_nodes(&self.s1ap_list6);
ogs_sock_remove_all_nodes(&self.gtpc_list);
ogs_sock_remove_all_nodes(&self.gtpc_list6);
ogs_socknode_remove_all(&self.s1ap_list);
ogs_socknode_remove_all(&self.s1ap_list6);
ogs_socknode_remove_all(&self.gtpc_list);
ogs_socknode_remove_all(&self.gtpc_list6);
context_initialized = 0;
}
@ -483,11 +483,11 @@ int mme_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.s1ap_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.s1ap_list6, AF_INET6, addr);
ogs_assert(rv == OGS_OK);
@ -495,7 +495,7 @@ int mme_context_parse_config()
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.s1ap_list,
context_self()->config.parameter.no_ipv6 ?
@ -509,7 +509,7 @@ int mme_context_parse_config()
if (ogs_list_first(&self.s1ap_list) == NULL &&
ogs_list_first(&self.s1ap_list6) == NULL) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.s1ap_list,
context_self()->config.parameter.no_ipv6 ?
@ -598,18 +598,18 @@ int mme_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list6, AF_INET6, addr);
ogs_freeaddrinfo(addr);
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -622,7 +622,7 @@ int mme_context_parse_config()
if (ogs_list_first(&self.gtpc_list) == NULL &&
ogs_list_first(&self.gtpc_list6) == NULL) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -1300,25 +1300,20 @@ mme_sgw_t *mme_sgw_add(
ogs_assert(sgw);
memset(sgw, 0, sizeof *sgw);
sgw->gnode = gtp_create_node(all_list, no_ipv4, no_ipv6, prefer_ipv4);
sgw->gnode = gtp_node_new(all_list, no_ipv4, no_ipv6, prefer_ipv4);
ogs_list_add(&self.sgw_list, sgw);
return sgw;
}
int mme_sgw_remove(mme_sgw_t *sgw)
void mme_sgw_remove(mme_sgw_t *sgw)
{
int rv;
ogs_assert(sgw);
ogs_list_remove(&self.sgw_list, sgw);
rv = gtp_delete_node(sgw->gnode);
ogs_assert(rv == OGS_OK);
gtp_node_free(sgw->gnode);
ogs_pool_free(&mme_sgw_pool, sgw);
return OGS_OK;
}
void mme_sgw_remove_all()
@ -1339,25 +1334,20 @@ mme_pgw_t *mme_pgw_add(
ogs_pool_alloc(&mme_pgw_pool, &pgw);
ogs_assert(pgw);
pgw->gnode = gtp_create_node(all_list, no_ipv4, no_ipv6, prefer_ipv4);
pgw->gnode = gtp_node_new(all_list, no_ipv4, no_ipv6, prefer_ipv4);
ogs_list_add(&self.pgw_list, pgw);
return pgw;
}
int mme_pgw_remove(mme_pgw_t *pgw)
void mme_pgw_remove(mme_pgw_t *pgw)
{
int rv;
ogs_assert(pgw);
ogs_list_remove(&self.pgw_list, pgw);
rv = gtp_delete_node(pgw->gnode);
ogs_assert(rv == OGS_OK);
gtp_node_free(pgw->gnode);
ogs_pool_free(&mme_pgw_pool, pgw);
return OGS_OK;
}
void mme_pgw_remove_all()

View File

@ -508,12 +508,12 @@ int mme_context_parse_config(void);
mme_sgw_t *mme_sgw_add(
ogs_sockaddr_t *all_list, int no_ipv4, int no_ipv6, int prefer_ipv4);
int mme_sgw_remove(mme_sgw_t *sgw);
void mme_sgw_remove(mme_sgw_t *sgw);
void mme_sgw_remove_all();
mme_pgw_t *mme_pgw_add(
ogs_sockaddr_t *all_list, int no_ipv4, int no_ipv6, int prefer_ipv4);
int mme_pgw_remove(mme_pgw_t *pgw);
void mme_pgw_remove(mme_pgw_t *pgw);
void mme_pgw_remove_all();
ogs_sockaddr_t *mme_pgw_addr_find_by_apn(
ogs_list_t *list, int family, char *apn);

View File

@ -83,14 +83,14 @@ void pgw_context_final()
ogs_pool_final(&pgw_dev_pool);
ogs_pool_final(&pgw_subnet_pool);
gtp_remove_all_nodes(&self.sgw_s5c_list);
gtp_remove_all_nodes(&self.sgw_s5u_list);
gtp_node_remove_all(&self.sgw_s5c_list);
gtp_node_remove_all(&self.sgw_s5u_list);
gtp_node_final();
ogs_sock_remove_all_nodes(&self.gtpc_list);
ogs_sock_remove_all_nodes(&self.gtpc_list6);
ogs_sock_remove_all_nodes(&self.gtpu_list);
ogs_sock_remove_all_nodes(&self.gtpu_list6);
ogs_socknode_remove_all(&self.gtpc_list);
ogs_socknode_remove_all(&self.gtpc_list6);
ogs_socknode_remove_all(&self.gtpu_list);
ogs_socknode_remove_all(&self.gtpu_list6);
context_initiaized = 0;
}
@ -389,18 +389,18 @@ int pgw_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list6, AF_INET6, addr);
ogs_freeaddrinfo(addr);
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -414,7 +414,7 @@ int pgw_context_parse_config()
if (ogs_list_first(&self.gtpc_list) == NULL &&
ogs_list_first(&self.gtpc_list6) == NULL) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -503,18 +503,18 @@ int pgw_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpu_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpu_list6, AF_INET6, addr);
ogs_freeaddrinfo(addr);
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpu_list,
context_self()->config.parameter.no_ipv6 ?
@ -528,7 +528,7 @@ int pgw_context_parse_config()
if (ogs_list_first(&self.gtpu_list) == NULL &&
ogs_list_first(&self.gtpu_list6) == NULL) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpu_list,
context_self()->config.parameter.no_ipv6 ?
@ -840,9 +840,9 @@ gtp_node_t *pgw_sgw_add_by_message(gtp_message_t *message)
sgw_s5c_teid = req->sender_f_teid_for_control_plane.data;
ogs_assert(sgw_s5c_teid);
sgw = gtp_find_node(&pgw_self()->sgw_s5c_list, sgw_s5c_teid);
sgw = gtp_node_find(&pgw_self()->sgw_s5c_list, sgw_s5c_teid);
if (!sgw) {
sgw = gtp_add_node(&pgw_self()->sgw_s5c_list, sgw_s5c_teid,
sgw = gtp_node_add(&pgw_self()->sgw_s5c_list, sgw_s5c_teid,
pgw_self()->gtpc_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,

View File

@ -78,10 +78,10 @@ void pgw_s5c_handle_create_session_request(
ogs_debug(" SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]",
bearer->sgw_s5u_teid, bearer->pgw_s5u_teid);
sgw = gtp_find_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid);
sgw = gtp_node_find(&pgw_self()->sgw_s5u_list, sgw_s5u_teid);
if (!sgw)
{
sgw = gtp_add_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid,
sgw = gtp_node_add(&pgw_self()->sgw_s5u_list, sgw_s5u_teid,
pgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -183,10 +183,10 @@ void pgw_s5c_handle_create_bearer_response(
/* Data Plane(DL) : SGW-S5U */
sgw_s5u_teid = req->bearer_contexts.s5_s8_u_sgw_f_teid.data;
bearer->sgw_s5u_teid = ntohl(sgw_s5u_teid->teid);
sgw = gtp_find_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid);
sgw = gtp_node_find(&pgw_self()->sgw_s5u_list, sgw_s5u_teid);
if (!sgw)
{
sgw = gtp_add_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid,
sgw = gtp_node_add(&pgw_self()->sgw_s5u_list, sgw_s5u_teid,
pgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,

View File

@ -64,16 +64,16 @@ void sgw_context_final()
ogs_pool_final(&sgw_sess_pool);
ogs_pool_final(&sgw_ue_pool);
gtp_remove_all_nodes(&self.mme_s11_list);
gtp_remove_all_nodes(&self.pgw_s5c_list);
gtp_remove_all_nodes(&self.enb_s1u_list);
gtp_remove_all_nodes(&self.pgw_s5u_list);
gtp_node_remove_all(&self.mme_s11_list);
gtp_node_remove_all(&self.pgw_s5c_list);
gtp_node_remove_all(&self.enb_s1u_list);
gtp_node_remove_all(&self.pgw_s5u_list);
gtp_node_final();
ogs_sock_remove_all_nodes(&self.gtpc_list);
ogs_sock_remove_all_nodes(&self.gtpc_list6);
ogs_sock_remove_all_nodes(&self.gtpu_list);
ogs_sock_remove_all_nodes(&self.gtpu_list6);
ogs_socknode_remove_all(&self.gtpc_list);
ogs_socknode_remove_all(&self.gtpc_list6);
ogs_socknode_remove_all(&self.gtpu_list);
ogs_socknode_remove_all(&self.gtpu_list6);
context_initialized = 0;
}
@ -217,18 +217,18 @@ int sgw_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpc_list6, AF_INET6, addr);
ogs_freeaddrinfo(addr);
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -242,7 +242,7 @@ int sgw_context_parse_config()
if (ogs_list_empty(&self.gtpc_list) &&
ogs_list_empty(&self.gtpc_list6)) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpc_list,
context_self()->config.parameter.no_ipv6 ?
@ -331,18 +331,18 @@ int sgw_context_parse_config()
if (addr) {
if (context_self()->config.parameter.no_ipv4 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpu_list, AF_INET, addr);
if (context_self()->config.parameter.no_ipv6 == 0)
ogs_sock_add_node(
ogs_socknode_add(
&self.gtpu_list6, AF_INET6, addr);
ogs_freeaddrinfo(addr);
}
if (dev) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpu_list,
context_self()->config.parameter.no_ipv6 ?
@ -356,7 +356,7 @@ int sgw_context_parse_config()
if (ogs_list_empty(&self.gtpu_list) &&
ogs_list_empty(&self.gtpu_list6)) {
rv = ogs_sock_probe_node(
rv = ogs_socknode_probe(
context_self()->config.parameter.no_ipv4 ?
NULL : &self.gtpu_list,
context_self()->config.parameter.no_ipv6 ?
@ -391,9 +391,9 @@ gtp_node_t *sgw_mme_add_by_message(gtp_message_t *message)
mme_s11_teid = req->sender_f_teid_for_control_plane.data;
ogs_assert(mme_s11_teid);
mme = gtp_find_node(&sgw_self()->mme_s11_list, mme_s11_teid);
mme = gtp_node_find(&sgw_self()->mme_s11_list, mme_s11_teid);
if (!mme) {
mme = gtp_add_node(&sgw_self()->mme_s11_list, mme_s11_teid,
mme = gtp_node_add(&sgw_self()->mme_s11_list, mme_s11_teid,
sgw_self()->gtpc_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,

View File

@ -112,10 +112,10 @@ void sgw_s11_handle_create_session_request(
pgw_s5c_teid = req->pgw_s5_s8_address_for_control_plane_or_pmip.data;
ogs_assert(pgw_s5c_teid);
pgw = gtp_find_node(&sgw_self()->pgw_s5c_list, pgw_s5c_teid);
pgw = gtp_node_find(&sgw_self()->pgw_s5c_list, pgw_s5c_teid);
if (!pgw)
{
pgw = gtp_add_node(&sgw_self()->pgw_s5c_list, pgw_s5c_teid,
pgw = gtp_node_add(&sgw_self()->pgw_s5c_list, pgw_s5c_teid,
sgw_self()->gtpc_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -219,10 +219,10 @@ void sgw_s11_handle_modify_bearer_request(gtp_xact_t *s11_xact,
ogs_debug(" ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]",
s1u_tunnel->remote_teid, s1u_tunnel->local_teid);
enb = gtp_find_node(&sgw_self()->enb_s1u_list, enb_s1u_teid);
enb = gtp_node_find(&sgw_self()->enb_s1u_list, enb_s1u_teid);
if (!enb)
{
enb = gtp_add_node(&sgw_self()->enb_s1u_list, enb_s1u_teid,
enb = gtp_node_add(&sgw_self()->enb_s1u_list, enb_s1u_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -450,10 +450,10 @@ void sgw_s11_handle_create_bearer_response(gtp_xact_t *s11_xact,
ogs_debug(" SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]",
s5u_tunnel->local_teid, s5u_tunnel->remote_teid);
enb = gtp_find_node(&sgw_self()->enb_s1u_list, enb_s1u_teid);
enb = gtp_node_find(&sgw_self()->enb_s1u_list, enb_s1u_teid);
if (!enb)
{
enb = gtp_add_node(&sgw_self()->enb_s1u_list, enb_s1u_teid,
enb = gtp_node_add(&sgw_self()->enb_s1u_list, enb_s1u_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -818,10 +818,10 @@ void sgw_s11_handle_create_indirect_data_forwarding_tunnel_request(
ogs_assert(tunnel);
tunnel->remote_teid = ntohl(req_teid->teid);
enb = gtp_find_node(&sgw_self()->enb_s1u_list, req_teid);
enb = gtp_node_find(&sgw_self()->enb_s1u_list, req_teid);
if (!enb)
{
enb = gtp_add_node(&sgw_self()->enb_s1u_list, req_teid,
enb = gtp_node_add(&sgw_self()->enb_s1u_list, req_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -859,10 +859,10 @@ void sgw_s11_handle_create_indirect_data_forwarding_tunnel_request(
ogs_assert(tunnel);
tunnel->remote_teid = ntohl(req_teid->teid);
enb = gtp_find_node(&sgw_self()->enb_s1u_list, req_teid);
enb = gtp_node_find(&sgw_self()->enb_s1u_list, req_teid);
if (!enb)
{
enb = gtp_add_node(&sgw_self()->enb_s1u_list, req_teid,
enb = gtp_node_add(&sgw_self()->enb_s1u_list, req_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,

View File

@ -90,10 +90,10 @@ void sgw_s5c_handle_create_session_response(gtp_xact_t *s5c_xact,
ogs_debug(" SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]",
s5u_tunnel->local_teid, s5u_tunnel->remote_teid);
pgw = gtp_find_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid);
pgw = gtp_node_find(&sgw_self()->pgw_s5u_list, pgw_s5u_teid);
if (!pgw)
{
pgw = gtp_add_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid,
pgw = gtp_node_add(&sgw_self()->pgw_s5u_list, pgw_s5u_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,
@ -279,10 +279,10 @@ void sgw_s5c_handle_create_bearer_request(gtp_xact_t *s5c_xact,
pgw_s5u_teid = req->bearer_contexts.s5_s8_u_sgw_f_teid.data;
ogs_assert(pgw_s5u_teid);
s5u_tunnel->remote_teid = ntohl(pgw_s5u_teid->teid);
pgw = gtp_find_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid);
pgw = gtp_node_find(&sgw_self()->pgw_s5u_list, pgw_s5u_teid);
if (!pgw)
{
pgw = gtp_add_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid,
pgw = gtp_node_add(&sgw_self()->pgw_s5u_list, pgw_s5u_teid,
sgw_self()->gtpu_port,
context_self()->config.parameter.no_ipv4,
context_self()->config.parameter.no_ipv6,

View File

@ -158,7 +158,7 @@ int testenb_gtpu_send(ogs_sock_t *sock, ogs_pkbuf_t *sendbuf)
else
memcpy(sgw.sin6.sin6_addr.s6_addr,
bearer->sgw_s1u_ip.addr6, IPV6_LEN);
rv = ogs_sock_fill_scope_id_in_local(&sgw);
rv = ogs_socknode_fill_scope_id_in_local(&sgw);
ogs_assert(rv == OGS_OK);
}
else