RANAP Initiating msg: rx and free Security Mode Command
Add the Security Mode Command procedure code to cn_ranap_rx_initiating_msg_co()
and cn_ranap_free_initiating_msg_co(), for hnb-test (see comments in the code).
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index 5ed1a02..06123c1 100644
--- a/src/ranap_common_cn.c
+++ b/src/ranap_common_cn.c
@@ -63,6 +63,11 @@
case RANAP_ProcedureCode_id_RAB_ModifyRequest:
rc = ranap_decode_rab_modifyrequesties(&message->msg.raB_ModifyRequestIEs, &imsg->value);
break;
+ case RANAP_ProcedureCode_id_SecurityModeControl:
+ /* Only an RNC will receive a Security Mode Control as
+ * Initiating Message, in other words: only hnb-test. */
+ rc = ranap_decode_securitymodecommandies(&message->msg.securityModeCommandIEs, &imsg->value);
+ break;
default:
LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP "
"Procedure %s (CO, IM) from RNC, ignoring\n",
@@ -97,6 +102,11 @@
case RANAP_ProcedureCode_id_RAB_ModifyRequest:
ranap_free_rab_modifyrequesties(&message->msg.raB_ModifyRequestIEs);
break;
+ case RANAP_ProcedureCode_id_SecurityModeControl:
+ /* Only an RNC will receive a Security Mode Control as
+ * Initiating Message, in other words: only hnb-test. */
+ ranap_free_securitymodecommandies(&message->msg.securityModeCommandIEs);
+ break;
default:
LOGP(DRANAP, LOGL_NOTICE, "Not freeing suspicious RANAP "
"Procedure %s (CO, IM) from RNC\n",