<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15867">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ss7: Fix finding asp by socket addr if it has no remote hosts configured<br><br>Fixes: 80b135581909fef595d48436ab04dbcb147e3895<br>Change-Id: I14a0132a4667cea75fc212dfeeef76d8509b991d<br>---<br>M src/osmo_ss7.c<br>1 file changed, 8 insertions(+), 5 deletions(-)<br><br></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 8a86af1..88c4922 100644</span><br><span>--- a/src/osmo_ss7.c</span><br><span>+++ b/src/osmo_ss7.c</span><br><span>@@ -1174,12 +1174,15 @@</span><br><span>                    if (i == asp->cfg.local.host_cnt)</span><br><span>                                 continue; /* didn't match any local.host */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                     for (i = 0; i < asp->cfg.remote.host_cnt; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-                          if (!asp->cfg.remote.host[i] || !strcmp(asp->cfg.remote.host[i], hostbuf_r))</span><br><span style="color: hsl(0, 100%, 40%);">-                                      break;</span><br><span style="color: hsl(120, 100%, 40%);">+                        /* If no remote host was set, it's probably a server and hence we match any cli src */</span><br><span style="color: hsl(120, 100%, 40%);">+                    if (asp->cfg.remote.host_cnt) {</span><br><span style="color: hsl(120, 100%, 40%);">+                            for (i = 0; i < asp->cfg.remote.host_cnt; i++) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                        if (!asp->cfg.remote.host[i] || !strcmp(asp->cfg.remote.host[i], hostbuf_r))</span><br><span style="color: hsl(120, 100%, 40%);">+                                            break;</span><br><span style="color: hsl(120, 100%, 40%);">+                                }</span><br><span style="color: hsl(120, 100%, 40%);">+                             if (i == asp->cfg.remote.host_cnt)</span><br><span style="color: hsl(120, 100%, 40%);">+                                 continue; /* didn't match any remote.host */</span><br><span>                     }</span><br><span style="color: hsl(0, 100%, 40%);">-                       if (i == asp->cfg.remote.host_cnt)</span><br><span style="color: hsl(0, 100%, 40%);">-                           continue; /* didn't match any remote.host */</span><br><span> </span><br><span>                         return asp;</span><br><span>          }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/15867">change 15867</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/+/15867"/><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: I14a0132a4667cea75fc212dfeeef76d8509b991d </div>
<div style="display:none"> Gerrit-Change-Number: 15867 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>