RAB parameters: add Extended Max Bitrate
Adjust test expectation in test-ranap.c.
This IE is seen in a "real life" pcap of hNodeB operation. We did not need it
so far, but add it to test the ip.access nano3G.
Comment from the future: the ip.access nano3G rebooted upon RAB Assignment
Request, and after adding/tweaking some IEs it stopped rebooting. This is one
of the changes that fixed the reboot issue. The changes have been tested
incrementally until reboots vanished, but it's not clear/hasn't been tested
whether omitting this change alone will cause reboots to re-appear.
diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 1305bc2..041e546 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -609,7 +609,21 @@
rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_no_priority, 0, 0, 0);
- /* FIXME: RAB-Parameter-ExtendedMaxBitrateList for 42Mbps? */
+ RANAP_ProtocolExtensionField_t *pxf = CALLOC(1, sizeof(*pxf));
+ pxf->id = RANAP_ProtocolIE_ID_id_RAB_Parameter_ExtendedMaxBitrateList;
+ pxf->criticality = RANAP_Criticality_ignore;
+
+ RANAP_RAB_Parameter_ExtendedMaxBitrateList_t *rab_mbrlist = CALLOC(1, sizeof(*rab_mbrlist));
+ RANAP_ExtendedMaxBitrate_t *xmbr = CALLOC(1, sizeof(*xmbr));
+ *xmbr = 42000000;
+ ASN_SEQUENCE_ADD(&rab_mbrlist->list, xmbr);
+
+ ANY_fromType_aper(&pxf->value, &asn_DEF_RANAP_RAB_Parameter_ExtendedMaxBitrateList, rab_mbrlist);
+
+ ASN_STRUCT_FREE(asn_DEF_RANAP_RAB_Parameter_ExtendedMaxBitrateList, rab_mbrlist);
+
+ rab->iE_Extensions = CALLOC(1, sizeof(*rab->iE_Extensions));
+ ASN_SEQUENCE_ADD(&rab->iE_Extensions->list, pxf);
return rab;
}
diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok
index 63ad1f3..ca5fe03 100644
--- a/src/tests/test-ranap.ok
+++ b/src/tests/test-ranap.ok
@@ -90,7 +90,7 @@
<firstValue>
38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02
80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28
- 14 00 3C 40 00 00 00 50 3D 02 02 00 0D C0 35 00
+ 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00
01 0A 0B 0C 0D 40 00 00 00 01
</firstValue>
<secondCriticality><ignore/></secondCriticality>
@@ -103,20 +103,20 @@
00 00 01 00 35 00 3A 38 02 D8 01 2F A7 20 2F A8
00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14
00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D
- 02 02 00 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00
+ 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00
01 40 01 00
</value>
</RANAP_IE>
-00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 02 00 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00
+00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00
==> RAB ASSIGNMENT COMMAND (DATA)
<RANAP_ProtocolIE-FieldPair>
<id>53</id>
<firstCriticality><reject/></firstCriticality>
<firstValue>
- 38 04 10 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06
- 08 9E 00 04 00 1B 80 35 00 01 1A 1B 1C 1D 00 11
- 22 33 44
+ 38 04 12 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06
+ 08 9E 00 00 00 00 B1 40 05 60 01 8C BA 7F 00 00
+ 10 6E 35 00 01 1A 1B 1C 1D 00 11 22 33 44
</firstValue>
<secondCriticality><ignore/></secondCriticality>
<secondValue>78 1C 00 00 00 00</secondValue>
@@ -125,13 +125,13 @@
<id>54</id>
<criticality><ignore/></criticality>
<value>
- 00 00 01 00 35 00 23 38 04 10 DE 18 69 FF 80 0C
- 34 FF 00 1F 40 08 06 08 9E 00 04 00 1B 80 35 00
- 01 1A 1B 1C 1D 00 11 22 33 44 40 06 78 1C 00 00
- 00 00
+ 00 00 01 00 35 00 2E 38 04 12 DE 18 69 FF 80 0C
+ 34 FF 00 1F 40 08 06 08 9E 00 00 00 00 B1 40 05
+ 60 01 8C BA 7F 00 00 10 6E 35 00 01 1A 1B 1C 1D
+ 00 11 22 33 44 40 06 78 1C 00 00 00 00
</value>
</RANAP_IE>
-00 00 00 39 00 00 01 00 36 40 32 00 00 01 00 35 00 23 38 04 10 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 04 00 1b 80 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00
+00 00 00 44 00 00 01 00 36 40 3d 00 00 01 00 35 00 2e 38 04 12 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 00 00 00 b1 40 05 60 01 8c ba 7f 00 00 10 6e 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00
==> RESET CMD
<RANAP_IE>