pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35153?usp=email )
Change subject: mgw_fsm: Assume IuUP HNB IP addr = Iuh during MGCP CRCX on RAN side
......................................................................
mgw_fsm: Assume IuUP HNB IP addr = Iuh during MGCP CRCX on RAN side
In general, the HNBs end up binding its IuUP/RTP streams to the same IP
address used for Iuh signalling.
When receiving a RAB-Ass-Req from CN, osmo-hnbgw creates an endpoint in
its co-located MGW and creates 2 MGCP conns on it, one facing the RAN
side and one facing the CN side. At that point, the remote CN IuUP IP address
is known (was include din the received RAB-Ass-Req), but the RAN one is
not yet known. Hence, the CRCX on the RAN-side conn contained no remote
IP address, which means MGW has to blindly guess a good local IP address
if "ip probing" is enabled.
As a result, when RAB-Ass-Resp comes back from the hNodeB containing the
allocated remote IuUP IP address and MGW is updated through MGCP MDCX,
it may happen that MGW rebinds to a better fitting local IP address and
returns it in MDCX. This has several downfalls:
1- We don't yet support updating the hNodeB about the changed IP address
(see mgw_fsm_mdcx_hnb). For that, we'd need to send a RAB-Modify-Req+Resp.
2- Even if we supported it, in the general case we'd be delaying call
establishment because an extra roundtrip is needed to update
RAB-Modify-Req+Resp.
In general, the HNBs end up binding its IuUP/RTP streams to the same IP
address used for the Iuh signalling. Hence, use this assumption to
announce the Iuh IP address as a remote IuUP IP address when
transmitting the MGCP CRCX at the RAN-side conn to the MGW. This way
the MGW can potentially select a proper local IuUP IP address from the
start, so no RAB-Modify-Req is required later on.
The logic to transmit RAB-Modify-Req is left unimplemented in this
commit and is left as a later improvement.
Related: SYS#6657
Change-Id: I87c514204603e0f15a55da9b619c7ce1e14f042e
T#
Change-Id: Icf43e3a1cde809d844f17ef2d0600efe64bc3dfe
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 63 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/53/35153/1
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index 7b4c811..5251374 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -26,6 +26,8 @@
#include <osmocom/core/logging.h>
#include <osmocom/core/sockaddr_str.h>
+#include <osmocom/netif/stream.h>
+
#include <osmocom/ranap/ranap_common.h>
#include <osmocom/ranap/ranap_common_cn.h>
#include <osmocom/ranap/ranap_common_ran.h>
@@ -132,6 +134,7 @@
{
struct mgw_fsm_priv *mgw_fsm_priv = fi->priv;
struct hnbgw_context_map *map = mgw_fsm_priv->map;
+ struct hnb_context *hnb_ctx = map->hnb_ctx;
struct osmo_sockaddr addr;
struct osmo_sockaddr_str addr_str;
RANAP_RAB_AssignmentRequestIEs_t *ies;
@@ -168,6 +171,21 @@
mgw_info.codecs[0] = CODEC_IUFP;
mgw_info.codecs_len = 1;
+ /* The HNB IuUP IP address & port is not yet known here (Rx RAB-Ass-Req Tx CRCX
(RAN) time):
+ * Assume and announce "remote IuUP IP address" == "remote Iuh signalling
IP address" to the MGW
+ * here, so that it can most probably select a proper IuUP local IP address to be used
from the
+ * start. In the event we receive a "remote IuUP IP address" != "remote
Iuh signalling IP address"
+ * later on during RAB-Ass-Resp, we'll update IP addr at the MGW through MDCX and if
MGW decides
+ * to use another IuUP local IP address as a result, it will be updated at the HNB
through
+ * RAB-Modify-Req. */
+ if (hnb_ctx && hnb_ctx->conn &&
+ (rc = osmo_stream_srv_get_fd(hnb_ctx->conn)) >= 0) {
+ if (osmo_sock_get_remote_ip(rc, mgw_info.addr, sizeof(mgw_info.addr)) < 0)
+ LOGPFSML(fi, LOGL_ERROR, "Invalid Iuh IP Address\n");
+ }
+ LOGPFSML(fi, LOGL_ERROR, "PESPIN: mgw_info.addr=%s\n", mgw_info.addr);
+ //mgw_info.port = 80;
+
mgw_fsm_priv->mgcpc = mgcp_client_pool_get(g_hnbgw->mgw_pool);
if (!mgw_fsm_priv->mgcpc) {
LOGPFSML(fi, LOGL_ERROR,
@@ -322,8 +340,7 @@
* normally. This is a situation we cannot recover from. */
LOGPFSML(fi, LOGL_ERROR, "Failed to extract RTP IP-address and Port from
RAB-AssignmentResponse\n");
osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0);
- return;
- }
+ return; }
rc = osmo_sockaddr_str_from_sockaddr(&addr_str, &addr.u.sas);
if (rc < 0) {
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35153?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Icf43e3a1cde809d844f17ef2d0600efe64bc3dfe
Gerrit-Change-Number: 35153
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange