Change in osmo-pcu[master]: Set correct GSMTAP channel type for PDTCH messages returning error

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 30 16:37:01 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/19068 )


Change subject: Set correct GSMTAP channel type for PDTCH messages returning error
......................................................................

Set correct GSMTAP channel type for PDTCH messages returning error

For instance, that may happen because the len of the message is not
filling the expect size (because padding is missing for example). Still,
in this case we know the channel type, so we set it so that wireshark
tries to decode the message as a data one.

Change-Id: Ifea94095d669b528874e64ca823a776cd6e22b4b
---
M src/pcu_l1_if.cpp
1 file changed, 5 insertions(+), 1 deletion(-)



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

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 23f6fbb..7fa82fb 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -315,6 +315,7 @@
 	int rc;
 	int current_fn = get_current_fn();
 	pcu_l1_meas meas;
+	uint8_t gsmtap_chantype;
 
 	LOGP(DL1IF, LOGL_DEBUG, "Data indication received: sapi=%d arfcn=%d "
 		"fn=%d cur_fn=%d block=%d data=%s\n", data_ind->sapi,
@@ -335,19 +336,22 @@
 		rc = pcu_rx_data_ind_pdtch(data_ind->trx_nr, data_ind->ts_nr,
 			data_ind->data, data_ind->len, data_ind->fn,
 			&meas);
+		gsmtap_chantype = GSMTAP_CHANNEL_PDTCH;
 		break;
 	case PCU_IF_SAPI_BCCH:
 		rc = pcu_rx_data_ind_bcch(data_ind->data, data_ind->len);
+		gsmtap_chantype = GSMTAP_CHANNEL_BCCH;
 		break;
 	default:
 		LOGP(DL1IF, LOGL_ERROR, "Received PCU data indication with "
 			"unsupported sapi %d\n", data_ind->sapi);
 		rc = -EINVAL;
+		gsmtap_chantype = GSMTAP_CHANNEL_UNKNOWN;
 	}
 
 	if (rc < 0 && (bts->gsmtap_categ_mask & (1 <<PCU_GSMTAP_C_UL_UNKNOWN))) {
 		gsmtap_send(bts->gsmtap, data_ind->arfcn | GSMTAP_ARFCN_F_UPLINK, data_ind->ts_nr,
-			    GSMTAP_CHANNEL_UNKNOWN, 0, data_ind->fn, meas.rssi, meas.link_qual, data_ind->data, data_ind->len);
+			    gsmtap_chantype, 0, data_ind->fn, meas.rssi, meas.link_qual, data_ind->data, data_ind->len);
 	}
 
 	return rc;

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ifea94095d669b528874e64ca823a776cd6e22b4b
Gerrit-Change-Number: 19068
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200630/3afc1d12/attachment.htm>


More information about the gerrit-log mailing list