From 22826ffb6bd2ccb119c168a9cc27747776089741 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 29 Aug 2020 16:22:53 +0700 Subject: [PATCH] abis_rsl: fix IAR Rest Octets in rsl_send_imm_ass_rej() Currently osmo-bsc encodes the IAR Rest Octets as follows: IAR Rest Octets 0... .... = Extended RA: Not Present .0.. .... = Extended RA: Not Present ..1. .... = Extended RA: Present ...0 1011 = Extended_RA: 11 0... .... = Extended RA: Not Present .L.. .... = Additions in Rel-13: Not Present Padding Bits: default padding This is not really critical, but still may look confusing as this is only relevant for the PS domain (11-bit RA), while osmo-bsc is responding to a CHANNEL REQUEST in the CS domain. Change-Id: I30a43efc70345a4bb0571127c239a24422b7fd2c --- src/osmo-bsc/abis_rsl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 6787511f5..d3f7de248 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1305,7 +1305,15 @@ static int rsl_send_imm_ass_rej(struct gsm_bts *bts, /* we need to subtract 1 byte from sizeof(*iar) since ia includes the l2_plen field */ iar->l2_plen = GSM48_LEN2PLEN((sizeof(*iar)-1)); - return rsl_imm_assign_cmd(bts, sizeof(*iar), (uint8_t *) iar); + /* IAR Rest Octets: + * 0... .... = Extended RA: Not Present + * .0.. .... = Extended RA: Not Present + * ..0. .... = Extended RA: Not Present + * ...0 .... = Extended RA: Not Present + * .... L... = Additions in Rel-13: Not Present */ + iar->rest[0] = GSM_MACBLOCK_PADDING & 0x0f; + + return rsl_imm_assign_cmd(bts, sizeof(*iar) + 1, buf); } int rsl_tx_imm_ass_rej(struct gsm_bts *bts, struct gsm48_req_ref *rqd_ref)