fix SCCPlite BSC tests: send IPA ID ACK, not GET

From libosmo-sccp.git Icffda98579e676ab6ca63c9c22cf5d151c4fe95f on, we expect
an IPA ID ACK upon first connecting, not an IPA ID GET. This might be specific
to the one MSC tested so far, but it's the status quo.

Make the IPA server in IPA_Emulation configurable, to conform and send the IPA
ID ACK upon connecting.  This fixes the ttcn3-bsc-tests,SCCPlite suite, broken
by above libosmo-sccp commit.

For other IPA clients, it is so far required to send the IPA ID GET, so only
configure the SCCPlite server in BSSAP_Adapter.ttcn to send IPA ID ACK, and
leave the others unchanged.

Related: OS#3500 OS#3498
Related: Icffda98579e676ab6ca63c9c22cf5d151c4fe95f (libosmo-sccp)
Change-Id: I34b6296a1a408729802a9659c6524c0f67a2f4fe
This commit is contained in:
Neels Hofmeyr 2018-08-24 14:44:32 +02:00
parent da4a695834
commit 3bf31d216a
2 changed files with 20 additions and 3 deletions

View File

@ -107,7 +107,8 @@ function f_bssap_init(inout BSSAP_Adapter ba, in BSSAP_Configuration cfg, charst
connect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
ba.vc_WAIT.start(IPA_Emulation.waiter_main());
ba.vc_IPA.start(IPA_Emulation.main_server(cfg.sctp_addr.local_ip_addr,
cfg.sctp_addr.local_sctp_port));
cfg.sctp_addr.local_sctp_port,
true, IPA_INIT_SEND_IPA_ID_ACK));
/* wait until we received an IPA CCM ID_ACK */
ba.vc_WAIT.done;
disconnect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);

View File

@ -51,6 +51,11 @@ type enumerated IpaMode {
IPA_MODE_SERVER
}
type enumerated IpaInitBehavior {
IPA_INIT_SEND_IPA_ID_GET,
IPA_INIT_SEND_IPA_ID_ACK
}
type record ASP_IPA_Unitdata {
IpaStreamId streamId,
IpaExtStreamId streamIdExt optional,
@ -165,6 +170,7 @@ type component IPA_Emulation_CT {
var IpaMode g_mode;
var boolean g_ccm_enabled;
var IpaInitBehavior g_init_behavior;
var IPA_CCM_Parameters g_ccm_pars := c_IPA_default_ccm_pars;
}
@ -425,9 +431,12 @@ function main_client(charstring remote_host, IPL4asp_Types.PortNumber remote_por
/* main function to use for a server-side IPA implementation */
function main_server(charstring local_host, IPL4asp_Types.PortNumber local_port,
boolean ccm_enabled := true) runs on IPA_Emulation_CT {
boolean ccm_enabled := true,
IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET)
runs on IPA_Emulation_CT {
g_mode := IPA_MODE_SERVER;
g_ccm_enabled := ccm_enabled;
g_init_behavior := init_behavior;
f_bind(local_host, local_port);
ScanEvents();
}
@ -566,7 +575,14 @@ private function ScanEvents() runs on IPA_Emulation_CT {
g_ipa_conn_id := asp_evt.connOpened.connId;
f_send_IPA_EVT(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP));
if (g_mode == IPA_MODE_SERVER and g_ccm_enabled) {
f_ccm_tx(valueof(ts_IPA_ID_GET));
select (g_init_behavior) {
case (IPA_INIT_SEND_IPA_ID_GET) {
f_ccm_tx(valueof(ts_IPA_ID_GET));
}
case (IPA_INIT_SEND_IPA_ID_ACK) {
f_ccm_tx(valueof(ts_IPA_ACK));
}
}
}
}