<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/23982">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_ss7: Truncate route 'mask' to point code bit length<br><br>Otherwise we run into the problem that a route with mask 0xffffff<br>differs from one with a mask of 0x3fff despite having only 14 bit<br>point code length and them being logically equal.<br><br>Change-Id: I5d5c828de45724d93a0461bb0dd7858fd8378acd<br>Related: SYS#5422<br>---<br>M src/osmo_ss7.c<br>1 file changed, 4 insertions(+), 0 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/82/23982/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c</span><br><span>index 98dfc0c..443dc39 100644</span><br><span>--- a/src/osmo_ss7.c</span><br><span>+++ b/src/osmo_ss7.c</span><br><span>@@ -775,6 +775,10 @@</span><br><span>        struct osmo_ss7_linkset *lset;</span><br><span>       struct osmo_ss7_as *as = NULL;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+    /* truncate mask to maximum.  Let's avoid callers specifying arbitrary large</span><br><span style="color: hsl(120, 100%, 40%);">+       * masks to ensure we don't fail duplicate detection with longer mask lengths */</span><br><span style="color: hsl(120, 100%, 40%);">+  mask &= (1 << osmo_ss7_pc_width(&rtbl->inst->cfg.pc_fmt))-1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   OSMO_ASSERT(ss7_initialized);</span><br><span>        lset = osmo_ss7_linkset_find_by_name(rtbl->inst, linkset_name);</span><br><span>   if (!lset) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/23982">change 23982</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/+/23982"/><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: I5d5c828de45724d93a0461bb0dd7858fd8378acd </div>
<div style="display:none"> Gerrit-Change-Number: 23982 </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>