From b37515e86b21ca4656447a9cc1874ef6748587bd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 2 Jul 2010 10:12:58 +0200 Subject: [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.. --- openbsc/src/gprs/gprs_gmm.c | 13 +++++++++++-- 1 file 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); -- cgit v1.2.3