https://osmocom.org/https://osmocom.org/favicon.ico?16647414092019-03-28T19:59:10ZOpen Source Mobile Communicationslibosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136922019-03-28T19:59:10Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-3 priority-3 priority-high3 closed parent" href="/issues/3618">Feature #3618</a>: Inter-MSC hand-over support</i> added</li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136942019-03-28T19:59:43Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-3 priority-2 priority-default closed behind-schedule" href="/issues/1609">Feature #1609</a>: Inter-BSC hand-over is missing (MSC side)</i> added</li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136952019-03-28T20:02:50Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>(a tweak could be to use the lowest bit as incoming/outgoing separation, so that conn_ids take up less space in logging: GERAN-A-0x80000001 is a lot longer than GERAN-A-0x2)</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136962019-03-28T20:06:35Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-2 status-1 priority-2 priority-default" href="/issues/3872">Feature #3872</a>: osmo_scu_prim.conn_id should be picked from a distinct number space for outgoing and incoming N-CONNECT</i> added</li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136982019-03-28T20:07:04Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Subject</strong> changed from <i>osmo_scu_prim conn_id should be scoper per-user and should not correlate with the local-reference spoken on the SCCP wire</i> to <i>osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wire</i></li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=136992019-03-28T20:10:43Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/13699/diff?detail_id=22235">diff</a>)</li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137002019-03-29T10:10:07Zlaforge
<ul></ul><p>On Thu, Mar 28, 2019 at 08:02:50PM +0000, neels [REDMINE] wrote:</p>
<blockquote>
<p>(a tweak could be to use the lowest bit as incoming/outgoing separation, so that conn_ids take up less space in logging: GERAN-A-0x80000001 is a lot longer than GERAN-A-0x2)</p>
</blockquote>
<p>you can also simply adjust the logging function to say I1 for Inbound 1 and O1 for Outbound 1.</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137012019-03-29T10:10:09Zlaforge
<ul></ul><p>The description looks very much correct, thanks a lot, Neels.</p>
<p>Some minor additions:</p>
<ul>
<li>please put safe-guards about the incoming/outgoing ID range splits at all related<br />places. A program wrongly using a connection ID from the "incoming" range in<br />an outgoing N-CONNECT.req primitive should fail explicitly, rather than "succeeding<br />by accident in most of the cases".</li>
</ul>
<ul>
<li>feel free to have a look at ITU-T Q.711 Section 6.1.1 for a description of the SCCP-SAP<br />primitives, in case there's any doubt about how they work in general.</li>
</ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137022019-03-29T10:39:07Zosmith
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137042019-03-29T17:18:36Zneelsnhofmeyr@sysmocom.de
<ul></ul><p><a class="user active" href="https://osmocom.org/users/301771">osmith</a> have updated the WIP patch proposal again after our call</p>
<p><a class="user active" href="https://osmocom.org/users/7">laforge</a> Please confirm that this is the right approach: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-sccp/+/13466">https://gerrit.osmocom.org/c/libosmo-sccp/+/13466</a></p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137112019-03-30T10:40:07Zlaforge
<ul></ul><blockquote>
<p>Please confirm that this is the right approach: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-sccp/+/13466">https://gerrit.osmocom.org/c/libosmo-sccp/+/13466</a></p>
</blockquote>
I added review comments to gerrit. I think some parts are right, but others<br />are not. I don't think
<ul>
<li>there should be any renaming of the existing conn_id to include "user",<br />nor any related functions. Connection IDs are always between SAP provider<br />and SAP user, by very definition.</li>
</ul>
<ul>
<li>libosmo-sccp can ever be used to allocate "user side" (sap_down) connection<br />identifiers reliably. It must check for wraps/duplicates, and it can only do<br />so by accessing whatever state structures the user application has, such as e.g.<br />the list of subscriber_conns or whatever is attached to the SCCP connection.</li>
</ul>
<p>Regards,<br /> Harald</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=137972019-04-03T13:59:08Zosmith
<ul></ul><p>I've updated the patch with my current understanding.</p>
<p><a class="user active" href="https://osmocom.org/users/7">laforge</a>: can you take another look at it?</p>
<p><a class="external" href="https://gerrit.osmocom.org/#/q/topic:conn-id-scoping">https://gerrit.osmocom.org/#/q/topic:conn-id-scoping</a></p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=138062019-04-04T07:13:45Zosmith
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>80</i></li></ul><p>So the approach is right. :)</p>
<p>I'm testing the patch currently, and it does not work out of the box (OsmoBSC says "No unused local reference available for user msc-0"). Working on an update.</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=138082019-04-04T08:25:56Zosmith
<ul></ul><p>Further testing reveals a problem with the current patch.</p>
<p>Incoming messages are not resolved by the conn_id anymore, like this snippet from master:<br /><pre>
conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF);
conn = conn_find_by_id(inst, conn_id);
</pre></p>
<p>Instead they are resolved from the local_ref and user now.</p>
<pre>
static struct sccp_connection *sccp_find_connection(struct osmo_sccp_instance *inst, struct xua_msg *xua)
{
uint32_t local_ref = xua_msg_get_u32(xua, SUA_IEI_DEST_REF);
struct osmo_sccp_user *user = sccp_find_user(inst, xua);
if (user)
return conn_find_by_local_ref(user, local_ref);
return NULL;
}
...
conn = sccp_find_connection(inst, xua);
</pre>
<p>sccp_find_user() needs SUA_IEI_DEST_ADDR to be set:</p>
<pre>
/* Find a SCCP user for given SUA message (based on SUA_IEI_DEST_ADDR */
static struct osmo_sccp_user *sccp_find_user(struct osmo_sccp_instance *inst,
struct xua_msg *xua)
{
int rc;
struct osmo_sccp_addr called_addr;
rc = sua_addr_parse(&called_addr, xua, SUA_IEI_DEST_ADDR);
if (rc < 0) {
LOGP(DLSCCP, LOGL_ERROR, "Cannot find SCCP User for XUA "
"Message %s without valid DEST_ADDR\n",
xua_hdr_dump(xua, &xua_dialect_sua));
return NULL;
}
...
</pre>
<p>But we don't set it for all messages, and so it fails here:<br /><pre>
OsmoMSC:
Cannot find SCCP User for XUA Message CO:RELRE without valid DEST_ADDR
Cannot find connection for local reference 4
OsmoBSC:
Cannot find SCCP User for XUA Message CO:RELCO without valid DEST_ADDR
Cannot find connection for local reference 4
</pre></p>
<p>IIRC we can't simply start sending SUA_IEI_DEST_ADDR in RELRE and RELCO, because then it is not backwards compatible.</p>
<p><a class="user active" href="https://osmocom.org/users/7">laforge</a>, how to proceed here?</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=138102019-04-04T08:36:25Zlaforge
<ul></ul><p>On Thu, Apr 04, 2019 at 08:25:56AM +0000, <a class="email" href="mailto:redmine@lists.osmocom.org">redmine@lists.osmocom.org</a> wrote:</p>
<blockquote>
<p>Further testing reveals a problem with the current patch.</p>
</blockquote>
<p>:/</p>
<blockquote>
<p>sccp_find_user() needs SUA_IEI_DEST_ADDR to be set:</p>
</blockquote>
<p>This is unfortuantely not possible, as the Destination Address is not present<br />in a number of messages, as you found out.</p>
<blockquote>
<p>IIRC we can't simply start sending SUA_IEI_DEST_ADDR in RELRE and RELCO, because then it is not backwards compatible.</p>
</blockquote>
<p>It's not about "backwards compatibility" but it's about how SCCP (and SUA) are specified. We are<br />interoperating with other implementations and we cannot change the protocol.</p>
<blockquote>
<p><a class="user active" href="https://osmocom.org/users/7">laforge</a>, how to proceed here?</p>
</blockquote>
<p>I don't know off my head. I'll try to investigate but certainly won't have time before<br />Sunday or Monday, sorry.</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=152132019-07-18T05:13:17Zlaforge
<ul><li><strong>Priority</strong> changed from <i>Urgent</i> to <i>High</i></li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=153302019-07-18T09:33:27Zosmith
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Stalled</i></li></ul><p>Setting to stalled, as it is unclear how to continue here.</p> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=246582022-08-17T14:49:23Zmsuraev
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-2 priority-default closed" href="/issues/5579">Bug #5579</a>: Respect size limit of 130 data bytes in SCCP CR</i> added</li></ul> libosmo-sccp + libosmo-sigtran - Bug #3871: osmo_scu_prim conn_id should be scoped per-user and direction, and should not correlate with the local-reference spoken on the SCCP wirehttps://osmocom.org/issues/3871?journal_id=266122023-04-02T09:01:35Zlaforge
<ul><li><strong>Status</strong> changed from <i>Stalled</i> to <i>Feedback</i></li><li><strong>Assignee</strong> changed from <i>osmith</i> to <i>laforge</i></li><li><strong>Priority</strong> changed from <i>High</i> to <i>Low</i></li></ul>