Change in osmo-bts[master]: OML: Return attributes in ACK/NACK messages

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.org
Fri Feb 8 21:28:06 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/12863


Change subject: OML: Return attributes in ACK/NACK messages
......................................................................

OML: Return attributes in ACK/NACK messages

As per 3GPP TS 12.21 Section 8.2 "ACK messages shall return all the
attributes in the original message". OsmoBTS fails to do so but simply
sends no attributes at all in the ACK.

TS 12.21 is a bit vague whether or not the attributes shall also be
achoed in the NACK.  Let's do it and append the CAUSE in this case.

Closes: OS#3788
Change-Id: Ifb305fe75f8305bb04872f26492b8b1bb8c27f49
---
M src/common/oml.c
1 file changed, 5 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/63/12863/1

diff --git a/src/common/oml.c b/src/common/oml.c
index ce59865..0424c58 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -425,26 +425,19 @@
  * contained in 'msg'. ACK is sent if cause == 0; NACK otherwise */
 int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause)
 {
-	struct abis_om_hdr *old_oh = msgb_l2(old_msg);
-	struct abis_om_fom_hdr *old_foh = msgb_l3(old_msg);
 	struct msgb *msg;
 	struct abis_om_fom_hdr *foh;
-	int is_manuf = 0;
 
-	msg = oml_msgb_alloc();
+	msg = msgb_copy(old_msg, "OML_fom_ack_nack");
 	if (!msg)
 		return -ENOMEM;
 
-	/* make sure to respond with MANUF if request was MANUF */
-	if (old_oh->mdisc == ABIS_OM_MDISC_MANUF)
-		is_manuf = 1;
+	/* remove any l2/l1 that may be present in copy */
+	msgb_pull_to_l2(msg);
 
 	msg->trx = old_msg->trx;
 
-	/* copy over old FOM-Header and later only change the msg_type */
-	msg->l3h = msgb_push(msg, sizeof(*foh));
 	foh = (struct abis_om_fom_hdr *) msg->l3h;
-	memcpy(foh, old_foh, sizeof(*foh));
 
 	/* alter message type */
 	if (cause) {
@@ -458,7 +451,8 @@
 		foh->msg_type++; /* ack */
 	}
 
-	return oml_send_msg(msg, is_manuf);
+	/* we cannot use oml_send_msg() as we already have the OML header */
+	return abis_oml_sendmsg(msg);
 }
 
 /*

-- 
To view, visit https://gerrit.osmocom.org/12863
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: Ifb305fe75f8305bb04872f26492b8b1bb8c27f49
Gerrit-Change-Number: 12863
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/20190208/fd253887/attachment.htm>


More information about the gerrit-log mailing list