<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/23891">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ipa_asp_fsm: Fix AS lookup from IPA ASP<br><br>Contrary to proper SIGTRAN, IPA/SCCPlite cannot support multiple<br>AS within one AS.  When looking up the AS from the ASP, we cannot<br>blindly use routing context 0 to find the AS, as there may very well<br>be multiple IPA AS, and all of those have routing context 0.<br><br>As a result, the exiting look-up by osmo_ss7_as_find_by_rctx(inst, 0)<br>will return the wrong AS, and we will try to add/delete routes for<br>a completely different AS when ASPs are coming up or going down.<br><br>Instead, we need to use xua_find_as_for_asp() in order do the look-up:<br>It will resolve the single AS within the ASP.<br><br>Change-Id: Id295daf84f6ba1cc56cbe1761f874bea329e17ea<br>Cloess: SYS#5422<br>---<br>M src/xua_asp_fsm.c<br>1 file changed, 5 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/91/23891/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c</span><br><span>index 4630f5b..f8683d5 100644</span><br><span>--- a/src/xua_asp_fsm.c</span><br><span>+++ b/src/xua_asp_fsm.c</span><br><span>@@ -29,6 +29,7 @@</span><br><span> </span><br><span> #include "xua_asp_fsm.h"</span><br><span> #include "xua_as_fsm.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "xua_internal.h"</span><br><span> </span><br><span> #define S(x) (1 << (x))</span><br><span> </span><br><span>@@ -941,9 +942,9 @@</span><br><span>   struct ipa_asp_fsm_priv *iafp = fi->priv;</span><br><span>         struct osmo_ss7_asp *asp = iafp->asp;</span><br><span>     struct osmo_ss7_instance *inst = asp->inst;</span><br><span style="color: hsl(0, 100%, 40%);">-  /* We use routing-context '0' here, as that's the only one we support in IPA */</span><br><span style="color: hsl(0, 100%, 40%);">-     struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+   struct osmo_ss7_as *as;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   xua_find_as_for_asp(&as, asp, NULL);</span><br><span>     OSMO_ASSERT(as);</span><br><span> </span><br><span>         switch (event) {</span><br><span>@@ -1015,10 +1016,10 @@</span><br><span>   struct ipa_asp_fsm_priv *iafp = fi->priv;</span><br><span>         struct osmo_ss7_asp *asp = iafp->asp;</span><br><span>     struct osmo_ss7_instance *inst = asp->inst;</span><br><span style="color: hsl(0, 100%, 40%);">-  /* We use routing-context '0' here, as that's the only one we support in IPA */</span><br><span style="color: hsl(0, 100%, 40%);">-     struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+   struct osmo_ss7_as *as;</span><br><span>      struct osmo_ss7_route *rt;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        xua_find_as_for_asp(&as, asp, NULL);</span><br><span>     OSMO_ASSERT(as);</span><br><span> </span><br><span>         /* find the route which we have created if we ever reached ipa_asp_fsm_wait_id_ack2 */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/23891">change 23891</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmo-sccp/+/23891"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id295daf84f6ba1cc56cbe1761f874bea329e17ea </div>
<div style="display:none"> Gerrit-Change-Number: 23891 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>