pespin has submitted this change. ( 
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(-)

Approvals:
  laforge: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




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;

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40626?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I43b9ab7a06bcaa8bea91f9f54fca0993a67340d7
Gerrit-Change-Number: 40626
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to