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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/10292 Change subject: Revert "ipa: Properly parse LV stream of a ID_GET request" ...................................................................... Revert "ipa: Properly parse LV stream of a ID_GET request" This reverts commit f558ed4bb9c0f00997b8f97c2b251a574c1a64c4. It introduced a function/behavior that was not originally intended: The parse of IPA CCM ID GET (8bit length followed by 1 byte tag and variable-length payload) instead of the IPA CCM ID RESP (16bit length followed by 1 byte tag and variable-length payload). Change-Id: I0b964140a43ab39351be0d9c710b8ef2e87a5d9a --- M src/gsm/ipa.c 1 file changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/10292/1 diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index aecde83..989e439 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -100,11 +100,6 @@ int ipa_ccm_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len) { - return ipa_ccm_idtag_parse_off(dec, buf, len, 0); -} - -int ipa_ccm_idtag_parse_off(struct tlv_parsed *dec, unsigned char *buf, int len, const int len_offset) -{ uint8_t t_len; uint8_t t_tag; uint8_t *cur = buf; @@ -116,11 +111,6 @@ t_len = *cur++; t_tag = *cur++; - if (t_len < len_offset) { - LOGP(DLMI, LOGL_ERROR, "minimal offset not included: %d < %d\n", t_len, len_offset); - return -EINVAL; - } - if (t_len > len + 1) { LOGP(DLMI, LOGL_ERROR, "The tag does not fit: %d > %d\n", t_len, len + 1); return -EINVAL; @@ -128,11 +118,11 @@ DEBUGPC(DLMI, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); - dec->lv[t_tag].len = t_len - len_offset; + dec->lv[t_tag].len = t_len; dec->lv[t_tag].val = cur; - cur += t_len - len_offset; - len -= t_len - len_offset; + cur += t_len; + len -= t_len; } return 0; } -- To view, visit https://gerrit.osmocom.org/10292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0b964140a43ab39351be0d9c710b8ef2e87a5d9a Gerrit-Change-Number: 10292 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180801/4097aecb/attachment.htm>