[PATCH] Fix of IMMIDIATE ASSIGNMENT REJECT message

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Andreas Eversberg jolly at eversberg.eu
Thu Feb 7 10:51:16 UTC 2013


The message was corrupt at several points. They are fixed now and
successfully tested.

A default T3122 timer value of 10 is defined by default now. If set to 0,
the reject message will not be sent. Note that when using existing configs
with T3122 value set to 0.
---
 openbsc/include/openbsc/gsm_data.h |    1 +
 openbsc/src/libbsc/abis_rsl.c      |    7 +++++--
 openbsc/src/libcommon/gsm_data.c   |    1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index feb692f..a4c6fbc 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -192,6 +192,7 @@ enum gsm_auth_policy {
 #define GSM_T3101_DEFAULT 10
 #define GSM_T3105_DEFAULT 40
 #define GSM_T3113_DEFAULT 60
+#define GSM_T3122_DEFAULT 10
 
 struct gsm_network {
 	/* global parameters */
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 03ad8da..8aa151b 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1295,7 +1295,7 @@ static int rsl_send_imm_ass_rej(struct gsm_bts *bts,
 	/* create IMMEDIATE ASSIGN REJECT 04.08 message */
 	memset(iar, 0, sizeof(*iar));
 	iar->proto_discr = GSM48_PDISC_RR;
-	iar->msg_type = GSM48_MT_RR_IMM_ASS;
+	iar->msg_type = GSM48_MT_RR_IMM_ASS_REJ;
 	iar->page_mode = GSM48_PM_SAME;
 
 	memcpy(&iar->req_ref1, &rqd_refs[0], sizeof(iar->req_ref1));
@@ -1319,7 +1319,10 @@ static int rsl_send_imm_ass_rej(struct gsm_bts *bts,
 		memcpy(&iar->req_ref4, &rqd_refs[0], sizeof(iar->req_ref4));
 	iar->wait_ind4 = wait_ind;
 
-	return rsl_imm_assign_cmd(bts, sizeof(iar), (uint8_t *) iar);
+	/* 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);
 }
 
 /* MS has requested a channel on the RACH */
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index c9f41fc..dd1d93b 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -97,6 +97,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod
 	net->T3101 = GSM_T3101_DEFAULT;
 	net->T3105 = GSM_T3105_DEFAULT;
 	net->T3113 = GSM_T3113_DEFAULT;
+	net->T3122 = GSM_T3122_DEFAULT;
 	/* FIXME: initialize all other timers! */
 
 	/* default set of handover parameters */
-- 
1.7.3.4


--------------050108030306090500080205--




More information about the OpenBSC mailing list