<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23014">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_bssgp_pdu: ensure only known BVCI can be resetted by the SGSN<br><br>Related: SYS#5354<br>Change-Id: I04e36ce4a29e51d85e67a0d3a81aa0e1eb9e9c08<br>---<br>M src/gprs_bssgp_pcu.c<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/23014/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gprs_bssgp_pcu.c b/src/gprs_bssgp_pcu.c</span><br><span>index 9f0afe8..deb7711 100644</span><br><span>--- a/src/gprs_bssgp_pcu.c</span><br><span>+++ b/src/gprs_bssgp_pcu.c</span><br><span>@@ -415,6 +415,7 @@</span><br><span>       struct tlv_parsed tp;</span><br><span>        enum bssgp_pdu_type pdu_type = (enum bssgp_pdu_type) bgph->pdu_type;</span><br><span>      uint16_t ns_bvci = msgb_bvci(msg), nsei = msgb_nsei(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+     uint16_t bvci;</span><br><span>       int data_len;</span><br><span>        int rc = 0;</span><br><span>  struct bssgp_bvc_ctx *bctx;</span><br><span>@@ -456,6 +457,13 @@</span><br><span>   }</span><br><span> </span><br><span>        if (pdu_type == BSSGP_PDUT_BVC_RESET) {</span><br><span style="color: hsl(120, 100%, 40%);">+               if (ns_bvci != BVCI_SIGNALLING || !TLVP_PRESENT(&tp, BSSGP_IE_BVCI))</span><br><span style="color: hsl(120, 100%, 40%);">+                      return bssgp_tx_status(BSSGP_CAUSE_INV_MAND_INF, NULL, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                bvci = tlvp_val16be(&tp, BSSGP_IE_BVCI);</span><br><span style="color: hsl(120, 100%, 40%);">+          if (bvci != the_pcu->bssgp.bctx->bvci)</span><br><span style="color: hsl(120, 100%, 40%);">+                  return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI, NULL, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>               return bssgp_rcvmsg(msg);</span><br><span>    }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23014">change 23014</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/osmo-pcu/+/23014"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I04e36ce4a29e51d85e67a0d3a81aa0e1eb9e9c08 </div>
<div style="display:none"> Gerrit-Change-Number: 23014 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>