bssgp_bvc_fsm: Handle block request from application correctly
This is no event from an incoming message so rx is NULL, and we can't send a
status PDU. Also blocking the signalling BVC is not allowed (unblocking it is already
forbidden).
Change-Id: I3e384b71d57e939efc1596ac1d92380ed5eb916d
Fixes: CID#215716
diff --git a/src/gb/bssgp_bvc_fsm.c b/src/gb/bssgp_bvc_fsm.c
index cc634a5..6de0028 100644
--- a/src/gb/bssgp_bvc_fsm.c
+++ b/src/gb/bssgp_bvc_fsm.c
@@ -456,7 +456,10 @@
case BSSGP_BVCFSM_E_REQ_BLOCK:
if (bfp->role_sgsn) {
LOGPFSML(fi, LOGL_ERROR, "SGSN may not initiate BVC-BLOCK\n");
- _tx_status(fi, BSSGP_CAUSE_SEM_INCORR_PDU, rx);
+ break;
+ }
+ if (bfp->bvci == 0) {
+ LOGPFSML(fi, LOGL_ERROR, "BVCI 0 cannot be blocked\n");
break;
}
bfp->locally_blocked = true;