diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-13 15:14:15 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-16 15:16:53 +0200 |
commit | 89895b027d57d2352afb56bdfef72c3e106168d6 (patch) | |
tree | 1076c59adeee763200fee4c3428c7ad0ada3f714 /src/gprs/gprs_gmm.c | |
parent | a83850c7fdd6f4a2cfbd5267bc64fd12cd8dd2b5 (diff) |
Add optional TearDownInd IE in PDP DEACT REQ towards PCU
According to 3GPP TS 24.008 Section 6.1.3.4, the tear down indicator IE
maybe included in the DEACTIVATE PDP CONTEXT REQUEST message in order
to indicate whether only the PDP context associated with this specific
TI or all active PDP contexts sharing the same PDP address and APN as
the PDP context associated with this specific TI shall be deactivated.
As we don't permit/support establishing multiple PDP contexts using
the same APN and PDP address, it shouldn't really make any difference.
Nevertheless, we want to clear everything, so let's include it.
Change-Id: Ia9bc2d0e93362a8473eac5cf4c7e8ffa41c79e5b
Diffstat (limited to 'src/gprs/gprs_gmm.c')
-rw-r--r-- | src/gprs/gprs_gmm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 9d8a8695a..d06fa6c4d 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -2295,11 +2295,12 @@ int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, /* Section 9.5.8: Deactivate PDP Context Request */ static int _gsm48_tx_gsm_deact_pdp_req(struct sgsn_mm_ctx *mm, uint8_t tid, - uint8_t sm_cause) + uint8_t sm_cause, bool teardown) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 PDP DET REQ"); struct gsm48_hdr *gh; uint8_t transaction_id = tid ^ 0x8; /* flip */ + uint8_t tear_down_ind = (0x9 << 4) | (!!teardown); LOGMMCTXP(LOGL_INFO, mm, "<- DEACTIVATE PDP CONTEXT REQ\n"); rate_ctr_inc(&sgsn->rate_ctrs->ctr[CTR_PDP_DL_DEACTIVATE_REQUEST]); @@ -2311,14 +2312,15 @@ static int _gsm48_tx_gsm_deact_pdp_req(struct sgsn_mm_ctx *mm, uint8_t tid, gh->msg_type = GSM48_MT_GSM_DEACT_PDP_REQ; msgb_v_put(msg, sm_cause); + msgb_v_put(msg, tear_down_ind); return gsm48_gmm_sendmsg(msg, 0, mm, true); } -int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause) +int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause, bool teardown) { pdpctx_timer_start(pdp, 3395, sgsn->cfg.timers.T3395); - return _gsm48_tx_gsm_deact_pdp_req(pdp->mm, pdp->ti, sm_cause); + return _gsm48_tx_gsm_deact_pdp_req(pdp->mm, pdp->ti, sm_cause, teardown); } /* Section 9.5.9: Deactivate PDP Context Accept */ @@ -2724,7 +2726,7 @@ static void pdpctx_timer_cb(void *_pdp) sgsn_delete_pdp_ctx(pdp); break; } - gsm48_tx_gsm_deact_pdp_req(pdp, GSM_CAUSE_NET_FAIL); + gsm48_tx_gsm_deact_pdp_req(pdp, GSM_CAUSE_NET_FAIL, true); break; default: LOGPDPCTXP(LOGL_ERROR, pdp, "timer expired in unknown mode %u\n", |