diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c
index 25304d9..674fc50 100644
--- a/src/osmo-hnbgw/context_map_rua.c
+++ b/src/osmo-hnbgw/context_map_rua.c
@@ -19,16 +19,23 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
+#include "config.h"
#include
#include
#include
+#if ENABLE_PFCP
+#include
+#endif
+
+#include
#include
#include
#include
#include
+#include
enum map_rua_fsm_state {
MAP_RUA_ST_INIT,
@@ -142,7 +149,7 @@ static int handle_rx_rua(struct hnbgw_context_map *map, struct msgb *ranap_msg)
}
}
#if ENABLE_PFCP
- } else if (hnb_gw_is_gtp_mapping_enabled(map->hnb_gw)) {
+ } else if (hnb_gw_is_gtp_mapping_enabled(map->gw)) {
/* map->is_ps == true and PFCP is enabled in osmo-hnbgw.cfg */
ranap_message *message = talloc_zero(OTC_SELECT, ranap_message);
rc = ranap_cn_rx_co_decode2(message, msgb_l2(ranap_msg), msgb_l2len(ranap_msg));
diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c
index 3042636..9245ed5 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -20,6 +20,8 @@
* along with this program. If not, see .
*/
+#include "config.h"
+
#include
#include
@@ -27,10 +29,15 @@
#include
+#if ENABLE_PFCP
+#include
+#endif
+
#include
#include
#include
#include
+#include
enum map_sccp_fsm_state {
MAP_SCCP_ST_INIT,
@@ -198,7 +205,6 @@ static int handle_rx_sccp(struct osmo_fsm_inst *fi, struct msgb *ranap_msg)
#if ENABLE_PFCP
} else {
ranap_message *message;
- struct hnb_gw *hnb_gw = cnlink->gw;
/* Packet-Switched. Set up mapping of GTP ports via UPF */
message = talloc_zero(OTC_SELECT, ranap_message);
rc = ranap_ran_rx_co_decode(message, message, msgb_l2(ranap_msg), msgb_l2len(ranap_msg));
@@ -211,10 +217,10 @@ static int handle_rx_sccp(struct osmo_fsm_inst *fi, struct msgb *ranap_msg)
case RANAP_ProcedureCode_id_RAB_Assignment:
/* If a UPF is configured, handle the RAB Assignment via ps_rab_ass_fsm, and replace the
* GTP F-TEIDs in the RAB Assignment message before passing it on to RUA. */
- if (hnb_gw_is_gtp_mapping_enabled(hnb_gw)) {
+ if (hnb_gw_is_gtp_mapping_enabled(map->gw)) {
LOGP(DMAIN, LOGL_DEBUG,
"RAB Assignment: setting up GTP tunnel mapping via UPF %s\n",
- osmo_sockaddr_to_str_c(OTC_SELECT, &hnb_gw->pfcp.cp_peer->remote_addr));
+ osmo_sockaddr_to_str_c(OTC_SELECT, &map->gw->pfcp.cp_peer->remote_addr));
return hnbgw_gtpmap_rx_rab_ass_req(map, ranap_msg, message);
}
/* If no UPF is configured, directly forward the message as-is (no GTP mapping). */
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 856bf79..e2dccf9 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -31,21 +31,11 @@
#include
#include
-#if ENABLE_PFCP
-#include
-#endif
-
#include
#include
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
/***********************************************************************
* Outbound RANAP RESET to CN
diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c
index db7fdbb..83410b9 100644
--- a/src/osmo-hnbgw/hnbgw_rua.c
+++ b/src/osmo-hnbgw/hnbgw_rua.c
@@ -39,11 +39,6 @@
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
static const char *cn_domain_indicator_to_str(RUA_CN_DomainIndicator_t cN_DomainIndicator)
{