BSSGP_Emulation: Include NSEI in BsgpStatusIndication for PTP BVC

Change-Id: I0d8f18d0e6438a98c75ff24e2a9c8136d8b417d2
This commit is contained in:
Harald Welte 2020-11-24 23:12:31 +01:00
parent 3807ed1286
commit fba7afdd89
1 changed files with 6 additions and 4 deletions

View File

@ -204,7 +204,7 @@ function BssgpStart(BssgpConfig cfg, charstring id) runs on BSSGP_CT {
/* create, connect and start the BVC component */
var BSSGP_BVC_CT bvc_ct := BSSGP_BVC_CT.create(bvc_id);
connect(bvc_ct:BVC, self:BVC);
bvc_ct.start(f_bssgp_bvc_main(bvc_cfg, g_cfg.sgsn_role, bvc_id));
bvc_ct.start(f_bssgp_bvc_main(bvc_cfg, g_cfg.sgsn_role, g_cfg.nsei, bvc_id));
/* populate the BVC state table */
BvcTable[i] := {
bvci := bvc_cfg.bvci,
@ -631,6 +631,7 @@ type component BSSGP_BVC_CT {
var BssgpBvcConfig g_cfg;
var boolean g_sgsn_role;
var Nsei g_nsei;
/* default Link Selector Parameter for this BVC (for traffic unrelated to a TLLI) */
var integer g_bvc_lsp;
@ -1227,8 +1228,9 @@ private function f_bssgp_bvc_ScanEvents() runs on BSSGP_BVC_CT {
}
/* main function for per-BVC Component */
private function f_bssgp_bvc_main(BssgpBvcConfig cfg, boolean sgsn_role, charstring id) runs on BSSGP_BVC_CT {
private function f_bssgp_bvc_main(BssgpBvcConfig cfg, boolean sgsn_role, Nsei nsei, charstring id) runs on BSSGP_BVC_CT {
g_cfg := cfg;
g_nsei := nsei;
g_bvc_lsp := cfg.bvci;
g_sgsn_role := sgsn_role;
f_bssgp_bvc_ScanEvents();
@ -1263,11 +1265,11 @@ private function f_ptp_change_state(BvcState new_state) runs on BSSGP_BVC_CT {
log("BVCI(", g_cfg.bvci, ") State Transition: ", g_ptp_bvc_state, " -> ", new_state);
g_ptp_bvc_state := new_state;
if (MGMT.checkstate("Connected")) {
MGMT.send(ts_BssgpStsInd(omit, g_cfg.bvci, g_ptp_bvc_state));
MGMT.send(ts_BssgpStsInd(g_nsei, g_cfg.bvci, g_ptp_bvc_state));
}
for (var integer i := 0; i < sizeof(ClientTable); i := i+1) {
if (isbound(ClientTable[i].comp_ref) and ClientTable[i].comp_ref != null) {
BSSGP_SP.send(ts_BssgpStsInd(omit, g_cfg.bvci, g_ptp_bvc_state)) to ClientTable[i].comp_ref;
BSSGP_SP.send(ts_BssgpStsInd(g_nsei, g_cfg.bvci, g_ptp_bvc_state)) to ClientTable[i].comp_ref;
}
}
}