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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ggsn: rx DeletePdpReq confirmation: Improve documentation and use gtp_freepdp()<br><br>Update documentation since nowadays there are more paths calling<br>ggsn_close_one_pdp() (because we now close pdp contexts during sgsn<br>timeouts).<br><br>Switch pdp_freepdp() to gtp_freepdp() since in the event we ended up<br>there in the future we want to go through normal delete_ctx_cb  to free<br>related application data structures.<br><br>Change-Id: I7d9ae9a27390498ba387797aac6651e32fa44f29<br>---<br>M ggsn/ggsn.c<br>1 file changed, 10 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c</span><br><span>index 7b32bde..ffa508b 100644</span><br><span>--- a/ggsn/ggsn.c</span><br><span>+++ b/ggsn/ggsn.c</span><br><span>@@ -775,16 +775,17 @@</span><br><span>  case GTP_DELETE_PDP_REQ:</span><br><span>             /* Remark: We actually never reach this path nowadays because</span><br><span>                   only place where we call gtp_delete_context_req2() is during</span><br><span style="color: hsl(0, 100%, 40%);">-            apn_stop()->pool_close_all_pdp() path, and in that case we</span><br><span style="color: hsl(0, 100%, 40%);">-                   free all pdp contexts immediatelly without waiting for</span><br><span style="color: hsl(0, 100%, 40%);">-                  confirmation since we want to tear down the whole APN</span><br><span style="color: hsl(0, 100%, 40%);">-                   anyways. As a result, DeleteCtxResponse will never reach here</span><br><span style="color: hsl(0, 100%, 40%);">-                   since it will be dropped at some point in lower layers in the</span><br><span style="color: hsl(0, 100%, 40%);">-                   Rx path. This code is nevertheless left here in order to ease</span><br><span style="color: hsl(0, 100%, 40%);">-                   future developent and avoid possible future memleaks once more</span><br><span style="color: hsl(0, 100%, 40%);">-                  scenarios where GGSN sends a DeleteCtxRequest are introduced. */</span><br><span style="color: hsl(120, 100%, 40%);">+              ggsn_close_one_pdp() path, and in that case we free all pdp</span><br><span style="color: hsl(120, 100%, 40%);">+                   contexts immediatelly without waiting for confirmation</span><br><span style="color: hsl(120, 100%, 40%);">+                (through gtp_freepdp_teardown()) since we want to tear down</span><br><span style="color: hsl(120, 100%, 40%);">+                   the whole APN anyways. As a result, DeleteCtxResponse will</span><br><span style="color: hsl(120, 100%, 40%);">+            never reach here since it will be dropped at some point in</span><br><span style="color: hsl(120, 100%, 40%);">+            lower layers in the Rx path. This code is nevertheless left</span><br><span style="color: hsl(120, 100%, 40%);">+                   here in order to ease future developent and avoid possible</span><br><span style="color: hsl(120, 100%, 40%);">+            future memleaks once more scenarios where GGSN sends a</span><br><span style="color: hsl(120, 100%, 40%);">+                DeleteCtxRequest are introduced. */</span><br><span>               if (pdp)</span><br><span style="color: hsl(0, 100%, 40%);">-                        rc = pdp_freepdp(pdp);</span><br><span style="color: hsl(120, 100%, 40%);">+                        rc = gtp_freepdp(pdp->gsn, pdp);</span><br><span>          break;</span><br><span>       case GTP_ECHO_REQ:</span><br><span>           sgsn = (struct sgsn_peer *)cbp;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/15324">change 15324</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-ggsn/+/15324"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7d9ae9a27390498ba387797aac6651e32fa44f29 </div>
<div style="display:none"> Gerrit-Change-Number: 15324 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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@gnumonks.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>