mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-hnodeb.git
				synced 2025-10-31 04:04:10 +00:00 
			
		
		
		
	Generate proper rnc_id and plmn in LuRequest
Change-Id: Ib40b5eb96b7cc13c424076a4ca725019514d52af
This commit is contained in:
		| @@ -30,4 +30,4 @@ void hnb_rx_secmode_cmd(struct hnb *hnb, long ip_alg); | ||||
| void hnb_rua_dt_handle_ranap(struct hnb *hnb, struct ranap_message_s *ranap_msg); | ||||
| void hnb_rua_cl_handle_ranap(struct hnb *hnb, struct ranap_message_s *ranap_msg); | ||||
| void hnb_tx_iu_release_req(struct hnb *hnb); | ||||
| struct msgb *gen_initue_lu(int is_ps, uint32_t conn_id, const char *imsi); | ||||
| struct msgb *gen_initue_lu(const struct hnb *hnb, int is_ps, uint32_t conn_id, const char *imsi); | ||||
|   | ||||
| @@ -110,16 +110,17 @@ void hnb_rua_cl_handle_ranap(struct hnb *hnb, | ||||
| 	} | ||||
| } | ||||
|  | ||||
| struct msgb *gen_initue_lu(int is_ps, uint32_t conn_id, const char *imsi) | ||||
| struct msgb *gen_initue_lu(const struct hnb *hnb, int is_ps, uint32_t conn_id, const char *imsi) | ||||
| { | ||||
| 	uint8_t lu[] = { GSM48_PDISC_MM, GSM48_MT_MM_LOC_UPD_REQUEST, | ||||
| 		         0x70, 0x62, 0xf2, 0x30, 0xff, 0xf3, 0x57, | ||||
| 		/*	 len, IMSI/type, IMSI-------------------------------- */ | ||||
| 			 0x08, 0x29, 0x26, 0x24, 0x10, 0x32, 0x54, 0x76, 0x98, | ||||
| 			 0x33, 0x03, 0x57, 0x18 , 0xb2 }; | ||||
| 	uint8_t plmn_id[] = { 0x09, 0x01, 0x99 }; | ||||
| 	uint8_t plmn_id[3]; | ||||
| 	osmo_plmn_to_bcd(plmn_id, &hnb->plmn); | ||||
| 	RANAP_GlobalRNC_ID_t rnc_id = { | ||||
| 		.rNC_ID = 23, | ||||
| 		.rNC_ID = g_hnb->rnc_id, | ||||
| 		.pLMNidentity.buf = plmn_id, | ||||
| 		.pLMNidentity.size = sizeof(plmn_id), | ||||
| 	}; | ||||
|   | ||||
| @@ -354,7 +354,7 @@ DEFUN(chan, chan_cmd, | ||||
| 	chan->conn_id = conn_id; | ||||
| 	conn_id++; | ||||
|  | ||||
| 	msg = gen_initue_lu(chan->is_ps, chan->conn_id, chan->imsi); | ||||
| 	msg = gen_initue_lu(g_hnb, chan->is_ps, chan->conn_id, chan->imsi); | ||||
| 	rua = rua_new_conn(chan->is_ps, chan->conn_id, msg); | ||||
|  | ||||
| 	hnb_iuh_send(g_hnb, rua); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user