update it
This commit is contained in:
parent
8605b182aa
commit
1dba527be4
|
@ -81,7 +81,11 @@ sgw_sess_t *sgw_sess_add()
|
|||
index_alloc(&sgw_sess_pool, &sess);
|
||||
d_assert(sess, return NULL, "Null param");
|
||||
|
||||
sess->teid = sess->index; /* derived from an index */
|
||||
sess->sgw_s11_teid = sess->index; /* derived from an index */
|
||||
sess->sgw_s11_addr = sgw_self()->s11_addr;
|
||||
|
||||
sess->sgw_s5c_teid = sess->index; /* derived from an index */
|
||||
sess->sgw_s5c_addr = sgw_self()->s5c_addr;
|
||||
|
||||
list_append(&self.sess_list, sess);
|
||||
|
||||
|
|
|
@ -43,18 +43,18 @@ typedef struct _sgw_sess_t {
|
|||
index_t index; /**< An index of this node */
|
||||
|
||||
/* IMPORTANT!
|
||||
* SGW-S11-F-TEID, SGW-S5C-F-TEID is same with an index */
|
||||
c_uint32_t teid;
|
||||
|
||||
c_uint32_t mme_s11_addr; /* MME-S11-F-TEID IPv4 Address */
|
||||
* SGW-S11-F-TEID is same with an index */
|
||||
c_uint32_t sgw_s11_teid;
|
||||
c_uint32_t sgw_s11_addr;
|
||||
c_uint32_t mme_s11_teid; /* MME-S11-F-TEID */
|
||||
c_uint32_t pgw_s5c_addr; /* PGW-S5C-F-TEID IPv4 Address */
|
||||
c_uint32_t pgw_s5c_teid; /* PGW-S5C-F-TEID */
|
||||
c_uint32_t mme_s11_addr; /* MME-S11-F-TEID IPv4 Address */
|
||||
|
||||
c_uint32_t enb_s1u_addr; /* ENB-S1U-F-TEID IPv4 Address */
|
||||
c_uint32_t enb_s1u_teid; /* ENB-S1U-F-TEID */
|
||||
c_uint32_t pgw_s5u_addr; /* PGW-S5U-F-TEID IPv4 Address */
|
||||
c_uint32_t pgw_s5u_teid; /* PGW-S5U-F-TEID */
|
||||
/* IMPORTANT!
|
||||
* SGW-S5C-F-TEID is same with an index */
|
||||
c_uint32_t sgw_s5c_teid;
|
||||
c_uint32_t sgw_s5c_addr;
|
||||
c_uint32_t pgw_s5c_teid; /* PGW-S5C-F-TEID */
|
||||
c_uint32_t pgw_s5c_addr; /* PGW-S5C-F-TEID IPv4 Address */
|
||||
} sgw_sess_t;
|
||||
|
||||
CORE_DECLARE(status_t) sgw_context_init(void);
|
||||
|
|
|
@ -45,8 +45,8 @@ void sgw_handle_create_session_request(
|
|||
sess->mme_s11_teid = ntohl(f_teid->teid);
|
||||
sess->mme_s11_addr = f_teid->ipv4_addr;
|
||||
|
||||
f_teid->teid = htonl(sess->teid);
|
||||
f_teid->ipv4_addr = sgw_self()->s5c_addr;
|
||||
f_teid->teid = htonl(sess->sgw_s5c_teid);
|
||||
f_teid->ipv4_addr = sess->sgw_s5c_addr;
|
||||
f_teid->interface_type = GTP_F_TEID_S5_S8_SGW_GTP_C;
|
||||
|
||||
rv = gtp_build_msg(&pkbuf, type, gtp_message);
|
||||
|
@ -95,8 +95,8 @@ void sgw_handle_create_session_response(gtp_xact_t *xact,
|
|||
memset(&sgw_f_teid, 0, sizeof(gtp_f_teid_t));
|
||||
sgw_f_teid.ipv4 = 1;
|
||||
sgw_f_teid.interface_type = GTP_F_TEID_S11_S4_SGW_GTP_C;
|
||||
sgw_f_teid.ipv4_addr = sgw_self()->s11_addr;
|
||||
sgw_f_teid.teid = htonl(sess->teid);
|
||||
sgw_f_teid.ipv4_addr = sess->sgw_s11_addr;
|
||||
sgw_f_teid.teid = htonl(sess->sgw_s11_teid);
|
||||
|
||||
rsp->sender_f_teid_for_control_plane.presence = 1;
|
||||
rsp->sender_f_teid_for_control_plane.data = &sgw_f_teid;
|
||||
|
|
Loading…
Reference in New Issue