BSSGP_Emulation: Handle incoming BVCI=0 messages

Like BVCI=PTP, the BVCI=0 messages must be dispatched by their
TLLI, but using the BSSGP_SP_SIG port instead of BSSGP_SP.

Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
This commit is contained in:
Harald Welte 2019-03-21 21:30:47 +01:00
parent 0466d16d42
commit 001b0dad5f
1 changed files with 21 additions and 1 deletions

View File

@ -532,7 +532,7 @@ altstep as_unblocked() runs on BSSGP_CT {
BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn;
}
/* Any other BSSGP message: If it has TLLi, route to component; otherwise broadcast */
/* Any other PTP BSSGP message: If it has TLLi, route to component; otherwise broadcast */
[] BSCP.receive(f_BnsUdInd(?, g_cfg.bvci)) -> value udi {
var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
@ -551,6 +551,26 @@ altstep as_unblocked() runs on BSSGP_CT {
}
}
/* Any other SIG BSSGP message: If it has TLLi, route to component; otherwise broadcast */
[] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi {
var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
if (isvalue(tlli)) {
vc_conn := f_tbl_comp_by_tlli(valueof(tlli));
BSSGP_SP_SIG.send(dec) to vc_conn;
} else {
log("No TLLI: Broadcasting ", dec);
/* broadcast this message to all components */
// TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) to all component;"
for (var integer i := 0; i < sizeof(ClientTable); i := i+1) {
if (isbound(ClientTable[i].comp_ref)) {
BSSGP_SP_SIG.send(dec) to ClientTable[i].comp_ref;
}
}
}
}
[] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn {
BSCP.send(f_BnsUdReq(bs_pdu, 0));
}