aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-09-08 19:31:06 +0200
committerpespin <pespin@sysmocom.de>2023-09-12 10:42:48 +0000
commit16ad6c29fe69e201ca51aff9e9a5be2055cfe8da (patch)
tree331fede94c52dcb8a4bfb2c49a8b9e8eef9a9891
parent0267b342900ac41c940206024e2cc54353cc83ee (diff)
LAPDM: Use correct offset to short header on recevied frame
The offset of the short header on main DCCH is 0, not 2. Change-Id: I8345776768fdf2a700b2ca1d117f9ef4b15777cc
-rw-r--r--src/gsm/lapdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 9f795c6d..86dc242c 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -754,7 +754,7 @@ static int l2_ph_data_ind(struct msgb *msg, struct lapdm_entity *le,
msg->l2h += 2;
} else {
/* A Short L3 header has both bits == 0. */
- if (LAPDm_ADDR_SHORT_L2(msg->l2h[2]) == 0) {
+ if (LAPDm_ADDR_SHORT_L2(msg->l2h[0]) == 0) {
mctx.lapdm_fmt = LAPDm_FMT_Bter;
n201 = N201_Bter_SDCCH;
sapi = 0;