hnbgw: Introduce test TC_hnb_reregister_reuse_sctp_assoc

Change-Id: I7386bd4e786daf2688a68ab174a9d4f0b093a741
This commit is contained in:
Pau Espin 2022-09-12 13:31:07 +02:00
parent 83a4961753
commit f0b9fa0574
2 changed files with 36 additions and 0 deletions

View File

@ -688,6 +688,18 @@ testcase TC_hnb_register_duplicate() runs on test_CT {
f_shutdown_helper();
}
/* Drop HNBAP conn (HNBAP DEREG) and reconnect it (HNBAP REG) using same SCTP association.
* Related: OS#5676, SYS#6113 */
testcase TC_hnb_reregister_reuse_sctp_assoc() runs on test_CT {
g_num_hnbs := 1;
f_init();
f_hnbap_register(0);
HNBAP[0].send(ts_HNBAP_HNBDe_Register(ts_HnbapCause(unspecified)));
f_hnbap_register(0);
f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1);
f_shutdown_helper();
}
/***********************************************************************
* RUA / RANAP Testing
***********************************************************************/
@ -1368,6 +1380,9 @@ control {
execute(TC_ranap_cs_mo_disconnect());
execute(TC_ranap_ps_mo_disconnect());
execute(TC_ps_rab_assignment());
/* Run at the end since it makes osmo-hnbgw <= 1.3.0 crash: OS#5676 */
execute(TC_hnb_reregister_reuse_sctp_assoc());
}
}

View File

@ -232,4 +232,25 @@ ts_HNBAP_HNBRegisterReject(template (value) Cause cause) := {
}
}
/* 9.1.9 HNB DE-REGISTER */
template (value) HNBAP_PDU
ts_HNBAP_HNBDe_Register(template (value) Cause cause) := {
initiatingMessage := {
procedureCode := id_HNBDe_Register,
criticality := reject,
value_ := {
HNBDe_Register := {
protocolIEs := {
{
id := HNBAP_Constants.id_Cause,
criticality := ignore,
value_ := { Cause := cause }
}
},
protocolExtensions := omit /* TODO: BackoffTimer */
}
}
}
}
}