diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-10-12 01:39:25 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-16 15:32:32 +0100 |
commit | 978e72e500ac5544ee9fbddbac03125f60fceef8 (patch) | |
tree | 4686c60996a1d3666e71487bee74cd37604c3a19 /openbsc/src/gprs | |
parent | 1ad6a2e515bbc3a73a283eb104feb899086a24a3 (diff) |
IuCS and IuPS: add VTY config for RAB Assignment address kind
To accomodate the ip.access nano3G without having to recompile, make the
RAB Assignment's Transport Layer Address IE's format configurable, in both
osmo-msc and osmo-sgsn.
The long term perspective is to somehow detect which address encoding a given
3G cell prefers, but for the time being just configure it globally and set each
ue_conn_ctx to the global setting upon creation.
Add VTY command to iu_vty.c, with args passed to iu_vty_init() to insert
at an arbitrary VTY node, so that it can be used both for osmo-msc and
osmo-sgsn. Add generic iu_vty_config_write() to write out the config.
Call iu_vty_init() from msc_vty_init(); msc_vty_init() is in libmsc,
hence linking of osmo-msc now needs libiu to come after libmsc, so move
that further down.
Change-Id: I93728314742b327336f3fb6de98e6457f687e1f9
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 4 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 1 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_vty.c | 10 |
3 files changed, 14 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index cedd2da70..3350768db 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -297,6 +297,10 @@ static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg) mm->gb.nsei = msgb_nsei(msg); /* In case a Iu connection is reconnected we need to update the ue ctx */ mm->iu.ue_ctx = msg->dst; + if (mm->ran_type == MM_CTX_T_UTRAN_Iu + && mm->iu.ue_ctx) + mm->iu.ue_ctx->rab_assign_addr_enc = + sgsn->cfg.iu.rab_assign_addr_enc; } /* Store BVCI/NSEI in MM context */ diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 5d9af7807..b4b5cebeb 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -247,6 +247,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx) ctx->ran_type = MM_CTX_T_UTRAN_Iu; ctx->iu.ue_ctx = uectx; + ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; ctx->gmm_state = GMM_DEREGISTERED; ctx->pmm_state = PMM_DETACHED; diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 338e8049c..b6b827b14 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -44,6 +44,12 @@ #include <pdp.h> +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include <openbsc/iu.h> +#endif + static struct sgsn_config *g_cfg = NULL; const struct value_string sgsn_auth_pol_strs[] = { @@ -297,6 +303,8 @@ static int config_write_sgsn(struct vty *vty) } else vty_out(vty, " no compression v42bis%s", VTY_NEWLINE); + iu_vty_config_write(vty, " "); + return CMD_SUCCESS; } @@ -1285,7 +1293,7 @@ int sgsn_vty_init(struct sgsn_config *cfg) install_element(SGSN_NODE, &cfg_comp_v42bisp_cmd); #ifdef BUILD_IU - iu_vty_init(); + iu_vty_init(SGSN_NODE, &g_cfg->iu.rab_assign_addr_enc); #endif return 0; } |