diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-29 14:02:28 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-29 14:07:04 +0200 |
commit | 26e300fda04146fceaa9789457ce23164ae3a46d (patch) | |
tree | ac4372afefa06a3cb43dfc4f7a5ce5365e4b6f47 | |
parent | 4e605b32d49cffa4d82e6aa395415db558801293 (diff) |
ggsn: rx DeletePdpReq confirmation: Improve documentation and use gtp_freepdp()
Update documentation since nowadays there are more paths calling
ggsn_close_one_pdp() (because we now close pdp contexts during sgsn
timeouts).
Switch pdp_freepdp() to gtp_freepdp() since in the event we ended up
there in the future we want to go through normal delete_ctx_cb to free
related application data structures.
Change-Id: I7d9ae9a27390498ba387797aac6651e32fa44f29
-rw-r--r-- | ggsn/ggsn.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 7b32bde..ffa508b 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -775,16 +775,17 @@ static int cb_conf(int type, int cause, struct pdp_t *pdp, void *cbp) case GTP_DELETE_PDP_REQ: /* Remark: We actually never reach this path nowadays because only place where we call gtp_delete_context_req2() is during - apn_stop()->pool_close_all_pdp() path, and in that case we - free all pdp contexts immediatelly without waiting for - confirmation since we want to tear down the whole APN - anyways. As a result, DeleteCtxResponse will never reach here - since it will be dropped at some point in lower layers in the - Rx path. This code is nevertheless left here in order to ease - future developent and avoid possible future memleaks once more - scenarios where GGSN sends a DeleteCtxRequest are introduced. */ + ggsn_close_one_pdp() path, and in that case we free all pdp + contexts immediatelly without waiting for confirmation + (through gtp_freepdp_teardown()) since we want to tear down + the whole APN anyways. As a result, DeleteCtxResponse will + never reach here since it will be dropped at some point in + lower layers in the Rx path. This code is nevertheless left + here in order to ease future developent and avoid possible + future memleaks once more scenarios where GGSN sends a + DeleteCtxRequest are introduced. */ if (pdp) - rc = pdp_freepdp(pdp); + rc = gtp_freepdp(pdp->gsn, pdp); break; case GTP_ECHO_REQ: sgsn = (struct sgsn_peer *)cbp; |