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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sgsn: Reject PdpActReq if no GTP pdp ctx exists<br><br>It could happen that SGSN drops GTP side of a pdp ctx (pdp->lib=NULL)<br>while still maintaing the other side (to notify about the entire pdp ctx<br>being torn down). If a PdpActReq arrives during that time, we need to<br>account for that situation, otherwise osmo-sgsn crashes accessing<br>pdp->lib.<br>If no pdp->lib is found at that time, let's reject the request and<br>expect at some point later in time the entire pdp context will be<br>destroyed and reestablished.<br><br>Related: OS#4173<br>Change-Id: I6dd87557ebb26fdbd280504abde10d976acecf64<br>---<br>M src/sgsn/gprs_sm.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c</span><br><span>index 8cf5c5d..f8019ab 100644</span><br><span>--- a/src/sgsn/gprs_sm.c</span><br><span>+++ b/src/sgsn/gprs_sm.c</span><br><span>@@ -491,6 +491,11 @@</span><br><span>         /* Check if NSAPI is already in use */</span><br><span>       pdp = sgsn_pdp_ctx_by_nsapi(mmctx, act_req->req_nsapi);</span><br><span>   if (pdp) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* Make sure pdp ctx was not already torn down on GTP side */</span><br><span style="color: hsl(120, 100%, 40%);">+         if (!pdp->lib) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   gsm_cause = GSM_CAUSE_REACT_RQD;</span><br><span style="color: hsl(120, 100%, 40%);">+                      goto no_context;</span><br><span style="color: hsl(120, 100%, 40%);">+              }</span><br><span>            /* We already have a PDP context for this TLLI + NSAPI tuple */</span><br><span>              if (pdp->sapi == act_req->req_llc_sapi &&</span><br><span>                  pdp->ti == transaction_id) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/15330">change 15330</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-sgsn/+/15330"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I6dd87557ebb26fdbd280504abde10d976acecf64 </div>
<div style="display:none"> Gerrit-Change-Number: 15330 </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: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </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>