pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34458?usp=email )
Change subject: hnbgw_cn: Remove assert hit due to wrong assumption ......................................................................
hnbgw_cn: Remove assert hit due to wrong assumption
The HNBGW in correctly assumes that no ss7->sccp instance is allocated until the same function calls osmo_sccp_simple_client_on_ss7_id(). This assumption is wrong, since ss7 may create its own ss7->sccp instance internally as a result of vty configuration, eg. when "sccp max-optional-data 124" is placed in osmo-hnbgw.cfg file.
In this scenario, simply removing the assert is enough, since osmo_sccp_simple_client_on_ss7_id() just calls osmo_ss7_ensure_sccp(), the same that the libmoso-sccp code called to allocate the pointer.
Related: SYS#6566 Fixes: f3caea850bc892551cd09bbaf49f798c172590c4 Change-Id: I1221c165156e9625324cf0080836a8ed2bad4e9c --- M src/osmo-hnbgw/hnbgw_cn.c 1 file changed, 22 insertions(+), 5 deletions(-)
Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified pespin: Verified fixeria: Looks good to me, but someone else must approve
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c index b95cf28..31bf192 100644 --- a/src/osmo-hnbgw/hnbgw_cn.c +++ b/src/osmo-hnbgw/hnbgw_cn.c @@ -849,11 +849,7 @@ return 0; } /* else cnlink->hnbgw_sccp_user stays NULL and is set up below. */ - LOG_CNLINK(cnlink, DCN, LOGL_DEBUG, "cs7 instance %u has no SCCP instance yet\n", ss7->cfg.id); - - /* All SCCP instances should originate from this function. So if there is no hnbgw_sccp_user for the cs7 - * instance, then the cs7 instance should not have an SCCP instance yet. */ - OSMO_ASSERT(!ss7->sccp); + LOG_CNLINK(cnlink, DCN, LOGL_DEBUG, "cs7 instance %u has no configured SCCP instance yet\n", ss7->cfg.id); }
/* No SCCP instance yet for this ss7. Create it. If no address name is given that resolves to a