diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-30 17:57:42 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-30 18:34:58 +0200 |
commit | 72e395656d19a3c7b585071f2aea403074652f2b (patch) | |
tree | 1ab1ea07cc6ee95ba3cd314826e87696d66d585c | |
parent | 259532fcf9aee4c00ccd603d9deb34864085b5ef (diff) |
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
-rw-r--r-- | src/pcu_l1_if.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 23f6fbbc..7fa82fb5 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -315,6 +315,7 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind) 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 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind) 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; |