diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-05-01 12:43:21 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-05-01 15:35:57 +0200 |
commit | a54358879f1ab928659568ebd6547fc65265f662 (patch) | |
tree | e0dbabf77c62508c9ed5784ac5b049193cd56333 /openbsc/src/gprs/sgsn_libgtp.c | |
parent | a54b47b04876152d6f5473d528480a67ccc89803 (diff) |
Identify PDP context by RAB ID, not TEI
When receiving an RAB-Assignment response from the RNC,
we should use the RAB ID (=NSAPI) to resolve the PDP context.
We cannot use the TEID, as the TEID chosen by the RNC for this RAB has
no relationship to the TEID we were using for the RAB-Assignment
request. TEIDs are local to each of the peer, like UDP port numbers.
Diffstat (limited to 'openbsc/src/gprs/sgsn_libgtp.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_libgtp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 214859948..4205fbc14 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -400,17 +400,13 @@ int sgsn_ranap_rab_ass_resp(struct sgsn_mm_ctx *ctx, RANAP_RAB_SetupOrModifiedIt { uint8_t rab_id; struct sgsn_pdp_ctx *pdp = NULL; - uint32_t gtp_tei; RANAP_RAB_SetupOrModifiedItem_t *item = &setup_ies->raB_SetupOrModifiedItem; rab_id = item->rAB_ID.buf[0]; - if (item->iuTransportAssociation->present == RANAP_IuTransportAssociation_PR_gTP_TEI) { - gtp_tei = asn1str_to_u32(&item->iuTransportAssociation->choice.gTP_TEI); - pdp = sgsn_pdp_ctx_by_tei(ctx, gtp_tei); - } - + pdp = sgsn_pdp_ctx_by_nsapi(ctx, rab_id); if (!pdp) { + LOGP(DRANAP, LOGL_ERROR, "RAB Assignment Response for unknown RAB/NSAPI=%u\n", rab_id); return -1; } |