GSUP: set default ipa-name at application level

Prior to this change, if there was no explicit ipa-name configuration
in OsmoMSC, OsmoHLR would see the GSUP connection as MSC-00-00-00-00-00-00.
However, this default is constructed somewhere deep in IPA libraries
and is not visible to the GSUP client application, in this case OsmoMSC.
This situation creates a problem for SMS-over-GSUP routing: when we get
MT-forwardSM.req from an SMSC, we have to send a GSUP response, and this
response needs to get back to the MT-sending SMSC.  Because OsmoHLR
applies only passive routing for these responses, we have to set
source_name when generating MT-forwardSM.res in OsmoMSC - but we cannot
do so if don't know our own IPA name.

Change the default OsmoMSC ipa-name from MSC-00-00-00-00-00-00 to
unnamed-MSC, mirroring OsmoHLR default of unnamed-HLR, and set it
at our application level rather than deep in the libraries.

Related: OS#6135
Change-Id: I7bacd001b81326c32bc262c7d0c0491ded822fa8
This commit is contained in:
Mychaela N. Falconia 2023-12-18 03:20:10 +00:00
parent 82fad5dd46
commit d0880faf79
3 changed files with 9 additions and 2 deletions

View File

@ -130,9 +130,15 @@ int msc_gsup_client_start(struct gsm_network *net)
net->gcm = gsup_client_mux_alloc(net);
OSMO_ASSERT(net->gcm);
/* If no IPA name is configured, we need to provide a default
* right here, in order for the defaulted name to get inserted
* as source_name in GSUP response messages. */
if (!net->msc_ipa_name)
net->msc_ipa_name = "unnamed-MSC";
ipa_dev = talloc_zero(net->gcm, struct ipaccess_unit);
ipa_dev->unit_name = "MSC";
ipa_dev->serno = net->msc_ipa_name; /* NULL unless configured via VTY */
ipa_dev->serno = net->msc_ipa_name;
ipa_dev->swversion = PACKAGE_NAME "-" PACKAGE_VERSION;
*net->gcm = (struct gsup_client_mux){

View File

@ -1991,7 +1991,7 @@ DEFUN(cfg_hlr_ipa_name,
"Set the IPA name of this MSC\n"
"A unique name for this MSC. For example: PLMN + redundancy server number: MSC-901-70-0. "
"This name is used for GSUP routing and must be set if more than one MSC is connected to the HLR. "
"The default is 'MSC-00-00-00-00-00-00'.\n")
"The default is 'unnamed-MSC'.\n")
{
if (vty->type != VTY_FILE) {
vty_out(vty, "The IPA name cannot be changed at run-time; "

View File

@ -171,6 +171,7 @@ mncc-int
hlr
remote-ip 127.0.0.1
remote-port 4222
ipa-name unnamed-MSC
sgs
local-port 29118
local-ip 0.0.0.0