aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-06-28 18:41:27 +0200
committerHarald Welte <laforge@gnumonks.org>2010-06-28 18:41:27 +0200
commita1d39a2a11adfbbcbcc8d98c2c136eebd099bfe0 (patch)
tree57d9bb07ba25d25d5c92173fdf3505aa99ca23f6 /openbsc/src
parent0f43dbcfc6892bf6833a335ab242d17a8da5e319 (diff)
[BSC] fix off-by-one error in computing l2 pseudo-length in IMM ASS
@fingerprint: This caused Motorole EZX phones (Neptune LTE chipset) to discard all immediate assigns and thus be unable to perform location updating.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/abis_rsl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index f5ebb771..cba4f672 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -1249,7 +1249,8 @@ static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
ia->mob_alloc_len = lchan->ts->hopping.ma_len;
memcpy(ia->mob_alloc, lchan->ts->hopping.ma_data, ia->mob_alloc_len);
}
- ia->l2_plen = GSM48_LEN2PLEN(sizeof(*ia) + ia->mob_alloc_len);
+ /* we need to subtract 1 byte from sizeof(*ia) since ia includes the l2_plen field */
+ ia->l2_plen = GSM48_LEN2PLEN((sizeof(*ia)-1) + ia->mob_alloc_len);
/* Start timer T3101 to wait for GSM48_MT_RR_PAG_RESP */
lchan->T3101.cb = t3101_expired;