This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15321 Change subject: gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE ...................................................................... gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE This is a bit of a hack, as we want to maintain binary compatibility without breaking existing users of libosmocore. To do so, we use the 'num_auth_vectors' field in two ways now: * In the existing use case as part of SEND_AUTH_INFO_RESPONSE, it indicates the number of vectors stored in the 'auth_vectors' field * In the new use case as part of SEND_AUTH_INFO_REQUEST, it indicates the number of vectors actually requested by the MSC/SGSN/MME. Change-Id: Iaecc47280f8ce54f3e3a888c1cfc160735483d0f --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c 2 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/15321/1 diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index fded89b..eff10f4 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -106,6 +106,7 @@ OSMO_GSUP_IMEI_IE = 0x50, OSMO_GSUP_IMEI_RESULT_IE = 0x51, + OSMO_GSUP_NUM_VECTORS_REQ_IE = 0x52, /* Inter-MSC handover related */ OSMO_GSUP_SOURCE_NAME_IE = 0x60, diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index 80ebcb2..f400002 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -564,6 +564,11 @@ gsup_msg->cause_sm = value[0]; break; + case OSMO_GSUP_NUM_VECTORS_REQ_IE: + if (gsup_msg->message_type == OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST) + gsup_msg->num_auth_vectors = value[0]; + break; + default: LOGP(DLGSUP, LOGL_NOTICE, "GSUP IE type %d unknown\n", iei); @@ -748,12 +753,17 @@ } } - for (idx = 0; idx < gsup_msg->num_auth_vectors; idx++) { - const struct osmo_auth_vector *auth_vector; + if (gsup_msg->message_type == OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST) { + uint8_t num = gsup_msg->num_auth_vectors; + msgb_tlv_put(msg, OSMO_GSUP_NUM_VECTORS_REQ_IE, 1, &num); + } else { + for (idx = 0; idx < gsup_msg->num_auth_vectors; idx++) { + const struct osmo_auth_vector *auth_vector; - auth_vector = &gsup_msg->auth_vectors[idx]; + auth_vector = &gsup_msg->auth_vectors[idx]; - encode_auth_info(msg, OSMO_GSUP_AUTH_TUPLE_IE, auth_vector); + encode_auth_info(msg, OSMO_GSUP_AUTH_TUPLE_IE, auth_vector); + } } if (gsup_msg->auts) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaecc47280f8ce54f3e3a888c1cfc160735483d0f Gerrit-Change-Number: 15321 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at gnumonks.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/48acba48/attachment.htm>