<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21556">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_ns2_sns: dynamic calculate the maximum NS-VCs<br><br>The previous hard-coded value could be not enough if the user configures<br>too many local binds. Allow at least 8 NS-VCs. In case the user<br>configures too many binds (> 2) increase the maximum NS-VCs to allow<br>the SGSN to have 4 redundant connections.<br><br>Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7<br>---<br>M src/gb/gprs_ns2_sns.c<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c</span><br><span>index 9091c9a..50a1f9b 100644</span><br><span>--- a/src/gb/gprs_ns2_sns.c</span><br><span>+++ b/src/gb/gprs_ns2_sns.c</span><br><span>@@ -1265,6 +1265,7 @@</span><br><span>         gss->sns_nsvc = nsvc;</span><br><span>     nsvc->sns_only = true;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* count how many bindings are available (only UDP binds) */</span><br><span>         int count = 0;</span><br><span>       llist_for_each_entry(bind, &nsi->binding, list) {</span><br><span>             if (!gprs_ns2_is_ip_bind(bind))</span><br><span>@@ -1320,6 +1321,7 @@</span><br><span> </span><br><span>          gss->num_ip4_local = count;</span><br><span>               gss->num_max_ip4_remote = 4;</span><br><span style="color: hsl(120, 100%, 40%);">+               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip4_remote * 4, 8);</span><br><span>                 break;</span><br><span>       case IPv6:</span><br><span>           /* IPv6 */</span><br><span>@@ -1358,11 +1360,10 @@</span><br><span>                 }</span><br><span>            gss->num_ip6_local = count;</span><br><span>               gss->num_max_ip6_remote = 4;</span><br><span style="color: hsl(120, 100%, 40%);">+               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip6_remote * 4, 8);</span><br><span>                 break;</span><br><span>       }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   gss->num_max_nsvcs = 8;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   return osmo_fsm_inst_dispatch(nse->bss_sns_fi, GPRS_SNS_EV_START, NULL);</span><br><span> </span><br><span> err:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21556">change 21556</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/libosmocore/+/21556"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7 </div>
<div style="display:none"> Gerrit-Change-Number: 21556 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </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-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>