pespin submitted this change.
abis_osmo: Fix reading Abis IPA OSMO_EXT type
The l2 buffer points to the IPA payload, not the the ext type.
This was probably not the case during initial development of the stack,
but it is since a while ago, to be inline with usual behavior of ipa
handling.
This patch fixes BTS_Tests_OML.TC_ipa_osmo_pcu_anr_fwd failure.
Change-Id: I4941d28b2416a70e61d2881e8ebc556c5421256c
---
M src/common/abis_osmo.c
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/common/abis_osmo.c b/src/common/abis_osmo.c
index beb9992..eb764d5 100644
--- a/src/common/abis_osmo.c
+++ b/src/common/abis_osmo.c
@@ -111,24 +111,12 @@
/* incoming IPA/OSMO extension Abis message from BSC */
int down_osmo(struct gsm_bts *bts, struct msgb *msg)
{
- uint8_t *type;
-
- if (msgb_l2len(msg) < 1) {
- oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
- "OSMO message too short\n");
- msgb_free(msg);
- return -EIO;
- }
-
- type = msgb_l2(msg);
- msg->l2h = type + 1;
-
- switch (*type) {
+ switch (osmo_ipa_msgb_cb_proto_ext(msg)) {
case IPAC_PROTO_EXT_PCU:
return rx_down_osmo_pcu(bts, msg);
default:
oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
- "OSMO message unknown extension %u\n", *type);
+ "OSMO message unknown extension %u\n", osmo_ipa_msgb_cb_proto_ext(msg));
msgb_free(msg);
return -EIO;
}
To view, visit change 41776. To unsubscribe, or for help writing mail filters, visit settings.