pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40626?usp=email )
Change subject: sccp: Avoid setting default local HNBGW PC as default remote PC ......................................................................
sccp: Avoid setting default local HNBGW PC as default remote PC
It makes no sense to set the remote PC of MSC/SGSN to the default local HNBGW PC. Instead, set it to the default remote PC of the pool (sgsn vs msc), as already done in "else" code path in hnbgw_cnlink_start_or_restart() calling osmo_sccp_make_addr_pc_ssn().
Change-Id: I43b9ab7a06bcaa8bea91f9f54fca0993a67340d7 --- M src/osmo-hnbgw/cnlink.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/26/40626/1
diff --git a/src/osmo-hnbgw/cnlink.c b/src/osmo-hnbgw/cnlink.c index 0bd2b3d..ea53ee0 100644 --- a/src/osmo-hnbgw/cnlink.c +++ b/src/osmo-hnbgw/cnlink.c @@ -456,7 +456,7 @@
/* Instead of comparing whether the address book entry names are different, actually resolve the * resulting SCCP address, and only restart the cnlink if the resulting address changed. */ - resolve_addr_name(&remote_addr, &ss7, cnlink->vty.remote_addr_name, NULL, DEFAULT_PC_HNBGW); + resolve_addr_name(&remote_addr, &ss7, cnlink->vty.remote_addr_name, NULL, cnlink->pool->default_remote_pc); if (osmo_sccp_addr_cmp(&remote_addr, &cnlink->remote_addr, OSMO_SCCP_ADDR_T_PC | OSMO_SCCP_ADDR_T_SSN)) changed = true; } else if (cnlink->vty.remote_addr_name != cnlink->use.remote_addr_name) { @@ -509,7 +509,7 @@ * in a specific cs7 instance. If it is not set, leave ss7 == NULL to use cs7 instance 0. */ if (cnlink->use.remote_addr_name) { if (resolve_addr_name(&cnlink->remote_addr, &ss7, cnlink->use.remote_addr_name, cnlink->name, - DEFAULT_PC_HNBGW)) { + cnlink->pool->default_remote_pc)) { LOG_CNLINK(cnlink, DCN, LOGL_ERROR, "cannot initialize SCCP: there is no SCCP address named '%s'\n", cnlink->use.remote_addr_name); return -ENOENT;