summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-02-27 17:58:31 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-27 18:07:29 +0100
commitd015cbd65d2547e813f361654b3059d4eefa3669 (patch)
treebb09dd6d55225b5488a77734853f2bfc1e4a7801
parent27355c9c654e7035d8fea0619f3832e978a244bb (diff)
XID: resend xid with pdp-ctx-ack messages
If a pdp context is created a xid request is sent right after the pdp-context-ack message. The sending of the pdp-context-ack and the xid message is triggered from the GGSN via the GTP interface. When the pdp-context-ack message is not received by the MS, it will send the pdp-context-request again. A lost pdp-context-ack is resent by the SGSN directly so that the mechanism described above does not work for pdp-context-ack resents. This commit adds code to trigger the sending of xid messages also for resent pdp-context-ack messages. Change-Id: Ice66790803154310a61a70a54be76cec539c97a7
-rw-r--r--openbsc/src/gprs/gprs_gmm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 3f59a2b64..da243a4d5 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -68,6 +68,7 @@
#include <openbsc/sgsn.h>
#include <openbsc/signal.h>
#include <openbsc/iu.h>
+#include <openbsc/gprs_sndcp.h>
#include <pdp.h>
@@ -2438,6 +2439,7 @@ static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, bool *del
char apn_str[GSM_APN_LENGTH] = { 0, };
char *hostname;
int rc;
+ struct gprs_llc_lle *lle;
LOGMMCTXP(LOGL_INFO, mmctx, "-> ACTIVATE PDP CONTEXT REQ: SAPI=%u NSAPI=%u ",
act_req->req_llc_sapi, act_req->req_nsapi);
@@ -2513,7 +2515,19 @@ static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, bool *del
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);
+ rc = gsm48_tx_gsm_act_pdp_acc(pdp);
+ if (rc < 0)
+ return rc;
+
+ if (pdp->mm->ran_type == MM_CTX_T_GERAN_Gb) {
+ /* Also re-transmit the SNDCP XID message */
+ lle = &pdp->mm->gb.llme->lle[pdp->sapi];
+ rc = sndcp_sn_xid_req(lle,pdp->nsapi);
+ if (rc < 0)
+ return rc;
+ }
+
+ return 0;
}
/* Send reject with GSM_CAUSE_NSAPI_IN_USE */