aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-08-27 11:00:52 +0200
committerOliver Smith <osmith@sysmocom.de>2019-08-29 15:44:37 +0200
commitcb57028d52b711dfbc27dacf0b82c5a12f1f71c2 (patch)
treeab1b660e7be991975c6675f9f98894bb1c927152 /src
parentfc917d91bf0f52fb0fca9c750865001b6972e158 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/common/pcu_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 36cc6edf..84a98f5e 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -259,7 +259,7 @@ static int pcu_if_signal_cb(unsigned int subsys, unsigned int signal,
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: