Change in ...osmo-bts[master]: pcu_sock: fix endian-swapped CellID

osmith gerrit-no-reply at lists.osmocom.org
Thu Aug 29 14:09:24 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-bts/+/15326 )

Change subject: pcu_sock: fix endian-swapped CellID
......................................................................

pcu_sock: fix endian-swapped CellID

Convert the cell identity to LE when sending it to the PCU via unix
socket, just like we do it with the location area code.

In the Osmocom stack, the CellID is configured in OsmoBSC, sent as BE
via RSL to OsmoBTS, then with a socket to OsmoPCU (where OsmoPCU expects
it to be LE in a LE system). OsmoBTS was always sending the CellID as
BE to OsmoPCU. In March 2018, a regression in OsmoPCU [1] caused an
endianness swap in the CellID on LE systems, resulting by chance in the
correct, LE encoded, CellID as it should have been sent from OsmoBSC
(for LE systems). This regression was fixed in March 2019 [2].

I've verified this fix with a TTCN3 test [3].

[1] I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu)
[2] I2f6cc930c5dbf8dac386b24b0756df2efe8199e4 (osmo-pcu)
[3] I6516808f4b9e9a2301f9ccc1e55ded14e7334c33 (osmo-ttcn3-hacks)

Related: OS#3854
Change-Id: I68faf4558f0686fb2a3db24077dceaae05bf0262
---
M src/common/pcu_sock.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 36cc6ed..84a98f5 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -259,7 +259,7 @@
 						bts->si_buf[SYSINFO_TYPE_3];
 		osmo_plmn_from_bcd(si3->lai.digits, &net->plmn);
 		bts->location_area_code = ntohs(si3->lai.lac);
-		bts->cell_identity = si3->cell_identity;
+		bts->cell_identity = ntohs(si3->cell_identity);
 		avail_lai = 1;
 		break;
 	case S_NEW_NSE_ATTR:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I68faf4558f0686fb2a3db24077dceaae05bf0262
Gerrit-Change-Number: 15326
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/8974eca1/attachment.html>


More information about the gerrit-log mailing list