diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-03 11:30:43 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-03 11:47:30 +0100 |
commit | 59c1b645e2d86457ee1c9df56860aec8ee5a606f (patch) | |
tree | ba0480cfeaa7b1cc4bf712697ea7a3bbe9146c0a /openbsc | |
parent | 87c83d0b895624ac3968a85edc9de18e36d5d1ea (diff) |
gtphub: check TEI presence in Create PDP Ctx Response
Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/gprs/gtphub.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 96068bf5a..cb42a12cb 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -1524,6 +1524,16 @@ static int gtphub_handle_create_pdp_ctx(struct gtphub *hub, gtphub_tunnel_endpoint_set_peer(&tun->endpoint[side_idx][plane_idx], peer_from_ie); + if (!tei_from_ie && + !tun->endpoint[side_idx][plane_idx].tei_orig) { + LOG(LOGL_ERROR, + "Create PDP Context message omits %s TEI, but the" + " no TEI has been announced for this tunnel: %s", + gtphub_plane_idx_names[plane_idx], + gtphub_tunnel_str(tun)); + return -1; + } + if (tei_from_ie) { /* Create TEI mapping and replace in GTP packet IE */ uint32_t mapped_tei = nr_pool_next(&hub->tei_pool); |