From 2f1974b5ac38a6f0a56a0607338f9ffa4c6cc691 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 9 Jan 2014 19:56:37 +0100 Subject: [PATCH] sysmo_l1_if: Fix off-by-one bug when sending UL messages to gsmtap The first byte in data_ind->msgUnitParam.u8Buffer is not part of the GSM frame, but something else, it is also skipped in the call to pcu_rx_data_ind_pdtch(). This patch fixes GSM RLC/MAC UL packet decoding in wireshark, especially ACK/NACK packets are now displayed correctly (amongst others). --- src/sysmo_l1_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysmo_l1_if.c b/src/sysmo_l1_if.c index a3a59c97..b03fad0e 100644 --- a/src/sysmo_l1_if.c +++ b/src/sysmo_l1_if.c @@ -170,8 +170,8 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1h, gsmtap_send(fl1h->gsmtap, data_ind->u16Arfcn | GSMTAP_ARFCN_F_UPLINK, data_ind->u8Tn, GSMTAP_CHANNEL_PACCH, 0, - data_ind->u32Fn, 0, 0, data_ind->msgUnitParam.u8Buffer, - data_ind->msgUnitParam.u8Size); + data_ind->u32Fn, 0, 0, data_ind->msgUnitParam.u8Buffer+1, + data_ind->msgUnitParam.u8Size-1); DEBUGP(DL1IF, "Rx PH-DATA.ind %s (hL2 %08x): %s", get_value_string(femtobts_l1sapi_names, data_ind->sapi),