aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-02 10:12:58 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-02 10:12:58 +0200
commitb37515e86b21ca4656447a9cc1874ef6748587bd (patch)
tree5466b77ae563a2692a369c6c9d55fe8e193c4f54
parent993697c8d2f0d999fa9867e18d8c07cd8398b46c (diff)
[SGSN] Account for re-transmitted PDP CTX ACT REQ
In case our PDP CTX ACT ACK gets lost on the Gb or Um link, the MS re-transmits the PDP CTX ACT REQ. We have to ACK it again instead of REJecting it..
-rw-r--r--openbsc/src/gprs/gprs_gmm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index f85d30a8e..e6eb55826 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -1167,8 +1167,17 @@ static int gsm48_rx_gsm_act_pdp_req(struct sgsn_mm_ctx *mmctx,
}
/* Check if NSAPI is already in use */
- if (sgsn_pdp_ctx_by_nsapi(mmctx, act_req->req_nsapi)) {
- /* FIXME: send reject with GSM_CAUSE_NSAPI_IN_USE */
+ pdp = sgsn_pdp_ctx_by_nsapi(mmctx, act_req->req_nsapi);
+ if (pdp) {
+ /* We already have a PDP context for this TLLI + NSAPI tuple */
+ if (pdp->sapi == act_req->req_llc_sapi &&
+ pdp->ti == transaction_id) {
+ /* This apparently is a re-transmission of a PDP CTX
+ * ACT REQ (our ACT ACK must have got dropped) */
+ return gsm48_tx_gsm_act_pdp_acc(pdp);
+ }
+
+ /* Send reject with GSM_CAUSE_NSAPI_IN_USE */
return gsm48_tx_gsm_act_pdp_rej(mmctx, transaction_id,
GSM_CAUSE_NSAPI_IN_USE,
0, NULL);