Change in osmo-pcu[master]: pcu_l1_if: Fix erroneous endian-swapping of the CellID

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 21 19:08:06 UTC 2019


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


Change subject: pcu_l1_if: Fix erroneous endian-swapping of the CellID
......................................................................

pcu_l1_if: Fix erroneous endian-swapping of the CellID

In Change-Id I787fed84a7b613158a5618dd5cffafe4e4927234 in February 2018
we accidentially introduced a change that would erroneously swap
the endianness of the CellID on the way between PCUIF socket and
BSGSP.  This meant that all OsmoPCU based BTSs would report the
wrong CellId to the SGSN.

Closes: OS#3854
Change-Id: I2f6cc930c5dbf8dac386b24b0756df2efe8199e4
---
M src/pcu_l1_if.cpp
1 file changed, 2 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/69/13369/1

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 27e86dd..b59f198 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -414,7 +414,6 @@
 	int rc = 0;
 	unsigned int trx, ts;
 	int i;
-	uint16_t cell_id = ntohs(info_ind->cell_id);
 
 	if (info_ind->version != PCU_IF_VERSION) {
 		fprintf(stderr, "PCU interface version number of BTS (%d) is "
@@ -445,7 +444,7 @@
 	LOGP(DL1IF, LOGL_DEBUG, " mnc=%0*u\n", info_ind->mnc_3_digits, info_ind->mnc);
 	LOGP(DL1IF, LOGL_DEBUG, " lac=%d\n", info_ind->lac);
 	LOGP(DL1IF, LOGL_DEBUG, " rac=%d\n", info_ind->rac);
-	LOGP(DL1IF, LOGL_DEBUG, " cell_id=%d\n", cell_id);
+	LOGP(DL1IF, LOGL_DEBUG, " cell_id=%d\n", info_ind->cell_id);
 	LOGP(DL1IF, LOGL_DEBUG, " bsic=%d\n", info_ind->bsic);
 	LOGP(DL1IF, LOGL_DEBUG, " nsei=%d\n", info_ind->nsei);
 	LOGP(DL1IF, LOGL_DEBUG, " nse_timer=%d %d %d %d %d %d %d\n",
@@ -496,7 +495,7 @@
 		info_ind->remote_ip[0], info_ind->remote_port[0],
 		info_ind->nsei, info_ind->nsvci[0], info_ind->bvci,
 		info_ind->mcc, info_ind->mnc, info_ind->mnc_3_digits, info_ind->lac, info_ind->rac,
-		cell_id);
+		info_ind->cell_id);
 	if (!pcu) {
 		LOGP(DL1IF, LOGL_NOTICE, "SGSN not available\n");
 		goto bssgp_failed;

-- 
To view, visit https://gerrit.osmocom.org/13369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f6cc930c5dbf8dac386b24b0756df2efe8199e4
Gerrit-Change-Number: 13369
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/20190321/97123202/attachment.html>


More information about the gerrit-log mailing list