BSSGP_Emulation: Send BssgpResetIndication when PTP BVC are being reset

This notifies the user via the MGMT port about the fact that an inbound
BVC-RESET procedure just happened.

Change-Id: I54d0d5e0e06a330a90dfb1da06062d65022efe81
This commit is contained in:
Harald Welte 2020-11-26 20:56:09 +01:00
parent 52cecbb340
commit 3c90515272
2 changed files with 9 additions and 0 deletions

View File

@ -384,6 +384,9 @@ function f_init() runs on test_CT {
[] SGSN_MGMT.receive(BssgpStatusIndication:{*, ?, ?}) {
repeat;
}
[] SGSN_MGMT.receive(BssgpResetIndication:?) {
repeat;
}
[] SGSN_MGMT.receive {
setverdict(fail, "Received unexpected message on SGSN_MGMT");
mtc.stop;

View File

@ -1157,6 +1157,9 @@ private altstep as_ptp_handle_inbound_reset() runs on BSSGP_BVC_CT {
/* we are a SGSN: BSS/PCU-originated RESET must have a cell ID */
[g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {
log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
if (MGMT.checkstate("Connected")) {
MGMT.send(BssgpResetIndication:{g_cfg.bvci});
}
/* Respond to RESET with correct BVCI but without CellID */
BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, omit), 0, g_bvc_lsp));
/* FIXME: reset all state? What about clients? */
@ -1165,6 +1168,9 @@ private altstep as_ptp_handle_inbound_reset() runs on BSSGP_BVC_CT {
/* we are a BSS/PCU: SGSN-originated RESET must not have a cell ID */
[not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, omit), 0)) -> value udi {
log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
if (MGMT.checkstate("Connected")) {
MGMT.send(BssgpResetIndication:{g_cfg.bvci});
}
/* Respond to RESET with correct BVCI with CellID */
BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0, g_bvc_lsp));
/* FIXME: reset all state? What about clients? */