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/12871 Change subject: OML: Reject segmented OML messages ...................................................................... OML: Reject segmented OML messages TS 12.21 describes segmenting of OML messages using placement fist/middle/last and the "sequence' number of the OML header. We don't implement this and hence must ignore or reject any related messages. Before this patch however, we simply treated such segments as if they were a complete OML message. Let's fix that. Change-Id: Idd42cf4edc1bf9ab366853bd9b0f7afd9c060910 Closes: OS#3795 --- M src/common/oml.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/12871/1 diff --git a/src/common/oml.c b/src/common/oml.c index 4dfaaf4..2ae5af5 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1422,13 +1422,21 @@ struct abis_om_hdr *oh = msgb_l2(msg); int ret = 0; - if (msgb_l2len(msg) < 1) { + if (msgb_l2len(msg) < sizeof(*oh)) { LOGP(DOML, LOGL_NOTICE, "OML message too short\n"); msgb_free(msg); return -EIO; } msg->l3h = (unsigned char *)oh + sizeof(*oh); + /* We don't implement de-segmentation of segmented OML messages */ + if (oh->placement != ABIS_OM_PLACEMENT_ONLY || oh->sequence != 0) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Unsupported segmented O&M message\n"); + msgb_free(msg); + return -EIO; + } + switch (oh->mdisc) { case ABIS_OM_MDISC_FOM: if (msgb_l2len(msg) < sizeof(*oh)) { -- To view, visit https://gerrit.osmocom.org/12871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idd42cf4edc1bf9ab366853bd9b0f7afd9c060910 Gerrit-Change-Number: 12871 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/20190209/f6abb2ff/attachment.htm>