fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/38835?usp=email )
Change subject: gprs_gmm_parse_ra_upd_req(): handle unknown IEs gracefully ......................................................................
gprs_gmm_parse_ra_upd_req(): handle unknown IEs gracefully
We should not reject a RAU request if it contains optional IEs that are not known to our implementation. Just ignore them.
Change-Id: I341565cb932d30d953ebd27d6b87f930cd8fa229 Related: SYS#7195 --- M src/sgsn/gprs_gmm_util.c 1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/35/38835/1
diff --git a/src/sgsn/gprs_gmm_util.c b/src/sgsn/gprs_gmm_util.c index 0cf730f..aad61db 100644 --- a/src/sgsn/gprs_gmm_util.c +++ b/src/sgsn/gprs_gmm_util.c @@ -102,10 +102,13 @@ return 0;
ret = tlv_parse(&rau_req->tlv, &gsm48_gmm_ie_tlvdef, - cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); - - if (ret < 0) - return GMM_CAUSE_COND_IE_ERR; + cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); + if (ret < 0) { + LOGP(DMM, LOGL_NOTICE, "%s(): tlv_parse() failed (%d)\n", __func__, ret); + /* gracefully handle unknown IEs (partial parsing) */ + if (ret != OSMO_TLVP_ERR_UNKNOWN_TLV_TYPE) + return GMM_CAUSE_COND_IE_ERR; + }
return 0; }