aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tests/hnb-test-layers.h1
-rw-r--r--src/tests/hnb-test-ranap.c4
-rw-r--r--src/tests/hnb-test.c20
3 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/hnb-test-layers.h b/src/tests/hnb-test-layers.h
index 7ab273a..ab51ca9 100644
--- a/src/tests/hnb-test-layers.h
+++ b/src/tests/hnb-test-layers.h
@@ -14,3 +14,4 @@ void hnb_test_rua_dt_handle_ranap(struct hnb_test *hnb,
/* RANAP calls main with actual payload*/
void hnb_test_nas_rx_dtap(struct hnb_test *hnb, void *data, int len);
void hnb_test_rx_secmode_cmd(struct hnb_test *hnb, long ip_alg);
+void hnb_test_rx_iu_release(struct hnb_test *hnb);
diff --git a/src/tests/hnb-test-ranap.c b/src/tests/hnb-test-ranap.c
index 4986e98..a3cae29 100644
--- a/src/tests/hnb-test-ranap.c
+++ b/src/tests/hnb-test-ranap.c
@@ -50,5 +50,9 @@ void hnb_test_rua_dt_handle_ranap(struct hnb_test *hnb,
hnb_test_rx_secmode_cmd(hnb, *first_alg);
return;
+
+ case RANAP_ProcedureCode_id_Iu_Release:
+ hnb_test_rx_iu_release(hnb);
+ return;
}
}
diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c
index 603f63b..2e2baf7 100644
--- a/src/tests/hnb-test.c
+++ b/src/tests/hnb-test.c
@@ -357,6 +357,20 @@ static int hnb_test_nas_rx_auth_req(struct hnb_test *hnb, struct gsm48_hdr *gh,
return hnb_test_tx_dt(hnb, gen_nas_auth_resp(vec.sres));
}
+void hnb_test_tx_iu_release_req(struct hnb_test *hnb)
+{
+ RANAP_Cause_t cause = {
+ .present = RANAP_Cause_PR_radioNetwork,
+ .choice.transmissionNetwork = RANAP_CauseRadioNetwork_release_due_to_UE_generated_signalling_connection_release,
+ };
+ hnb_test_tx_dt(hnb, ranap_new_msg_iu_rel_req(&cause));
+}
+
+void hnb_test_tx_iu_release_compl(struct hnb_test *hnb)
+{
+ hnb_test_tx_dt(hnb, ranap_new_msg_iu_rel_compl());
+}
+
static int hnb_test_nas_rx_mm(struct hnb_test *hnb, struct gsm48_hdr *gh, int len)
{
struct hnbtest_chan *chan;
@@ -390,6 +404,7 @@ static int hnb_test_nas_rx_mm(struct hnb_test *hnb, struct gsm48_hdr *gh, int le
case GSM48_MT_MM_INFO:
hnb_test_nas_rx_mm_info(gh, len);
+ hnb_test_tx_iu_release_req(hnb);
return 0;
case GSM48_MT_MM_AUTH_REQ:
@@ -439,6 +454,11 @@ void hnb_test_rx_secmode_cmd(struct hnb_test *hnb, long ip_alg)
hnb_test_tx_dt(hnb, ranap_new_msg_sec_mod_compl(ip_alg, 0));
}
+void hnb_test_rx_iu_release(struct hnb_test *hnb)
+{
+ hnb_test_tx_iu_release_compl(hnb);
+}
+
int hnb_test_hnbap_rx(struct hnb_test *hnb, struct msgb *msg)
{
HNBAP_PDU_t _pdu, *pdu = &_pdu;