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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Mar 27 07:39:02 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I2f6cc930c5dbf8dac386b24b0756df2efe8199e4
Gerrit-Change-Number: 13369
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/4366093d/attachment.html>


More information about the gerrit-log mailing list