|
|
|
@ -21,8 +21,7 @@
|
|
|
|
|
|
|
|
|
|
#include <osmocom/core/sockaddr_str.h> |
|
|
|
|
#include <osmocom/pfcp/pfcp_endpoint.h> |
|
|
|
|
|
|
|
|
|
#include <osmocom/hnbgw/pfcp_cp_peer.h> |
|
|
|
|
#include <osmocom/pfcp/pfcp_cp_peer.h> |
|
|
|
|
|
|
|
|
|
#include <osmocom/hnbgw/hnbgw.h> |
|
|
|
|
#include <osmocom/hnbgw/context_map.h> |
|
|
|
@ -33,7 +32,7 @@ static void pfcp_set_msg_ctx(struct osmo_pfcp_endpoint *ep, struct osmo_pfcp_msg
|
|
|
|
|
struct hnb_gw *hnb_gw = ep->priv; |
|
|
|
|
|
|
|
|
|
if (!m->ctx.peer_fi) |
|
|
|
|
pfcp_cp_peer_set_msg_ctx(hnb_gw->pfcp.cp_peer, m); |
|
|
|
|
osmo_pfcp_cp_peer_set_msg_ctx(hnb_gw->pfcp.cp_peer, m); |
|
|
|
|
|
|
|
|
|
/* If this is a response to an earlier request, just take the msg context from the request message.
|
|
|
|
|
* In osmo-hnbgw, a session_fi always points at a ps_rab FSM. */ |
|
|
|
@ -131,12 +130,12 @@ int hnbgw_pfcp_init(struct hnb_gw *hnb_gw)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Associate with UPF */ |
|
|
|
|
hnb_gw->pfcp.cp_peer = pfcp_cp_peer_alloc(hnb_gw, ep, &upf_addr); |
|
|
|
|
hnb_gw->pfcp.cp_peer = osmo_pfcp_cp_peer_alloc(hnb_gw, ep, &upf_addr); |
|
|
|
|
if (!hnb_gw->pfcp.cp_peer) { |
|
|
|
|
LOGP(DUPF, LOGL_ERROR, "Cannot allocate PFCP CP Peer FSM\n"); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
if (pfcp_cp_peer_associate(hnb_gw->pfcp.cp_peer)) { |
|
|
|
|
if (osmo_pfcp_cp_peer_associate(hnb_gw->pfcp.cp_peer)) { |
|
|
|
|
LOGP(DUPF, LOGL_ERROR, "Cannot start PFCP CP Peer FSM\n"); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|