Change in libosmocore[master]: bssgp_bvc_fsm: Handle block request from application correctly

2021-01-07 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22029 )

Change subject: bssgp_bvc_fsm: Handle block request from application correctly
..

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
---
M src/gb/bssgp_bvc_fsm.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22029
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3e384b71d57e939efc1596ac1d92380ed5eb916d
Gerrit-Change-Number: 22029
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: bssgp_bvc_fsm: Handle block request from application correctly

2021-01-07 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22029 )

Change subject: bssgp_bvc_fsm: Handle block request from application correctly
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22029
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3e384b71d57e939efc1596ac1d92380ed5eb916d
Gerrit-Change-Number: 22029
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 07 Jan 2021 18:57:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: bssgp_bvc_fsm: Handle block request from application correctly

2021-01-07 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22029 )

Change subject: bssgp_bvc_fsm: Handle block request from application correctly
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22029
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3e384b71d57e939efc1596ac1d92380ed5eb916d
Gerrit-Change-Number: 22029
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Thu, 07 Jan 2021 14:02:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: bssgp_bvc_fsm: Handle block request from application correctly

2021-01-07 Thread daniel
daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22029 )


Change subject: bssgp_bvc_fsm: Handle block request from application correctly
..

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
---
M src/gb/bssgp_bvc_fsm.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/22029/1

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;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22029
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3e384b71d57e939efc1596ac1d92380ed5eb916d
Gerrit-Change-Number: 22029
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-MessageType: newchange