pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-sgsn/+/38436?usp=email )
Change subject: ranap: Reject ActivatePDPCtx from UE if RABAssResp parsing fails
......................................................................
ranap: Reject ActivatePDPCtx from UE if RABAssResp parsing fails
Before this patch, if Rx path at RAB Ass Req failed, the PDP ctx in the
middle of being activated was left untouched.
Explicitly communicate the failure to both sides (UE and GGSN).
Related: OS#6508
Related: SYS#7119
Change-Id: I111cc4b17100d2e1ef756b654dc9e98415b3a8bb
---
M src/sgsn/gprs_ranap.c
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/36/38436/1
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index eabf7af..613485f 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -68,6 +68,7 @@
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);
+ sgsn_ranap_iu_release_free(ctx, NULL);
return -1;
}
@@ -81,7 +82,7 @@
"RAB Assignment Resp: Unknown Transport Layer Address (size %u):
%s\n",
item->transportLayerAddress->size,
osmo_hexdump(item->transportLayerAddress->buf,
item->transportLayerAddress->size));
- return -1;
+ goto ret_error;
}
switch (addr.u.sa.sa_family) {
@@ -94,7 +95,7 @@
LOGP(DRANAP, LOGL_ERROR, "RAB Assignment Resp: Unknown "
"transport layer address size %u\n",
item->transportLayerAddress->size);
- return -1;
+ goto ret_error;
}
require_pdp_update = true;
}
@@ -122,6 +123,15 @@
}
return 0;
+ret_error:
+ if (pdp->state != PDP_STATE_CR_CONF) {
+ gsm48_tx_gsm_act_pdp_rej(ctx, pdp->ti, GSM_CAUSE_NET_FAIL,
+ 0, NULL);
+ sgsn_delete_pdp_ctx(pdp);
+ } else {
+ gsm48_tx_gsm_deact_pdp_req(pdp, GSM_CAUSE_NET_FAIL, true);
+ }
+ return -1;
}
int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type,
void *data)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/38436?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I111cc4b17100d2e1ef756b654dc9e98415b3a8bb
Gerrit-Change-Number: 38436
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>