aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h3
-rw-r--r--openbsc/src/gprs/gprs_sgsn.c13
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c8
3 files changed, 2 insertions, 22 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 495836be7..10c2d9a7f 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -311,9 +311,6 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_nsapi(const struct sgsn_mm_ctx *mm,
/* look up PDP context by MM context and transaction ID */
struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm,
uint8_t tid);
-/* look up PDP context by MM context and gtp TEI */
-struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tei(const struct sgsn_mm_ctx *mm,
- uint32_t tei);
struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
uint8_t nsapi);
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index 70b0358e6..c34620183 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -311,19 +311,6 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm,
return NULL;
}
-/* look up PDP context by MM context and gtp TEI */
-struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tei(const struct sgsn_mm_ctx *mm,
- uint32_t tei)
-{
- struct sgsn_pdp_ctx *pdp;
-
- llist_for_each_entry(pdp, &mm->pdp_list, list) {
- if (pdp->lib->teid_own == tei)
- return pdp;
- }
- return NULL;
-}
-
/* you don't want to use this directly, call sgsn_create_pdp_ctx() */
struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
uint8_t nsapi)
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;
}