Commit a99e0270 authored by yangjian's avatar yangjian

Fixed issue showing Amairsoft

parent 1449fc56
......@@ -2261,13 +2261,21 @@ void amf_n1::registration_complete_handle(uint32_t ran_ue_ngap_id,
tt = tt + 8 * 3600; // transform the time zone
tm *t = gmtime(&tt);
uint8_t conf[45] = {0};
uint8_t conf[38] = {0};
uint8_t header[3] = {0x7e, 0x00, 0x54};
uint8_t full_name[18] = {0x43, 0x10, 0x81, 0xc1, 0x76, 0x58,
0x9e, 0x9e, 0xbf, 0xcd, 0x74, 0x90,
0xb3, 0x4c, 0xbf, 0xbf, 0xe5, 0x6b};
uint8_t short_name[11] = {0x45, 0x09, 0x81, 0xc1, 0x76, 0x58,
0x9e, 0x9e, 0xbf, 0xcd, 0x74};
// uint8_t full_name[18] = {0x43, 0x10, 0x81, 0xc1, 0x76, 0x58,
// 0x9e, 0x9e, 0xbf, 0xcd, 0x74, 0x90,
// 0xb3, 0x4c, 0xbf, 0xbf, 0xe5, 0x6b};//"Amarisoft Network"
// uint8_t short_name[11] = {0x45, 0x09, 0x81, 0xc1, 0x76, 0x58,
// 0x9e, 0x9e, 0xbf, 0xcd, 0x74};//"Amarisoft"
// uint8_t full_name[7] = {0x43,0x05,0x81,0xc2, 0x2a, 0x94, 0xfa};//"BUPT"
// uint8_t short_name[7] = {0x45,0x05,0x81,0xc2, 0x2a, 0x94, 0x0a};//"BUPT"
// uint8_t full_name[9] = {0x43,0x07,0x81,0x4f, 0x78, 0xd9, 0x8d, 0x3d, 0x02};//"OpenXG"
// uint8_t short_name[9] = {0x45,0x07,0x81,0x4f, 0x78, 0xd9, 0x8d, 0x3d, 0x02};//"OpenXG"
uint8_t full_name[11] = {0x43,0x09,0x81,0x4f, 0x78, 0xd9, 0x8d, 0x3d, 0x82, 0x40, 0x20};//"OpenXG "
uint8_t short_name[11] = {0x45,0x09,0x81,0x4f, 0x78, 0xd9, 0x8d, 0x3d, 0x82, 0x40,0x20};//"OpenXG "
uint8_t time_zone[2] = {0x46, 0x23};
uint8_t time[8] = {0};
time[0] = 0x47;
......@@ -2280,11 +2288,11 @@ void amf_n1::registration_complete_handle(uint32_t ran_ue_ngap_id,
time[7] = 0x23;
uint8_t daylight[3] = {0x49, 0x01, 0x00};
memcpy(conf, header, 3);
memcpy(conf + 3, full_name, 18);
memcpy(conf + 21, short_name, 11);
memcpy(conf + 32, time_zone, 2);
memcpy(conf + 34, time, 8);
memcpy(conf + 42, daylight, 3);
memcpy(conf + 3, full_name, 11);
memcpy(conf + 14, short_name, 11);
memcpy(conf + 25, time_zone, 2);
memcpy(conf + 27, time, 8);
memcpy(conf + 35, daylight, 3);
std::shared_ptr<nas_context> nc;
if (is_amf_ue_id_2_nas_context(amf_ue_ngap_id))
......@@ -2298,7 +2306,7 @@ void amf_n1::registration_complete_handle(uint32_t ran_ue_ngap_id,
// protect nas message
bstring protectedNas;
encode_nas_message_protected(secu, false, INTEGRITY_PROTECTED_AND_CIPHERED,
NAS_MESSAGE_DOWNLINK, conf, 45, protectedNas);
NAS_MESSAGE_DOWNLINK, conf, 38, protectedNas);
itti_send_dl_nas_buffer_to_task_n2(protectedNas, ran_ue_ngap_id,
amf_ue_ngap_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment