Change in osmo-gsm-manuals[master]: WIP: add ns2 docs

2021-06-15 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/24687 )

Change subject: WIP: add ns2 docs
..


Patch Set 1:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/24687
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I5571001a127c933397a4bc26e85410288d50fc2f
Gerrit-Change-Number: 24687
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: daniel 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 15 Jun 2021 21:54:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: WIP: add ns2 docs

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/24687 )


Change subject: WIP: add ns2 docs
..

WIP: add ns2 docs

Change-Id: I5571001a127c933397a4bc26e85410288d50fc2f
---
A common/chapters/gb-ns2-maintainance.adoc
A common/chapters/gb-ns2-nsvc-states-alive.dot
A common/chapters/gb-ns2-nsvc-states-reset-block.dot
3 files changed, 123 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/87/24687/1

diff --git a/common/chapters/gb-ns2-maintainance.adoc 
b/common/chapters/gb-ns2-maintainance.adoc
new file mode 100644
index 000..e16fa63
--- /dev/null
+++ b/common/chapters/gb-ns2-maintainance.adoc
@@ -0,0 +1,108 @@
+=== Gb/NS maintaince
+
+This section describes common maintance procedures.
+
+ NSE states
+
+A NSE can have the following states:
+- ALIVE
+- DEAD
+
+For FR, IPA: The NSE is ALIVE if there is at least one NSVC in state UNBLOCKED.
+For IP-SNS/UDP: The NSE is ALIVE if there is at least one NSVC ALIVE and the 
sum of all ALIVE NSVCs signalling weights > 0 and data weights > 0.
+
+The state of the NSE is shown by vty.
+
+.show ns
+
+GbProxy# show ns nsei 1234
+NSEI 01234: UDP, DEAD <1>
+ FSM Instance Name: 'GPRS-NS2-SNS-BSS(NSE01234-SNS)[0x612012a0]', ID: 
'NSE01234-SNS'
+  Log-Level: 'DEBUG', State: 'BSS_SIZE'
+  Timer: 1
+ Maximum number of remote  NS-VCs: 8192, IPv4 Endpoints: 8192, IPv6 Endpoints: 
8192
+  1 NS-VC:
+   NSVCI none: DISABLED DYNAMIC data_weight=1 sig_weight=1 
udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
+
+<1> NSE state
+
+ NSVC states
+
+A NSVC can have the following states:
+
+- DISABLED
+- RESET
+- BLOCKED
+- UNBLOCKED
+- RECOVERING
+
+.nsvc states
+[options="header"]
+|=
+| State | transport UNITDATA | Description
+
+| DISABLED| No   | Either the transport layer is unavailable (FR) or 
this NSVC is currently used by IP-SNS dynamic configuration.
+| RESET   | No   | Sending out RESET PDU and awaiting data.
+| BLOCKED  | No*  | The NSVC has been BLOCKED. * see 3GPP TS 48.016 § 
7.2 exception
+| UNBLOCKED/ALIVE  | Yes  | The NSVC transport UNITDATA.
+| RECOVERING   | No   | The NSVC test procedure timed out. NSVC type is a 
IP-SNS which don't use RESET/BLOCK/UNBLOCK.
+
+|=
+
+[[fig-nsvc-states-reset-block]]
+.Simplified state diagram for RESET BLOCK UNBLOCK NSVCs
+[graphviz]
+
+include::gb-ns2-nsvc-states-reset-block.dot[]
+
+
+[[fig-nsvc-states-reset-block]]
+.Simplified state diagram for IP-SNS/UDP
+[graphviz]
+
+include::gb-ns2-nsvc-states-alive.dot[]
+
+
+ Show information of a specific NSE
+
+The NSE 1234 has been configured for as BSS with IP-SNS configuration.
+
+.show ns on a dynamic configured IP-SNS NSE
+
+GbProxy# show ns nsei 1234
+NSEI 01234: UDP, DEAD <1>
+ FSM Instance Name: 'GPRS-NS2-SNS-BSS(NSE01234-SNS)[0x612012a0]', ID: 
'NSE01234-SNS'
+  Log-Level: 'DEBUG', State: 'BSS_SIZE' <2>
+  Timer: 1
+ Maximum number of remote  NS-VCs: 8192, IPv4 Endpoints: 8192, IPv6 Endpoints: 
8192
+  1 NS-VC:
+   NSVCI none: DISABLED DYNAMIC data_weight=1 sig_weight=1 
udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
+
+<1> A UDP NSE. A NSE can be ALIVE or DEAD
+<2> The SNS state. CONFIGURED and LOCAL_PROCEDURE are ALIVE states
+
+For FR, IPA: The NSE is ALIVE if there is at least one NSVC in state UNBLOCKED.
+For IP-SNS/UDP: The NSE is alive if there is at least one NSVC ALIVE and the 
summary of all NSVC signalling weights > 1 and data weights > 1.
+
+.show ns on a frame relay NSE
+
+OsmoNSdummy# show ns nsei 02001
+NSEI 02001: FR, ALIVE <1>
+  4 NS-VC:
+   NSVCI 1: DISABLED PERSIST data_weight=1 sig_weight=1 fr)netif: hdlcnet1 
dlci: 16 <2>
+   NSVCI 2: DISABLED PERSIST data_weight=1 sig_weight=1 fr)netif: hdlcnet2 
dlci: 17 <3>
+   NSVCI 3: DISABLED PERSIST <4> data_weight=1 sig_weight=1 fr)netif: 
hdlcnet3 dlci: 18
+   NSVCI 4: DISABLED PERSIST data_weight=1 sig_weight=1 fr)netif: hdlcnet4 
dlci: 19
+
+<1> A FR NSE. A NSE can be ALIVE or DEAD
+<2> An unblocked NS-VC will be used for data and signalling. data and 
signalling weight are only relevant for UDP NSVC.
+<3> NSVC is still blocked.
+<4> A PERSIST NSVC is a configured via VTY.
+
+ Blocking a NSVC
+
+To block a single NSVC
+
+
+
+
diff --git a/common/chapters/gb-ns2-nsvc-states-alive.dot 
b/common/chapters/gb-ns2-nsvc-states-alive.dot
new file mode 100644
index 000..7e919c1
--- /dev/null
+++ b/common/chapters/gb-ns2-nsvc-states-alive.dot
@@ -0,0 +1,6 @@
+
+digraph G {
+   DISABLED -> ALIVE;
+   ALIVE -> RECOVERING [label="test procedure timeout"];
+   RECOVERING -> ALIVE [label="test procedure success"];
+}
diff --git a/common/chapters/gb-ns2-nsvc-states-reset-block.dot 

Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24686 )


Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
..

gprs_ns2_vty: dump_nsvc: change output depending on NSVCI

If the NSVCI is valid, there is no signalling or data weight defined 
(internally this is 1).
For NSVC with NSVCI don't print the signalling or data weight.
For NSVC without NSVCI, don't print NSVCI at all.

Related: OS#5180
Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc
---
M src/gb/gprs_ns2_vty.c
1 file changed, 9 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/24686/1

diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 819e0c8..4932b68 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1873,18 +1873,17 @@
 /* non-config commands */
 void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
 {
-   char nsvci_str[32];
-
if (nsvc->nsvci_is_valid)
-   snprintf(nsvci_str, sizeof(nsvci_str), "%05u", nsvc->nsvci);
+   vty_out(vty, "   NSVCI %05u: %s %s %s%s", nsvc->nsvci,
+   osmo_fsm_inst_state_name(nsvc->fi),
+   nsvc->persistent ? "PERSIST" : "DYNAMIC",
+   gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
else
-   snprintf(nsvci_str, sizeof(nsvci_str), "none");
-
-   vty_out(vty, "   NSVCI %s: %s %s data_weight=%u sig_weight=%u %s%s", 
nsvci_str,
-   osmo_fsm_inst_state_name(nsvc->fi),
-   nsvc->persistent ? "PERSIST" : "DYNAMIC",
-   nsvc->data_weight, nsvc->sig_weight,
-   gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
+   vty_out(vty, "   %s %s sig_weight=%u data_weight=%u %s%s",
+   osmo_fsm_inst_state_name(nsvc->fi),
+   nsvc->persistent ? "PERSIST" : "DYNAMIC",
+   nsvc->sig_weight, nsvc->data_weight,
+   gprs_ns2_ll_str(nsvc), VTY_NEWLINE);

if (stats) {
vty_out_rate_ctr_group(vty, "", nsvc->ctrg);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc
Gerrit-Change-Number: 24686
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: sgsn a54 tests

2021-06-15 Thread Hoernchen
Hello Jenkins Builder, pespin, dexter,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24629

to look at the new patch set (#2).

Change subject: sgsn a54 tests
..

sgsn a54 tests

This adds a few tests that ensure that the encryption algorithm dynamically 
chosen is
1) one actually supported by both the sgsn and the UE
2) the strongest one available both have in common

Change-Id: Iad65cbf9840aa883cb34e53554b94a4142c82638
Related: SYS#5324
---
M sgsn/SGSN_Tests.ttcn
M sgsn/expected-results.xml
2 files changed, 127 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/24629/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24629
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iad65cbf9840aa883cb34e53554b94a4142c82638
Gerrit-Change-Number: 24629
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gprs_ns2_vc_fsm: rename state UNCONFIGURED -> DISABLED

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24685 )


Change subject: gprs_ns2_vc_fsm: rename state UNCONFIGURED -> DISABLED
..

gprs_ns2_vc_fsm: rename state UNCONFIGURED -> DISABLED

Original the state was only used as initial state and should be left
immediate afterwards. However as the FR and SNS are using this state
and the vty will also show it to the user, use a non-confusion state.

Related: OS#5180
Change-Id: I5f46ce5e27d7556d5e17bc236f1765d42aecbe0c
---
M src/gb/gprs_ns2_fr.c
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_sns.c
M src/gb/gprs_ns2_vc_fsm.c
M src/gb/gprs_ns2_vty.c
5 files changed, 27 insertions(+), 27 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/24685/1

diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index 3113b00..bbc5361 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -189,7 +189,7 @@
if (active) {
ns2_vc_fsm_start(nsvc);
} else {
-   ns2_vc_force_unconfigured(nsvc);
+   ns2_vc_force_disabled(nsvc);
}
 }

diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 70e212a..e77731b 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -409,7 +409,7 @@
 struct osmo_fsm_inst *ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc,
const char *id, bool initiate);
 int ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc);
-int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc);
+int ns2_vc_force_disabled(struct gprs_ns2_vc *nsvc);
 int ns2_vc_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed 
*tp);
 int ns2_vc_is_alive(struct gprs_ns2_vc *nsvc);
 int ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc);
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 367f77c..ea90846 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -2286,7 +2286,7 @@
/* keep the NSVC we need for SNS, but 
unconfigure it */
nsvc->sig_weight = 0;
nsvc->data_weight = 0;
-   ns2_vc_force_unconfigured(nsvc);
+   ns2_vc_force_disabled(nsvc);
} else {
/* free all other NS-VCs */
gprs_ns2_free_nsvc(nsvc);
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 05118b2..36bb3a9 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -76,10 +76,10 @@
 /* The FSM covers both the VC with RESET/BLOCK and without RESET/BLOCK 
procedure..
  *
  * With RESET/BLOCK, the state should follow:
- * - UNCONFIGURED -> RESET -> BLOCK -> UNBLOCKED
+ * - DISABLED -> RESET -> BLOCK -> UNBLOCKED
  *
  * Without RESET/BLOCK, the state should follow:
- * - UNCONFIGURED -> RECOVERY -> UNBLOCKED
+ * - DISABLED -> RECOVERY -> UNBLOCKED
  *
  * The UNBLOCKED and TEST states are used to send ALIVE PDU using the timeout 
Tns-test and Tns-alive.
  * UNBLOCKED -> TEST: on expire of Tns-Test, send Alive PDU.
@@ -90,7 +90,7 @@
  */

 enum gprs_ns2_vc_state {
-   GPRS_NS2_ST_UNCONFIGURED,
+   GPRS_NS2_ST_DISABLED,
GPRS_NS2_ST_RESET,
GPRS_NS2_ST_BLOCKED,
GPRS_NS2_ST_UNBLOCKED, /* allows sending NS_UNITDATA */
@@ -114,7 +114,7 @@

GPRS_NS2_EV_RX_UNITDATA,

-   GPRS_NS2_EV_REQ_FORCE_UNCONFIGURED, /* called via vty for tests */
+   GPRS_NS2_EV_REQ_FORCE_DISABLED, /* called via vty for tests */
GPRS_NS2_EV_REQ_OM_RESET,   /* vty cmd: reset */
GPRS_NS2_EV_REQ_OM_BLOCK,   /* vty cmd: block */
GPRS_NS2_EV_REQ_OM_UNBLOCK, /* vty cmd: unblock*/
@@ -132,7 +132,7 @@
{ GPRS_NS2_EV_RX_ALIVE_ACK, "RX-ALIVE_ACK" },
{ GPRS_NS2_EV_RX_STATUS,"RX-STATUS" },
{ GPRS_NS2_EV_RX_UNITDATA,  "RX-UNITDATA" },
-   { GPRS_NS2_EV_REQ_FORCE_UNCONFIGURED,   "REQ-FORCE_UNCONFIGURED" },
+   { GPRS_NS2_EV_REQ_FORCE_DISABLED,   "REQ-FORCE-DISABLED" },
{ GPRS_NS2_EV_REQ_OM_RESET, "REQ-O"},
{ GPRS_NS2_EV_REQ_OM_BLOCK, "REQ-O"},
{ GPRS_NS2_EV_REQ_OM_UNBLOCK,   "REQ-O"},
@@ -252,12 +252,12 @@
 }


-static void ns2_st_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t 
old_state)
+static void ns2_st_disabled_onenter(struct osmo_fsm_inst *fi, uint32_t 
old_state)
 {
stop_test_procedure(fi->priv);
 }

-static void ns2_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void 
*data)
+static void ns2_st_disabled(struct osmo_fsm_inst *fi, uint32_t event, void 
*data)
 {
struct gprs_ns2_vc_priv *priv = fi->priv;
struct gprs_ns2_inst *nsi = 

Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface

2021-06-15 Thread lynxis lazus
lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 )

Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
..

RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface

RAW_NS used previous a single TTCN3 port for a single UDP port
(source/listen side).
This has the limitation that only a single NSVC could be tested for a
local UDP port. However SNS tests require multiple NSVCs over a single UDP port.
NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation.
Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use
multiple NSVCs.

Related: OS#5036
Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
---
M fr-net/gen_links.sh
M fr/gen_links.sh
M gbproxy/gen_links.sh
M library/NS_Provider_IPL4.ttcn
M library/RAW_NS.ttcnpp
M ns/gen_links.sh
M pcu/gen_links.sh
M sgsn/gen_links.sh
8 files changed, 106 insertions(+), 32 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/fr-net/gen_links.sh b/fr-net/gen_links.sh
index 29f4399..413676c 100755
--- a/fr-net/gen_links.sh
+++ b/fr-net/gen_links.sh
@@ -47,7 +47,7 @@
 
 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn 
Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn "
-FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp "
+FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn 
NS_Emulation.ttcnpp "
 FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
 FILES+="LLC_Templates.ttcn "
 gen_links $DIR $FILES
diff --git a/fr/gen_links.sh b/fr/gen_links.sh
index 29f4399..413676c 100755
--- a/fr/gen_links.sh
+++ b/fr/gen_links.sh
@@ -47,7 +47,7 @@

 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn 
Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn "
-FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp "
+FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn 
NS_Emulation.ttcnpp "
 FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
 FILES+="LLC_Templates.ttcn "
 gen_links $DIR $FILES
diff --git a/gbproxy/gen_links.sh b/gbproxy/gen_links.sh
index d6bf22e..6d4ab81 100755
--- a/gbproxy/gen_links.sh
+++ b/gbproxy/gen_links.sh
@@ -84,7 +84,7 @@

 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn 
Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn 
RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
-FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp "
+FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn 
NS_Emulation.ttcnpp "
 FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
 FILES+="PCUIF_Types.ttcn "
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
diff --git a/library/NS_Provider_IPL4.ttcn b/library/NS_Provider_IPL4.ttcn
index 774c08a..09e7dc0 100644
--- a/library/NS_Provider_IPL4.ttcn
+++ b/library/NS_Provider_IPL4.ttcn
@@ -27,6 +27,7 @@

 import from Misc_Helpers all;
 import from NS_Emulation all;
+import from RAW_NS all;
 import from NS_Types all;

 import from IPL4asp_Types all;
@@ -42,6 +43,7 @@

/* per-NSVC ports and state */
port NS_PROVIDER_PT NSVC[NUM_MAX_NSVC];
+   var boolean g_nsvc_bound[NUM_MAX_NSVC];
var PerNsvcState g_nsvc[NUM_MAX_NSVC];

/* management port via which  */
@@ -54,31 +56,35 @@
NSVC_CT vc_nsvc
 };

-signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT 
vc_nsvc);
-signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port);
+signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT 
vc_nsvc) return integer;
+signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port) return 
integer;

 type port NSPIP_PROC_PT procedure {
inout NSPIP_add_nsvc, NSPIP_del_nsvc;
 } with { extension "internal" };

 /* add a new NSVC to the provider */
-private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT
+private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT 
return integer
 {
for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) {
-   if (g_nsvc[i].vc_nsvc == null) {
+   if (g_nsvc_bound[i] == false) {
g_nsvc[i] := nsvc;
-   connect(self:NSVC[i], nsvc.vc_nsvc:NSCP);
-   NSVC[i].send(NS_Provider_Evt:{link_status := 
NS_PROV_LINK_STATUS_UP});
-   return;
+   g_nsvc_bound[i] := true;
+   if (isbound(nsvc.vc_nsvc) and nsvc.vc_nsvc != null) {
+   connect(self:NSVC[i], nsvc.vc_nsvc:NSCP);
+   NSVC[i].send(NS_Provider_Evt:{link_status := 

Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface

2021-06-15 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 )

Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
..


Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn
File library/NS_Provider_IPL4.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn@219
PS4, Line 219: f_nspip_add_nsvc2
> yes, because it runs on RAW_NS_CT and not on NS_CT
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
Gerrit-Change-Number: 24401
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 20:20:37 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: lynxis lazus 
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2_vc_fsm: reset the ALIVE response time when stopping test

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24684 )


Change subject: gprs_ns2_vc_fsm: reset the ALIVE response time when stopping 
test
..

gprs_ns2_vc_fsm: reset the ALIVE response time when stopping test

Prevent showing a response time when the NSVC has failed.

Related: OS#5089
Change-Id: I5435077d35ff1ae3d743ea1b1b8ace7f0fb913cf
---
M src/gb/gprs_ns2_vc_fsm.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/24684/1

diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 70258cc..05118b2 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -181,6 +181,7 @@

 static void stop_test_procedure(struct gprs_ns2_vc_priv *priv)
 {
+   osmo_stat_item_set(osmo_stat_item_group_get_item(priv->nsvc->statg, 
NS_STAT_ALIVE_DELAY), 0);
osmo_timer_del(>alive.timer);
 }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5435077d35ff1ae3d743ea1b1b8ace7f0fb913cf
Gerrit-Change-Number: 24684
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in libosmocore[master]: gprs_ns2: use llist_add_tail to keep order

2021-06-15 Thread lynxis lazus
Hello Jenkins Builder, dexter,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/24682

to look at the new patch set (#3).

Change subject: gprs_ns2: use llist_add_tail to keep order
..

gprs_ns2: use llist_add_tail to keep order

When configuring multiple NSE/BINDs the order of the configuration
should be keeped.

Related: OS#5181
Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_vty.c
M tests/gb/gprs_ns2_vty.vty
3 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/24682/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24682
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
Gerrit-Change-Number: 24682
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gprs_ns2: fix missing notify towards the NSE when NSVC become blocked

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24683 )


Change subject: gprs_ns2: fix missing notify towards the NSE when NSVC become 
blocked
..

gprs_ns2: fix missing notify towards the NSE when NSVC become blocked

The NSE wasn't notified when a NSVC went into the BLOCKED state from
an UNBLOCKED state.

Related: OS#5182
Change-Id: I09634e414e9bb966e6b5809b7de1b59fbabd413d
---
M src/gb/gprs_ns2_vc_fsm.c
M tests/gb/gprs_ns2_test.c
M tests/gb/gprs_ns2_test.ok
3 files changed, 73 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/83/24683/1

diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 341a5a1..70258cc 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -338,6 +338,7 @@
rate_ctr_inc(rate_ctr_group_get_ctr(priv->nsvc->ctrg, 
NS_CTR_BLOCKED));
}

+   ns2_nse_notify_unblocked(priv->nsvc, false);
if (priv->om_blocked) {
/* we are already blocked after a RESET */
if (old_state == GPRS_NS2_ST_RESET) {
diff --git a/tests/gb/gprs_ns2_test.c b/tests/gb/gprs_ns2_test.c
index cc1b2f1..c53cc6d 100644
--- a/tests/gb/gprs_ns2_test.c
+++ b/tests/gb/gprs_ns2_test.c
@@ -302,6 +302,72 @@
printf("--- Finish NSE block unblock nsvc\n");
 }

+/* setup NSE with 2x NSVCs.
+ * block 1st NSVC
+ * block 2nd NSVC
+ * unblock 1st NSVC */
+void test_block_unblock_nsvc2(void *ctx)
+{
+   struct gprs_ns2_inst *nsi;
+   struct gprs_ns2_vc_bind *bind[2];
+   struct gprs_ns2_nse *nse;
+   struct gprs_ns2_vc *nsvc[2];
+   struct gprs_ns_hdr *nsh;
+   struct msgb *msg;
+   char idbuf[32];
+   int i;
+
+   printf("--- Testing NSE block unblock nsvc2\n");
+   printf(" Create NSE + Binds\n");
+   nsi = gprs_ns2_instantiate(ctx, ns_prim_cb, NULL);
+   bind[0] = dummy_bind(nsi, "bblock1");
+   bind[1] = dummy_bind(nsi, "bblock2");
+   nse = gprs_ns2_create_nse(nsi, 1001, GPRS_NS2_LL_UDP, 
GPRS_NS2_DIALECT_STATIC_RESETBLOCK);
+   OSMO_ASSERT(nse);
+
+   for (i=0; i<2; i++) {
+   printf(" Create NSVC[i]\n");
+   snprintf(idbuf, sizeof(idbuf), "NSE%05u-dummy-%i", nse->nsei, 
i);
+   nsvc[i] = ns2_vc_alloc(bind[i], nse, false, 
GPRS_NS2_VC_MODE_BLOCKRESET, idbuf);
+   OSMO_ASSERT(nsvc[i]);
+   nsvc[i]->fi->state = 3; /* HACK: 3 = GPRS_NS2_ST_UNBLOCKED */
+   /* ensure the fi->state works correct */
+   OSMO_ASSERT(ns2_vc_is_unblocked(nsvc[i]));
+   ns2_nse_notify_unblocked(nsvc[i], true);
+   }
+
+   OSMO_ASSERT(nse->alive);
+   /* both nsvcs are unblocked and alive. Let's block them. */
+   OSMO_ASSERT(!find_pdu(bind[0], NS_PDUT_BLOCK));
+   clear_pdus(bind[0]);
+   ns2_vc_block(nsvc[0]);
+   OSMO_ASSERT(find_pdu(bind[0], NS_PDUT_BLOCK));
+   clear_pdus(bind[0]);
+   OSMO_ASSERT(nse->alive);
+
+   OSMO_ASSERT(!find_pdu(bind[1], NS_PDUT_BLOCK));
+   clear_pdus(bind[1]);
+   ns2_vc_block(nsvc[1]);
+   OSMO_ASSERT(find_pdu(bind[1], NS_PDUT_BLOCK));
+   clear_pdus(bind[1]);
+   OSMO_ASSERT(!nse->alive);
+
+   /* now unblocking the 1st NSVC */
+   ns2_vc_unblock(nsvc[0]);
+   OSMO_ASSERT(find_pdu(bind[0], NS_PDUT_UNBLOCK));
+   clear_pdus(bind[0]);
+   msg = msgb_alloc_headroom(NS_ALLOC_SIZE, NS_ALLOC_HEADROOM, 
"test_unblock");
+   msg->l2h = msgb_put(msg, sizeof(*nsh));
+   nsh = (struct gprs_ns_hdr *) msg->l2h;
+   nsh->pdu_type = NS_PDUT_UNBLOCK_ACK;
+   ns2_recv_vc(nsvc[0], msg);
+   OSMO_ASSERT(nse->alive);
+
+   OSMO_ASSERT(ns2_vc_is_unblocked(nsvc[0]));
+   gprs_ns2_free(nsi);
+   printf("--- Finish NSE block unblock nsvc2\n");
+}
+
 static struct msgb *generate_unitdata(const char *msgname)
 {
struct gprs_ns_hdr *nsh;
@@ -533,6 +599,7 @@
printf("= NS2 protocol test START\n");
test_nse_transfer_cap(ctx);
test_block_unblock_nsvc(ctx);
+   test_block_unblock_nsvc2(ctx);
test_unitdata(ctx);
test_unitdata_weights(ctx);
test_mtu(ctx);
diff --git a/tests/gb/gprs_ns2_test.ok b/tests/gb/gprs_ns2_test.ok
index 40a1528..148b6a4 100644
--- a/tests/gb/gprs_ns2_test.ok
+++ b/tests/gb/gprs_ns2_test.ok
@@ -11,6 +11,11 @@
  Create NSVC[i]
  Create NSVC[i]
 --- Finish NSE block unblock nsvc
+--- Testing NSE block unblock nsvc2
+ Create NSE + Binds
+ Create NSVC[i]
+ Create NSVC[i]
+--- Finish NSE block unblock nsvc2
 --- Testing unitdata test
  Create NSE + Binds
  Create NSVC[0]

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: 

Change in libosmocore[master]: gprs_ns2: use llist_add_tail to keep order

2021-06-15 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24682 )

Change subject: gprs_ns2: use llist_add_tail to keep order
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
Gerrit-Change-Number: 24682
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 15 Jun 2021 19:22:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: rewire build_encr_info() to return errors

2021-06-15 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24676 )

Change subject: rewire build_encr_info() to return errors
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
Gerrit-Change-Number: 24676
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 19:12:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2: use llist_add_tail to keep order

2021-06-15 Thread lynxis lazus
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/24682

to look at the new patch set (#2).

Change subject: gprs_ns2: use llist_add_tail to keep order
..

gprs_ns2: use llist_add_tail to keep order

When configuring multiple NSE/BINDs the order of the configuration
should be keeped.

Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_vty.c
M tests/gb/gprs_ns2_vty.vty
3 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/24682/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24682
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
Gerrit-Change-Number: 24682
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gprs_ns2: use llist_add_tail to keep order

2021-06-15 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24682 )


Change subject: gprs_ns2: use llist_add_tail to keep order
..

gprs_ns2: use llist_add_tail to keep order

When configuring multiple NSE/BINDs the order of the configuration
should be keeped.

Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_vty.c
2 files changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/24682/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 618d55e..3bf31a3 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -609,8 +609,8 @@
rate_ctr_group_set_name(nsvc->ctrg, id);
osmo_stat_item_group_set_name(nsvc->statg, id);

-   llist_add(>list, >nsvc);
-   llist_add(>blist, >nsvc);
+   llist_add_tail(>list, >nsvc);
+   llist_add_tail(>blist, >nsvc);
ns2_nse_update_mtu(nse);

return nsvc;
@@ -809,7 +809,7 @@
nse->nsi = nsi;
nse->first = true;
nse->mtu = 0;
-   llist_add(>list, >nse);
+   llist_add_tail(>list, >nse);
INIT_LLIST_HEAD(>nsvc);

return nse;
@@ -1633,7 +1633,7 @@
bind->sns_data_weight = 1;
bind->nsi = nsi;
INIT_LLIST_HEAD(>nsvc);
-   llist_add(>list, >binding);
+   llist_add_tail(>list, >binding);

nsi->bind_rate_ctr_idx++;

diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 2777641..705b60e 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -141,7 +141,7 @@

vbind->ip_sns_sig_weight = 1;
vbind->ip_sns_data_weight = 1;
-   llist_add(>list, );
+   llist_add_tail(>list, );
return vbind;
 }

@@ -172,7 +172,7 @@

vnse->nsei = nsei;
INIT_LLIST_HEAD(>binds);
-   llist_add(>list, );
+   llist_add_tail(>list, );
return vnse;
 }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
Gerrit-Change-Number: 24682
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in osmo-pcu[master]: pcuif: Support receiving System Information 2

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/24621 )

Change subject: pcuif: Support receiving System Information 2
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4a9c4f70beac6805322a19835a0d30f7247780b4
Gerrit-Change-Number: 24621
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 18:52:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pcuif: Support receiving System Information 2

2021-06-15 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/24621 )

Change subject: pcuif: Support receiving System Information 2
..

pcuif: Support receiving System Information 2

OsmoPCU will need this SI2 in order to gain knowledge of the BCCH
Frequency List being broadcasted, in order to build a per-MS specific
Neighbour List using NC_FREQUENCY_LIST bits in Packet Measurement Order.

Related: SYS#5303
Change-Id: I4a9c4f70beac6805322a19835a0d30f7247780b4
---
M src/bts.h
M src/pcu_l1_if.cpp
2 files changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/bts.h b/src/bts.h
index 2a7d883..a2f4598 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -231,6 +231,9 @@

uint8_t si1[GSM_MACBLOCK_LEN];
bool si1_is_set;
+   uint8_t si2[GSM_MACBLOCK_LEN];
+   bool si2_is_set;
+   struct gsm_sysinfo_freq si2_bcch_cell_list[1024];
uint8_t si3[GSM_MACBLOCK_LEN];
bool si3_is_set;
uint8_t si13[GSM_MACBLOCK_LEN];
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 0453b92..818cb1a 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -286,9 +286,28 @@
return rc;
 }

+static int list_arfcn(const struct gprs_rlcmac_bts *bts, const struct 
gsm_sysinfo_freq *freq, const char *text)
+{
+   int n = 0, i;
+   for (i = 0; i < 1024; i++) {
+   if (freq[i].mask) {
+   if (!n)
+   LOGP(DL1IF, LOGL_INFO, "BTS%d: %s", bts->nr, 
text);
+   LOGPC(DL1IF, LOGL_INFO, " %d", i);
+   n++;
+   }
+   }
+   if (n)
+   LOGPC(DL1IF, LOGL_INFO, "\n");
+
+   return n;
+}
+
 static int pcu_rx_data_ind_bcch(struct gprs_rlcmac_bts *bts, uint8_t *data, 
uint8_t len)
 {
+   struct gsm48_system_information_type_2 *si2;
const uint8_t *si_ro;
+
switch (len) {
case 0:
/* Due to historical reasons also accept a completely empty 
message as
@@ -305,6 +324,9 @@
case SYSINFO_TYPE_1:
bts->si1_is_set = false;
break;
+   case SYSINFO_TYPE_2:
+   bts->si2_is_set = false;
+   break;
case SYSINFO_TYPE_3:
bts->si3_is_set = false;
break;
@@ -328,6 +350,14 @@
memcpy(bts->si1, data, GSM_MACBLOCK_LEN);
bts->si1_is_set = true;
break;
+   case GSM48_MT_RR_SYSINFO_2:
+   memcpy(bts->si2, data, GSM_MACBLOCK_LEN);
+   bts->si2_is_set = true;
+   si2 = (struct gsm48_system_information_type_2 
*)bts->si2;
+   gsm48_decode_freq_list(bts->si2_bcch_cell_list, 
si2->bcch_frequency_list,
+  
sizeof(si2->bcch_frequency_list), 0xce, 1);
+   list_arfcn(bts, bts->si2_bcch_cell_list, "SI2 Neighbour 
cells in same band:");
+   break;
case GSM48_MT_RR_SYSINFO_3:
memcpy(bts->si3, data, GSM_MACBLOCK_LEN);
bts->si3_is_set = true;

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4a9c4f70beac6805322a19835a0d30f7247780b4
Gerrit-Change-Number: 24621
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-pcu[master]: pcuif: Support receiving System Information 2

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/24621 )

Change subject: pcuif: Support receiving System Information 2
..


Patch Set 2:

I rearranged the commits so this one can be merged already.


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4a9c4f70beac6805322a19835a0d30f7247780b4
Gerrit-Change-Number: 24621
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 17:11:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: sgsn a54 tests

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24629 )

Change subject: sgsn a54 tests
..


Patch Set 1:

I'd really want to merge it, but as stated before, the commit log looks really 
unfinished. --verbose missing.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24629
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iad65cbf9840aa883cb34e53554b94a4142c82638
Gerrit-Change-Number: 24629
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 17:09:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: pcuif_proto.h: Introduce anr_{req, cnf} messages

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/24618 )

Change subject: pcuif_proto.h: Introduce anr_{req,cnf} messages
..


Patch Set 3:

> Patch Set 3:
>
> I would suggest to somehow introduce an entirely new "transparent" channel 
> from the BSC.  The way how you're doing it herre (flat next to the BTS 
> originated messages) looks like the BTS will still need to be updated every 
> time some new message between PCU and BSC is added.
>
> I would simply introduce something like a BSC_TO_PCU_IND and PCU_TO_BSC_IND 
> at the msg_type level.  At that point the BTS doesn't care anymore, it just 
> passes those messages back and forth between PCU and BSC.  The payload is 
> opaqua and needs to be understood only by those two.

Fine with it. That was actually my first approach, but I decided to go for the 
straightforward way of passing messages directly to have something working in a 
faster way.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I8deef11f9ec191475c99133629cd5cd9048c4bcb
Gerrit-Change-Number: 24618
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 17:01:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: Support forwarding proto IPAC_PROTO_EXT_PCU BSC<->PCU

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/24619 )

Change subject: Support forwarding proto IPAC_PROTO_EXT_PCU BSC<->PCU
..


Patch Set 3:

I would suggest to somehow introduce an entirely new "transparent" channel from 
the BSC.  The way how you're doing it herre (flat next to the BTS originated 
messages) looks like the BTS will still need to be updated every time some new 
message between PCU and BSC is added.

I would simply introduce something like a BSC_TO_PCU_IND and PCU_TO_BSC_IND at 
the msg_type level.  At that point the BTS doesn't care anymore, it just passes 
those messages back and forth between PCU and BSC.  The payload is opaqua and 
needs to be understood only by those two.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I73fdb17107494ade9263a62d1f729e67303fce87
Gerrit-Change-Number: 24619
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 17:00:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: pcu_sock: Transmit SI2

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/24617 )

Change subject: pcu_sock: Transmit SI2
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If70c64f941f621a9a68aef2c846639b5c7f2f74b
Gerrit-Change-Number: 24617
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:59:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: pcuif_proto.h: Introduce anr_{req, cnf} messages

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/24618 )

Change subject: pcuif_proto.h: Introduce anr_{req,cnf} messages
..


Patch Set 3:

I would suggest to somehow introduce an entirely new "transparent" channel from 
the BSC.  The way how you're doing it herre (flat next to the BTS originated 
messages) looks like the BTS will still need to be updated every time some new 
message between PCU and BSC is added.

I would simply introduce something like a BSC_TO_PCU_IND and PCU_TO_BSC_IND at 
the msg_type level.  At that point the BTS doesn't care anymore, it just passes 
those messages back and forth between PCU and BSC.  The payload is opaqua and 
needs to be understood only by those two.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I8deef11f9ec191475c99133629cd5cd9048c4bcb
Gerrit-Change-Number: 24618
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:59:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Validate new 'srvcc fast-return' VTY command

2021-06-15 Thread pespin
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679

to look at the new patch set (#2).

Change subject: bsc: Validate new 'srvcc fast-return' VTY command
..

bsc: Validate new 'srvcc fast-return' VTY command

Related: SYS#5337
Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 61 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/79/24679/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
Gerrit-Change-Number: 24679
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

2021-06-15 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )

Change subject: util: fix the functions "create_netns" and 
"setcap_netsys_admin".
..

util: fix the functions "create_netns" and "setcap_netsys_admin".

This commit fixes 2 functions from util.py:
 - setcap_netsys_admin: removed "self" from the arguments.
 - create_netns: pass "run_dir" to Process and convert the arguments to
a list as the other methods in the file.

Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
---
M src/osmo_gsm_tester/core/util.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/core/util.py b/src/osmo_gsm_tester/core/util.py
index 691b489..5ca6ad9 100644
--- a/src/osmo_gsm_tester/core/util.py
+++ b/src/osmo_gsm_tester/core/util.py
@@ -102,7 +102,7 @@
 proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', 
SETCAP_NET_ADMIN_BIN, binary])
 proc.launch_sync()

-def setcap_netsys_admin(self, binary, run_dir):
+def setcap_netsys_admin(binary, run_dir):
 '''
 This functionality requires specific setup on the host running
 osmo-gsm-tester. See osmo-gsm-tester manual for more information.
@@ -118,7 +118,7 @@
 '''
 from .process import Process
 NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh'
-proc = Process('create_netns', ('sudo', NETNS_SETUP_BIN, netns))
+proc = Process('create_netns',run_dir, ['sudo', NETNS_SETUP_BIN, netns])
 proc.launch_sync()

 def move_iface_to_netns(ifname, netns, run_dir):

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )

Change subject: util: fix the functions "create_netns" and 
"setcap_netsys_admin".
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:47:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pcuif_proto.h: Introduce anr_{req, cnf} messages

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/24620 )

Change subject: pcuif_proto.h: Introduce anr_{req,cnf} messages
..


Patch Set 1: Code-Review+1

curious to see the BTS side of this.  I'm surprised that the BSC-originated 
messages appear on the PCUIF socket without any kind of explicit discrimnator 
that differentiates them from BTS-originated messages?


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib6c7bf5ca5a06186a71ec50cfc1a91a5c9b01d9c
Gerrit-Change-Number: 24620
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:46:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pcuif: Support receiving System Information 2

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/24621 )

Change subject: pcuif: Support receiving System Information 2
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4a9c4f70beac6805322a19835a0d30f7247780b4
Gerrit-Change-Number: 24621
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:45:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

2021-06-15 Thread alealcon
alealcon has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )

Change subject: util: fix the functions "create_netns" and 
"setcap_netsys_admin".
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678/1//COMMIT_MSG@11
PS1, Line 11:  - create_netns: pass "run_dir" to Process and convert the 
arguments to
> ACK for the first. For the second, It's not really a fix since it works fine 
> anyway. […]
It doesn't work. The local one uses the Process class, with the constructor
def __init__(self, name, run_dir, popen_args, **popen_kwargs):

and it needs the run_dir or it crashed because it mismatches the args with the 
run_dir.

remote.py uses the RemoteProcess function with a different arguments:

def RemoteProcess(self, name, popen_args, remote_env={}, **popen_kwargs):


It's true that remote.py uses () instead [], but in utils.py almost all the 
methods use [], so I wanted to be consistent within that file. If you prefer () 
only for that function I can update the commit



--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:44:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon/trx_if: send NOPE indications if there is no burst

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/24662 )

Change subject: trxcon/trx_if: send NOPE indications if there is no burst
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1c7f1315b8ef44f651efd6a22fb5b854f65c0946
Gerrit-Change-Number: 24662
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:44:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon/scheduler: introduce and use struct sched_burst_req

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/24661 )

Change subject: trxcon/scheduler: introduce and use struct sched_burst_req
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id45b27180c233fdc42ae1ef0b195554dd299a056
Gerrit-Change-Number: 24661
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:44:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon/scheduler: cosmetic: move TDMA frame number calculation

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/24660 )

Change subject: trxcon/scheduler: cosmetic: move TDMA frame number calculation
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
Gerrit-Change-Number: 24660
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:43:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trx_toolkit/transceiver.py: allow NOPE.ind on inactive timeslots

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/24659 )

Change subject: trx_toolkit/transceiver.py: allow NOPE.ind on inactive timeslots
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I27a3c8897cb82f6c264d34702c4ec64561bb9809
Gerrit-Change-Number: 24659
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:43:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Fix race condition exiting f_ho_out_of_this_bsc

2021-06-15 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665 )

Change subject: bsc: Fix race condition exiting f_ho_out_of_this_bsc
..

bsc: Fix race condition exiting f_ho_out_of_this_bsc

The function didn't wait to receive the 2 messages from the BSC. As a
result, they may have arrived while tearing down the test components
shortly after exiting the function and provoke a Dynamic Test Error
while pushing the messages up the stack since some of the stack layers
may already be unavailable.

Test TC_ho_out_of_this_bsc() workarounded this by using a f_sleep(1),
but TC_srvcc_eutran_to_geran_ho_out() didn't, making it fail sometimes.

Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
---
M bsc/BSC_Tests.ttcn
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 41deea1..074fa60 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4858,6 +4858,12 @@
BSSAP.send(ts_BSSMAP_ClearCommand(cause));

f_expect_dlcx_conns();
+
+   interleave {
+   [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch 
tr_RRM_RR_RELEASE));
+   [] RSL.receive(tr_RSL_DEACT_SACCH(g_chan_nr));
+   [] RSL.receive(tr_RSL_RF_CHAN_REL(g_chan_nr));
+   }
setverdict(pass);
 }

@@ -4870,7 +4876,6 @@
f_establish_fully(ass_req, exp_compl);

f_ho_out_of_this_bsc();
-   f_sleep(1.0);
 }
 testcase TC_ho_out_of_this_bsc() runs on test_CT {
var MSC_ConnHdlr vc_conn;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
Gerrit-Change-Number: 24665
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: bsc: Fix race condition exiting f_ho_out_of_this_bsc

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665 )

Change subject: bsc: Fix race condition exiting f_ho_out_of_this_bsc
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
Gerrit-Change-Number: 24665
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:43:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674 )

Change subject: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
Gerrit-Change-Number: 24674
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:42:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add TC_assignment_fr_a5_4

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673 )

Change subject: bsc: add TC_assignment_fr_a5_4
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
Gerrit-Change-Number: 24673
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:41:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add TC_ciph_mode_a5_4

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672 )

Change subject: bsc: add TC_ciph_mode_a5_4
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
Gerrit-Change-Number: 24672
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:41:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671 )

Change subject: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
Gerrit-Change-Number: 24671
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:41:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): fail quicker on key mismatch

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670 )

Change subject: bsc: f_cipher_mode(): fail quicker on key mismatch
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670/1/bsc/MSC_ConnectionHandler.ttcn
File bsc/MSC_ConnectionHandler.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670/1/bsc/MSC_ConnectionHandler.ttcn@734
PS1, Line 734:  expect_kc := ''O;
> why isn't enc. […]
I don't know the details in the tests, but as I staed in the other comment, the 
UE and BSC will store different 64bit and 128bit keys simultaneously, and use 
whatever is the best within the current BTS (think of HO).



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
Gerrit-Change-Number: 24670
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:41:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: implement ttcn API and cfg for A5/4

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669 )

Change subject: bsc: implement ttcn API and cfg for A5/4
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
Gerrit-Change-Number: 24669
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:39:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: implement ttcn API and cfg for A5/4

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669 )

Change subject: bsc: implement ttcn API and cfg for A5/4
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
Gerrit-Change-Number: 24669
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:37:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: implement ttcn API and cfg for A5/4

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669 )

Change subject: bsc: implement ttcn API and cfg for A5/4
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669/1/bsc/MSC_ConnectionHandler.ttcn
File bsc/MSC_ConnectionHandler.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669/1/bsc/MSC_ConnectionHandler.ttcn@732
PS1, Line 732:  expect_kc := enc.enc_kc128;
> why not using same field regardless of the algo? in the end it's an 
> octetstring.
a BSC has both a 64bit and a 128bit key simultaneously, and will use either of 
the two depending of the ciphering capabilities of the BTS e.g. during 
hand-over.  So likewise, the tests emulating the MSC+BTS must handle both in 
parallel.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
Gerrit-Change-Number: 24669
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:37:39 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: reduce args to f_cipher_mode()

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668 )

Change subject: bsc: reduce args to f_cipher_mode()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
Gerrit-Change-Number: 24668
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:35:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: replace TC_assignment_fr_a5_4 with TC_assignment_fr_a5_not_sup

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667 )

Change subject: bsc: replace TC_assignment_fr_a5_4 with 
TC_assignment_fr_a5_not_sup
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I83eca18d1b3d8d58177aa3750935ec5a3a985ca4
Gerrit-Change-Number: 24667
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:35:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: implement A5/4 in Ciphering Mode procedure

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24635 )

Change subject: implement A5/4 in Ciphering Mode procedure
..


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c458c8a7350f34ff79531b3c891e1b367614469
Gerrit-Change-Number: 24635
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:34:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: allow A5/4 encryption in config

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24634 )

Change subject: vty: allow A5/4 encryption in config
..


Patch Set 2: Code-Review+1

I would merge this with the patch actually introducing the A5/4 capability.


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4
Gerrit-Change-Number: 24634
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:33:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24677 )

Change subject: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
Gerrit-Change-Number: 24677
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:33:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: rewire build_encr_info() to return errors

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24676 )

Change subject: rewire build_encr_info() to return errors
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
Gerrit-Change-Number: 24676
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:32:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_select_shutdown_request(): allow finishing pending writes on SIG...

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24544 )

Change subject: osmo_select_shutdown_request(): allow finishing pending writes 
on SIGTERM
..


Patch Set 3:

(1 comment)

lgtm, except for the question about the conditional osmo_timers_update()

https://gerrit.osmocom.org/c/libosmocore/+/24544/3/src/select.c
File src/select.c:

https://gerrit.osmocom.org/c/libosmocore/+/24544/3/src/select.c@387
PS3, Line 387:  if (!_osmo_select_shutdown_requested)
> I'm not sure if this is a good idea, it could affect assumptions on the 
> application, leading to diff […]
I'd also say it's an over-optimization. do we care if osmo_timers_update() is 
called unconditionally here?  What would be the danger of keeping the current 
behavior? Maybe pespin and I don't get the rationale.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib94d4316924103459577087c2214188679db2227
Gerrit-Change-Number: 24544
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:32:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Validate new 'srvcc fast-return' VTY command

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679 )

Change subject: bsc: Validate new 'srvcc fast-return' VTY command
..


Patch Set 1:

> Patch Set 1:
>
> might need extensions if you consider the 'subsequent intra-GSM-HO after 
> SRVCC EUTRA->GERAN" case I mentioned in the review of the osmo-bsc patch.

I can add a test verifying that even if fast-return is disabled for local BTS, 
the subsequen inra-GSM-HO still contains the OldBSSToNewBSSInfo


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
Gerrit-Change-Number: 24679
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:30:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: use osmo_select_shutdown to get rid of SIGTERM sleep

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24675 )

Change subject: use osmo_select_shutdown to get rid of SIGTERM sleep
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
Gerrit-Change-Number: 24675
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:30:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Validate new SRVCC counters

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24680 )

Change subject: bsc: Validate new SRVCC counters
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24680
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Icf2cd00f4024533a1bd8ba52816750a836bc0cb2
Gerrit-Change-Number: 24680
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:29:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: ctrl: Support recovering from short write

2021-06-15 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24640 )

Change subject: ctrl: Support recovering from short write
..

ctrl: Support recovering from short write

osmo_wqueue has support for it, so simply handle it correctly in the
callback (updating buffer and returning -EAGAIN).

Related: OS#5169
Change-Id: I6cbc7ec6ae6832e61cddf4402332ba09b142a7d4
---
M src/ctrl/control_if.c
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

Objections:
  fixeria: I would prefer this is not merged as is



diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index d117fcf..0a893ba 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -489,8 +489,14 @@
control_close_conn(ccon);
return -EBADF;
}
-   if (rc != msg->len)
+   if (rc < 0) {
LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the CTRL 
connection.\n");
+   return 0;
+   }
+   if (rc < msg->len) {
+   msgb_pull(msg, rc);
+   return -EAGAIN;
+   }

return 0;
 }

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6cbc7ec6ae6832e61cddf4402332ba09b142a7d4
Gerrit-Change-Number: 24640
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: bsc: Validate new 'srvcc fast-return' VTY command

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679 )

Change subject: bsc: Validate new 'srvcc fast-return' VTY command
..


Patch Set 1:

might need extensions if you consider the 'subsequent intra-GSM-HO after SRVCC 
EUTRA->GERAN" case I mentioned in the review of the osmo-bsc patch.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
Gerrit-Change-Number: 24679
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:29:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: ctrl: Pre-calculate required size before allocating msgb

2021-06-15 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24639 )

Change subject: ctrl: Pre-calculate required size before allocating msgb
..

ctrl: Pre-calculate required size before allocating msgb

This commit fixes crash when response is more than ~4096 chars.
Furthermore, we now allocate only the required memory, not 4096 for all
messages, which usually don't require it.
Test needs to be adapted since it assumed there was more available space
at the end of the msgb.

Related: OS#5169
Change-Id: I0b8f370f7b08736207f9efed13a0663b5e482824
---
M src/ctrl/control_cmd.c
M tests/ctrl/ctrl_test.c
2 files changed, 34 insertions(+), 62 deletions(-)

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

Objections:
  neels: I would prefer this is not merged as is



diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index 33496bd..753e6cc 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -516,92 +516,61 @@
  *  \returns callee-allocated message buffer containing the encoded \a cmd; 
NULL on error */
 struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd)
 {
-   struct msgb *msg;
+   struct msgb *msg = NULL;
+   char *strbuf;
+   size_t len;
const char *type;
-   char *tmp;

if (!cmd->id)
return NULL;

-   msg = msgb_alloc_headroom(4096, 128, "ctrl command make");
-   if (!msg)
-   return NULL;
-
type = get_value_string(ctrl_type_vals, cmd->type);

switch (cmd->type) {
case CTRL_TYPE_GET:
if (!cmd->variable)
-   goto err;
-
-   tmp = talloc_asprintf(cmd, "%s %s %s", type, cmd->id, 
cmd->variable);
-   if (!tmp) {
-   LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate cmd.\n");
-   goto err;
-   }
-
-   msg->l2h = msgb_put(msg, strlen(tmp));
-   memcpy(msg->l2h, tmp, strlen(tmp));
-   talloc_free(tmp);
+   return NULL;
+   strbuf = talloc_asprintf(cmd, "%s %s %s", type, cmd->id, 
cmd->variable);
break;
case CTRL_TYPE_SET:
if (!cmd->variable || !cmd->value)
-   goto err;
-
-   tmp = talloc_asprintf(cmd, "%s %s %s %s", type, cmd->id, 
cmd->variable,
-   cmd->value);
-   if (!tmp) {
-   LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate cmd.\n");
-   goto err;
-   }
-
-   msg->l2h = msgb_put(msg, strlen(tmp));
-   memcpy(msg->l2h, tmp, strlen(tmp));
-   talloc_free(tmp);
+   return NULL;
+   strbuf = talloc_asprintf(cmd, "%s %s %s %s", type, cmd->id,
+cmd->variable, cmd->value);
break;
case CTRL_TYPE_GET_REPLY:
case CTRL_TYPE_SET_REPLY:
case CTRL_TYPE_TRAP:
if (!cmd->variable || !cmd->reply)
-   goto err;
-
-   tmp = talloc_asprintf(cmd, "%s %s %s %s", type, cmd->id, 
cmd->variable,
-   cmd->reply);
-   if (!tmp) {
-   LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate cmd.\n");
-   goto err;
-   }
-
-   msg->l2h = msgb_put(msg, strlen(tmp));
-   memcpy(msg->l2h, tmp, strlen(tmp));
-   talloc_free(tmp);
+   return NULL;
+   strbuf = talloc_asprintf(cmd, "%s %s %s %s", type, cmd->id,
+cmd->variable, cmd->reply);
break;
case CTRL_TYPE_ERROR:
if (!cmd->reply)
-   goto err;
-
-   tmp = talloc_asprintf(cmd, "%s %s %s", type, cmd->id,
-   cmd->reply);
-   if (!tmp) {
-   LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate cmd.\n");
-   goto err;
-   }
-
-   msg->l2h = msgb_put(msg, strlen(tmp));
-   memcpy(msg->l2h, tmp, strlen(tmp));
-   talloc_free(tmp);
+   return NULL;
+   strbuf = talloc_asprintf(cmd, "%s %s %s", type, cmd->id, 
cmd->reply);
break;
default:
LOGP(DLCTRL, LOGL_NOTICE, "Unknown command type %i\n", 
cmd->type);
-   goto err;
-   break;
+   return NULL;
}

-   return msg;
+   if (!strbuf) {
+   LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate cmd.\n");
+   goto ret;
+  

Change in libosmocore[master]: ctrl: Pre-calculate required size before allocating msgb

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24639 )

Change subject: ctrl: Pre-calculate required size before allocating msgb
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0b8f370f7b08736207f9efed13a0663b5e482824
Gerrit-Change-Number: 24639
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: keith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:29:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Fix race condition exiting f_ho_out_of_this_bsc

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665 )

Change subject: bsc: Fix race condition exiting f_ho_out_of_this_bsc
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
Gerrit-Change-Number: 24665
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:29:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: ctrl: Support recovering from short write

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24640 )

Change subject: ctrl: Support recovering from short write
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6cbc7ec6ae6832e61cddf4402332ba09b142a7d4
Gerrit-Change-Number: 24640
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: neels 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:28:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Introduce VTY command to disable srvcc fast-return on target BTS

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24666 )

Change subject: Introduce VTY command to disable srvcc fast-return on target BTS
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/24666/2/src/osmo-bsc/osmo_bsc_bssap.c
File src/osmo-bsc/osmo_bsc_bssap.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/24666/2/src/osmo-bsc/osmo_bsc_bssap.c@1379
PS2, Line 1379: params.old_bss_to_new_bss_info_present = true;
Please see here, I already took into account what you say.
If MS moved to another BTS, the relevant info is still being passed to the new 
BTS, and then it's up to the new BTS to decide.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ac91b5dffc9b6de60576aabe21a15f24fea38cb
Gerrit-Change-Number: 24666
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:26:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Introduce counters to track SRVCC procedures

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24681 )

Change subject: Introduce counters to track SRVCC procedures
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c20da56d465dbcf4366130394f7c42635a24cc7
Gerrit-Change-Number: 24681
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:26:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Introduce VTY command to disable srvcc fast-return on target BTS

2021-06-15 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24666 )

Change subject: Introduce VTY command to disable srvcc fast-return on target BTS
..


Patch Set 2:

the question is how the intended behavior is supposed to work.  You are 
introducing a per-BTS permission, but you are only using that permission 
(copying it from the gsm_bts to the subscr_conn) at the time of the initial 
inbound handover into the BSC.  So the first BTS determines the permission for 
the entire connection, even if it gets handed over 10 more times within this 
BSC to other BTS later on.

Shouldn't the (config of the) BTS at the time of termination of the call 
determine whether or not add thosee EUTRAN fast return related IEs?


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ac91b5dffc9b6de60576aabe21a15f24fea38cb
Gerrit-Change-Number: 24666
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:24:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )

Change subject: util: fix the functions "create_netns" and 
"setcap_netsys_admin".
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678/1//COMMIT_MSG@11
PS1, Line 11:  - create_netns: pass "run_dir" to Process and convert the 
arguments to
ACK for the first. For the second, It's not really a fix since it works fine 
anyway.

Furthermore, there's a "copy" of the function in remote.py, and this one from 
util.py is only used when running a ms_srs locally we nobody usually does. But 
the copy in remote.py is also using () instead of []. So please have a looks 
what's the best and submit a different commit if needed changing both.



--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:10:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: ctrl: Support recovering from short write

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24640 )

Change subject: ctrl: Support recovering from short write
..


Patch Set 1:

ping?


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6cbc7ec6ae6832e61cddf4402332ba09b142a7d4
Gerrit-Change-Number: 24640
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: neels 
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:06:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Introduce VTY command to disable srvcc fast-return on target BTS

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24666 )

Change subject: Introduce VTY command to disable srvcc fast-return on target BTS
..


Set Ready For Review


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ac91b5dffc9b6de60576aabe21a15f24fea38cb
Gerrit-Change-Number: 24666
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 15 Jun 2021 16:06:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Introduce counters to track SRVCC procedures

2021-06-15 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24681 )


Change subject: Introduce counters to track SRVCC procedures
..

Introduce counters to track SRVCC procedures

Related: SYS#5337
Change-Id: I5c20da56d465dbcf4366130394f7c42635a24cc7
---
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/handover_fsm.c
4 files changed, 53 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/24681/1

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 4436ed0..b6980d1 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -137,6 +137,13 @@
BTS_CTR_INTER_BSC_HO_IN_FAILED,
BTS_CTR_INTER_BSC_HO_IN_TIMEOUT,
BTS_CTR_INTER_BSC_HO_IN_ERROR,
+   BTS_CTR_SRVCC_ATTEMPTED,
+   BTS_CTR_SRVCC_COMPLETED,
+   BTS_CTR_SRVCC_STOPPED,
+   BTS_CTR_SRVCC_NO_CHANNEL,
+   BTS_CTR_SRVCC_TIMEOUT,
+   BTS_CTR_SRVCC_FAILED,
+   BTS_CTR_SRVCC_ERROR,
 };

 extern const struct rate_ctr_desc bts_ctr_description[];
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 37e3899..2a73f46 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1116,6 +1116,13 @@
BSC_CTR_INTER_BSC_HO_IN_FAILED,
BSC_CTR_INTER_BSC_HO_IN_TIMEOUT,
BSC_CTR_INTER_BSC_HO_IN_ERROR,
+   BSC_CTR_SRVCC_ATTEMPTED,
+   BSC_CTR_SRVCC_COMPLETED,
+   BSC_CTR_SRVCC_STOPPED,
+   BSC_CTR_SRVCC_NO_CHANNEL,
+   BSC_CTR_SRVCC_TIMEOUT,
+   BSC_CTR_SRVCC_FAILED,
+   BSC_CTR_SRVCC_ERROR,
BSC_CTR_PAGING_ATTEMPTED,
BSC_CTR_PAGING_DETACHED,
BSC_CTR_PAGING_RESPONDED,
@@ -1181,6 +1188,14 @@
[BSC_CTR_INTER_BSC_HO_IN_ERROR] =   {"interbsc_ho_in:error",
 "Handover from remote BSS 
failed for other reason"},

+   [BSC_CTR_SRVCC_ATTEMPTED] = {"srvcc:attempted", "Intra-BSC 
SRVCC attempts"},
+   [BSC_CTR_SRVCC_COMPLETED] = {"srvcc:completed", "Intra-BSC 
SRVCC completed"},
+   [BSC_CTR_SRVCC_STOPPED] =   {"srvcc:stopped", "Connection 
ended during HO"},
+   [BSC_CTR_SRVCC_NO_CHANNEL] ={"srvcc:no_channel", "Failure 
to allocate lchan for HO"},
+   [BSC_CTR_SRVCC_TIMEOUT] =   {"srvcc:timeout", "SRVCC timed 
out"},
+   [BSC_CTR_SRVCC_FAILED] ={"srvcc:failed", "Received 
SRVCC Fail messages"},
+   [BSC_CTR_SRVCC_ERROR] = {"srvcc:error", "Re-assignment 
failed for other reason"},
+
[BSC_CTR_PAGING_ATTEMPTED] ={"paging:attempted", "Paging 
attempts for a subscriber"},
[BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Paging 
request send failures because no responsible BTS was found"},
[BSC_CTR_PAGING_RESPONDED] ={"paging:responded", "Paging 
attempts with successful response"},
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index e140565..b64890f 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1110,6 +1110,28 @@
[BTS_CTR_INTER_BSC_HO_IN_ERROR] = \
{ "interbsc_ho_in:error",
  "Handover from remote BSS failed for other reason" },
+
+   [BTS_CTR_SRVCC_ATTEMPTED] = \
+   { "srvcc:attempted",
+ "Intra-BSC handover attempts" },
+   [BTS_CTR_SRVCC_COMPLETED] = \
+   { "srvcc:completed",
+ "Intra-BSC handover completed" },
+   [BTS_CTR_SRVCC_STOPPED] = \
+   { "srvcc:stopped",
+ "Connection ended during HO" },
+   [BTS_CTR_SRVCC_NO_CHANNEL] = \
+   { "srvcc:no_channel",
+ "Failure to allocate lchan for HO" },
+   [BTS_CTR_SRVCC_TIMEOUT] = \
+   { "srvcc:timeout",
+  "Handover timed out" },
+   [BTS_CTR_SRVCC_FAILED] = \
+   { "srvcc:failed",
+ "Received Handover Fail messages" },
+   [BTS_CTR_SRVCC_ERROR] = \
+   { "srvcc:error",
+ "Re-assignment failed for other reason" },
 };

 const struct rate_ctr_group_desc bts_ctrg_desc = {
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 08b1dc7..cae5167 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -725,6 +725,7 @@
conn->fast_return.last_eutran_plmn_valid = true;
memcpy(>fast_return.last_eutran_plmn, 
>last_eutran_plmn,
   sizeof(conn->fast_return.last_eutran_plmn));
+   ho_count(ho->new_bts, CTR_SRVCC_ATTEMPTED);
}

lchan_activate(ho->new_lchan, );
@@ -824,6 +825,9 @@
}
 }

+FUNC_RESULT_COUNTER(BSC, SRVCC)
+FUNC_RESULT_COUNTER(BTS, SRVCC)
+
 static void send_handover_performed(struct 

Change in osmo-ttcn3-hacks[master]: bsc: Validate new 'srvcc fast-return' VTY command

2021-06-15 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679 )


Change subject: bsc: Validate new 'srvcc fast-return' VTY command
..

bsc: Validate new 'srvcc fast-return' VTY command

Related: SYS#5337
Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 38 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/79/24679/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 074fa60..5ab2dd1 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5226,11 +5226,15 @@
 }

 private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
-   var template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
+   var template PDU_ML3_NW_MS exp_rr_rel_tmpl;
var template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit;
if (not istemplatekind(g_pars.last_used_eutran_plmn, "omit")) {
oldToNewBSSIEs := 
f_ts_BSSMAP_oldToNewBSSIEs(ts_BSSMAP_LastUsedEUTRANPLMNId(g_pars.last_used_eutran_plmn));
+   }
+   if (g_pars.exp_fast_return) {
exp_rr_rel_tmpl := tr_RRM_RR_RELEASE_CellSelectInd;
+   } else {
+   exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
}
f_ho_into_this_bsc(id, oldToNewBSSIEs);
f_perform_clear(RSL, exp_rr_rel_tmpl);
@@ -5278,10 +5282,26 @@
 testcase TC_srvcc_eutran_to_geran() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.last_used_eutran_plmn := '323454'O;
+   pars.exp_fast_return := true;
f_tc_ho_into_this_bsc_main(pars);
f_shutdown_helper();
 }

+/* Same as TC_srvcc_eutran_to_geran, but test explicitly forbiding fast return
+   on the BTS. As a result, RR Release shouldn't contain the EUTRAN neighbor
+   list when the channel is released. */
+testcase TC_srvcc_eutran_to_geran_forbid_fast_return() runs on test_CT {
+   f_init_vty();
+   f_vty_allow_srvcc_fast_return(true, 0)
+
+   var TestHdlrParams pars := f_gen_test_hdlr_pars();
+   pars.last_used_eutran_plmn := '323454'O;
+   pars.exp_fast_return := false;
+   f_tc_ho_into_this_bsc_main(pars);
+   f_vty_allow_srvcc_fast_return(false, 0);
+   f_shutdown_helper();
+}
+
 private function f_tc_srvcc_eutran_to_geran_ho_out(charstring id) runs on 
MSC_ConnHdlr {
var template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs;
oldToNewBSSIEs := 
f_ts_BSSMAP_oldToNewBSSIEs(ts_BSSMAP_LastUsedEUTRANPLMNId(g_pars.last_used_eutran_plmn));
@@ -5303,6 +5323,7 @@
f_ctrs_bsc_and_bts_init();

pars.last_used_eutran_plmn := '323454'O;
+   pars.exp_fast_return := true;
pars.sccp_addr_msc := g_bssap[0].sccp_addr_own;
pars.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;

@@ -7306,6 +7327,19 @@
f_vty_transceive(BSCVTY, "exit");
 }

+/* Allow/Forbid Fast Return after SRVCC on a given BTS via VTY */
+private function f_vty_allow_srvcc_fast_return(boolean allow, integer bts_nr) 
runs on test_CT {
+   f_vty_enter_cfg_bts(BSCVTY, bts_nr);
+   if (allow) {
+   f_vty_transceive(BSCVTY, "srvcc fast-return allow");
+   } else {
+   f_vty_transceive(BSCVTY, "srvcc fast-return forbid");
+   }
+   f_vty_transceive(BSCVTY, "exit");
+   f_vty_transceive(BSCVTY, "exit");
+   f_vty_transceive(BSCVTY, "exit");
+}
+
 /* Begin assignmet procedure and send an EMERGENCY SETUP (RR) */
 private function f_assignment_emerg_setup() runs on MSC_ConnHdlr {
var PDU_ML3_MS_NW emerg_setup;
@@ -8950,6 +8984,7 @@
}
execute( TC_srvcc_eutran_to_geran() );
execute( TC_srvcc_eutran_to_geran_ho_out() );
+   execute( TC_srvcc_eutran_to_geran_forbid_fast_return() );
execute( TC_ho_in_fail_msc_clears() );
execute( TC_ho_in_fail_msc_clears_after_ho_detect() );
execute( TC_ho_in_fail_no_detect() );
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index c29ccd4..a4f1f51 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -590,6 +590,7 @@
TestHdlrParamsMSCPool mscpool,
boolean media_mgw_offer_ipv6,
OCT3last_used_eutran_plmn optional,
+   boolean exp_fast_return, /* RR Release expected to contain 
CellSelectInd ? */
boolean expect_channel_mode_modify,
uint3_t expect_tsc optional
 };
@@ -628,6 +629,7 @@
},
media_mgw_offer_ipv6 := true,
last_used_eutran_plmn := omit,
+   exp_fast_return := false,
expect_channel_mode_modify := false,
expect_tsc := omit
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24679
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: 

Change in osmo-ttcn3-hacks[master]: bsc: Validate new SRVCC counters

2021-06-15 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24680 )


Change subject: bsc: Validate new SRVCC counters
..

bsc: Validate new SRVCC counters

Change-Id: Icf2cd00f4024533a1bd8ba52816750a836bc0cb2
---
M bsc/BSC_Tests.ttcn
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/80/24680/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 5ab2dd1..0e951dd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5284,6 +5284,10 @@
pars.last_used_eutran_plmn := '323454'O;
pars.exp_fast_return := true;
f_tc_ho_into_this_bsc_main(pars);
+
+   f_ctrs_bsc_and_bts_add(0, "srvcc:attempted");
+   f_ctrs_bsc_and_bts_add(0, "srvcc:completed");
+   f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
 }

@@ -5336,6 +5340,9 @@
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:completed", 1);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted", 1);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:completed", 1);
+
+   f_ctrs_bsc_and_bts_add(0, "srvcc:attempted", 1);
+   f_ctrs_bsc_and_bts_add(0, "srvcc:completed", 1);
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24680
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Icf2cd00f4024533a1bd8ba52816750a836bc0cb2
Gerrit-Change-Number: 24680
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

2021-06-15 Thread alealcon
alealcon has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )


Change subject: util: fix the functions "create_netns" and 
"setcap_netsys_admin".
..

util: fix the functions "create_netns" and "setcap_netsys_admin".

This commit fixes 2 functions from util.py:
 - setcap_netsys_admin: removed "self" from the arguments.
 - create_netns: pass "run_dir" to Process and convert the arguments to
a list as the other methods in the file.

Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
---
M src/osmo_gsm_tester/core/util.py
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/78/24678/1

diff --git a/src/osmo_gsm_tester/core/util.py b/src/osmo_gsm_tester/core/util.py
index 691b489..5ca6ad9 100644
--- a/src/osmo_gsm_tester/core/util.py
+++ b/src/osmo_gsm_tester/core/util.py
@@ -102,7 +102,7 @@
 proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', 
SETCAP_NET_ADMIN_BIN, binary])
 proc.launch_sync()
 
-def setcap_netsys_admin(self, binary, run_dir):
+def setcap_netsys_admin(binary, run_dir):
 '''
 This functionality requires specific setup on the host running
 osmo-gsm-tester. See osmo-gsm-tester manual for more information.
@@ -118,7 +118,7 @@
 '''
 from .process import Process
 NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh'
-proc = Process('create_netns', ('sudo', NETNS_SETUP_BIN, netns))
+proc = Process('create_netns',run_dir, ['sudo', NETNS_SETUP_BIN, netns])
 proc.launch_sync()

 def move_iface_to_netns(ifname, netns, run_dir):

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24677 )

Change subject: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
Gerrit-Change-Number: 24677
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 14:31:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: rewire build_encr_info() to return errors

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24676 )

Change subject: rewire build_encr_info() to return errors
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
Gerrit-Change-Number: 24676
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 14:28:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: use osmo_select_shutdown to get rid of SIGTERM sleep

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24675 )

Change subject: use osmo_select_shutdown to get rid of SIGTERM sleep
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
Gerrit-Change-Number: 24675
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 14:28:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24677 )


Change subject: dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()
..

dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()

An upcoming patch for A5/4 would need to add a kc128 arg and reject
cause rc to gsm0808_cipher_mode(). Instead prepare for less cruft by
just having a single function.

Related: SYS#5324
Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 25 insertions(+), 32 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/24677/1

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index da0429b..0b1c649 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -416,34 +416,6 @@
return -1;
 }

-/*! We received a GSM 08.08 CIPHER MODE from the MSC */
-static int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int 
cipher,
-  const uint8_t *key, int len, int include_imeisv)
-{
-   if (cipher > 0 && key == NULL) {
-   LOGP(DRSL, LOGL_ERROR, "%s: Need to have an encryption key.\n",
-bsc_subscr_name(conn->bsub));
-   return -1;
-   }
-
-   if (len > MAX_A5_KEY_LEN) {
-   LOGP(DRSL, LOGL_ERROR, "%s: The key is too long: %d\n",
-bsc_subscr_name(conn->bsub), len);
-   return -1;
-   }
-
-   LOGP(DRSL, LOGL_DEBUG, "(subscr %s) Cipher Mode: cipher=%d key=%s 
include_imeisv=%d\n",
-bsc_subscr_name(conn->bsub), cipher, osmo_hexdump_nospc(key, len), 
include_imeisv);
-
-   conn->lchan->encr.alg_id = RSL_ENC_ALG_A5(cipher);
-   if (key) {
-   conn->lchan->encr.key_len = len;
-   memcpy(conn->lchan->encr.key, key, len);
-   }
-
-   return gsm48_send_rr_ciph_mode(conn->lchan, include_imeisv);
-}
-
 static int bssmap_handle_clear_cmd(struct gsm_subscriber_connection *conn,
   struct msgb *msg, unsigned int length)
 {
@@ -553,13 +525,34 @@
goto reject;
}

-   /* To complete the confusion, gsm0808_cipher_mode again expects the 
encryption as a number
-* from 0 to 7. */
-   if (gsm0808_cipher_mode(conn, chosen_cipher, enc_key, enc_key_len,
-   include_imeisv)) {
+   if (chosen_cipher > 0 && !enc_key_len) {
+   LOGP(DRSL, LOGL_ERROR, "%s: Need to have an encryption key.\n",
+bsc_subscr_name(conn->bsub));
reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC;
goto reject;
}
+
+   if (enc_key_len > MAX_A5_KEY_LEN) {
+   LOGP(DRSL, LOGL_ERROR, "%s: The key is too long: %d\n",
+bsc_subscr_name(conn->bsub), len);
+   reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC;
+   goto reject;
+   }
+
+   conn->lchan->encr.alg_id = RSL_ENC_ALG_A5(chosen_cipher);
+   if (enc_key_len) {
+   conn->lchan->encr.key_len = enc_key_len;
+   memcpy(conn->lchan->encr.key, enc_key, enc_key_len);
+   }
+
+   LOGP(DRSL, LOGL_DEBUG, "(subscr %s) Cipher Mode: cipher=%d key=%s 
include_imeisv=%d\n",
+bsc_subscr_name(conn->bsub), chosen_cipher, 
osmo_hexdump_nospc(enc_key, enc_key_len),
+include_imeisv);
+
+   if (gsm48_send_rr_ciph_mode(conn->lchan, include_imeisv) < 0) {
+   reject_cause = GSM0808_CAUSE_RADIO_INTERFACE_FAILURE;
+   goto reject;
+   }
return 0;

 reject:

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
Gerrit-Change-Number: 24677
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: rewire build_encr_info() to return errors

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24676 )


Change subject: rewire build_encr_info() to return errors
..

rewire build_encr_info() to return errors

In build_encr_info(), validate the algorithm and key presence and return
negative if errors are encountered.

At all callers, handle the error case.

An upcoming patch will add handling of Kc128 for A5/4 encryption and
also wants to return error codes. This is a preparation for that patch:
I7c458c8a7350f34ff79531b3c891e1b367614469

Related: SYS#5324
Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 28 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/24676/1

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index ac8006d..f7072c9 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -152,13 +152,30 @@
memset(out+len, 0x2b, GSM_MACBLOCK_LEN - len);
 }

-/* Chapter 9.3.7: Encryption Information */
+/* Chapter 9.3.7: Encryption Information
+ * Return negative on error, number of bytes written to 'out' on success.
+ * 'out' must provide room for 17 bytes. */
 static int build_encr_info(uint8_t *out, struct gsm_lchan *lchan)
 {
*out++ = lchan->encr.alg_id & 0xff;
-   if (lchan->encr.key_len)
+   switch (lchan->encr.alg_id) {
+   case GSM0808_ALG_ID_A5_0:
+   return 1;
+
+   case GSM0808_ALG_ID_A5_1:
+   case GSM0808_ALG_ID_A5_2:
+   case GSM0808_ALG_ID_A5_3:
+   if (!lchan->encr.key_len) {
+   LOG_LCHAN(lchan, LOGL_ERROR, "A5/%d encryption chosen, 
but missing Kc\n", lchan->encr.alg_id);
+   return -EINVAL;
+   }
memcpy(out, lchan->encr.key, lchan->encr.key_len);
-   return lchan->encr.key_len + 1;
+   return 1 + lchan->encr.key_len;
+
+   default:
+   LOG_LCHAN(lchan, LOGL_ERROR, "A5/%d encryption not 
supported\n", lchan->encr.alg_id);
+   return -EINVAL;
+   }
 }

 /* If the TLV contain an RSL Cause IE, return pointer to the cause value. If 
there is no Cause IE, return
@@ -595,6 +612,10 @@
rc = build_encr_info(encr_info, lchan);
if (rc > 0)
msgb_tlv_put(msg, RSL_IE_ENCR_INFO, rc, encr_info);
+   if (rc < 0) {
+   msgb_free(msg);
+   return rc;
+   }
}

switch (act_type) {
@@ -688,6 +709,10 @@
rc = build_encr_info(encr_info, lchan);
if (rc > 0)
msgb_tlv_put(msg, RSL_IE_ENCR_INFO, rc, encr_info);
+   if (rc < 0) {
+   msgb_free(msg);
+   return rc;
+   }
}

if (gsm48_chan_mode_to_non_vamos(lchan->modify.ch_mode_rate.chan_mode) 
== GSM48_CMODE_SPEECH_AMR) {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
Gerrit-Change-Number: 24676
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: use osmo_select_shutdown to get rid of SIGTERM sleep

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24675 )


Change subject: use osmo_select_shutdown to get rid of SIGTERM sleep
..

use osmo_select_shutdown to get rid of SIGTERM sleep

Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/24675/1

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 14475ff..2a6c501 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -697,10 +697,12 @@
switch (signum) {
case SIGINT:
case SIGTERM:
+   /* If SIGTERM was already sent before, just terminate 
immediately. */
+   if (osmo_select_shutdown_requested())
+   exit(-1);
bsc_shutdown_net(bsc_gsmnet);
osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL);
-   sleep(3);
-   exit(0);
+   osmo_select_shutdown_request();
break;
case SIGABRT:
/* in case of abort, we want to obtain a talloc report and
@@ -1033,7 +1035,7 @@
}
}

-   while (1) {
+   while (!osmo_select_shutdown_done()) {
osmo_select_main_ctx(0);
}


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
Gerrit-Change-Number: 24675
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: implement A5/4 in Ciphering Mode procedure

2021-06-15 Thread neels
neels has uploaded a new patch set (#4) to the change originally created by 
Hoernchen. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24635 )

Change subject: implement A5/4 in Ciphering Mode procedure
..

implement A5/4 in Ciphering Mode procedure

Receive and store the Kc128 key from MSC, and use as key sent to BTS if
A5/4 is the chosen encryption algorithm.

(A5/4 in handover will follow in a separate patch)

Related: SYS#5324
Change-Id: I7c458c8a7350f34ff79531b3c891e1b367614469
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/osmo_bsc_bssap.c
3 files changed, 29 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/35/24635/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24635
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c458c8a7350f34ff79531b3c891e1b367614469
Gerrit-Change-Number: 24635
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: vty: allow A5/4 encryption in config

2021-06-15 Thread neels
neels has uploaded a new patch set (#2) to the change originally created by 
Hoernchen. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24634 )

Change subject: vty: allow A5/4 encryption in config
..

vty: allow A5/4 encryption in config

Add A5/4 to the internal mask of allowed algorithms.

(Not actually working yet, A5/4 implementation follows in other
patches.)

Related: SYS#5324
Change-Id: Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/24634/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24634
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4
Gerrit-Change-Number: 24634
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674 )

Change subject: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
Gerrit-Change-Number: 24674
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:40:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add TC_assignment_fr_a5_4

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673 )

Change subject: bsc: add TC_assignment_fr_a5_4
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
Gerrit-Change-Number: 24673
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:40:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add TC_ciph_mode_a5_4

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672 )

Change subject: bsc: add TC_ciph_mode_a5_4
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
Gerrit-Change-Number: 24672
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:40:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671 )

Change subject: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
Gerrit-Change-Number: 24671
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:39:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): fail quicker on key mismatch

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670 )

Change subject: bsc: f_cipher_mode(): fail quicker on key mismatch
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670/1/bsc/MSC_ConnectionHandler.ttcn
File bsc/MSC_ConnectionHandler.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670/1/bsc/MSC_ConnectionHandler.ttcn@734
PS1, Line 734:  expect_kc := ''O;
why isn't enc.enc_key set to ''O by default?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
Gerrit-Change-Number: 24670
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:39:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: implement ttcn API and cfg for A5/4

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669 )

Change subject: bsc: implement ttcn API and cfg for A5/4
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669/1/bsc/MSC_ConnectionHandler.ttcn
File bsc/MSC_ConnectionHandler.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669/1/bsc/MSC_ConnectionHandler.ttcn@548
PS1, Line 548:  octetstring enc_kc128 optional
This is already used in previous commit I think?


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669/1/bsc/MSC_ConnectionHandler.ttcn@732
PS1, Line 732:  expect_kc := enc.enc_kc128;
why not using same field regardless of the algo? in the end it's an octetstring.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
Gerrit-Change-Number: 24669
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:37:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: reduce args to f_cipher_mode()

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668 )

Change subject: bsc: reduce args to f_cipher_mode()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
Gerrit-Change-Number: 24668
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:35:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: replace TC_assignment_fr_a5_4 with TC_assignment_fr_a5_not_sup

2021-06-15 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667 )

Change subject: bsc: replace TC_assignment_fr_a5_4 with 
TC_assignment_fr_a5_not_sup
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667/1/bsc/BSC_Tests.ttcn
File bsc/BSC_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667/1/bsc/BSC_Tests.ttcn@3425
PS1, Line 3425: //f_establish_fully(ass_cmd, exp_compl);
so this can be dropped?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I83eca18d1b3d8d58177aa3750935ec5a3a985ca4
Gerrit-Change-Number: 24667
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 13:34:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674 )


Change subject: bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail
..

bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail

Allow only A5/4, but omit the Kc128 IE from MSC's msg. Expect Cipher
Mode Reject.

Related: SYS#5324
Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
---
M bsc/BSC_Tests.ttcn
M bsc/expected-results.xml
2 files changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/74/24674/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index b4f3904..cef895d 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3415,6 +3415,20 @@
f_shutdown_helper();
 }

+/* Allow only A5/4, but omit the Kc128 IE from MSC's msg. Expect Cipher Mode 
Reject. */
+testcase TC_assignment_fr_a5_4_fail() runs on test_CT {
+   var TestHdlrParams pars := f_gen_test_hdlr_pars();
+   var MSC_ConnHdlr vc_conn;
+
+   f_init(1, true);
+   f_sleep(1.0);
+
+   pars.encr := valueof(t_EncrParams('10'O, f_rnd_octstring(8))); // A5/4 
support, but Kc128 missing!
+   vc_conn := f_start_handler(refers(f_TC_assignment_a5_not_sup), pars);
+   vc_conn.done;
+   f_shutdown_helper();
+}
+
 /* Expect ASSIGNMENT FAIL if mandatory IE is missing */
 private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on 
MSC_ConnHdlr {
g_pars := f_gen_test_hdlr_pars();
@@ -8880,6 +8894,7 @@
}
execute( TC_assignment_fr_a5_3() );
execute( TC_assignment_fr_a5_4() );
+   execute( TC_assignment_fr_a5_4_fail() );
execute( TC_assignment_fr_a5_not_sup() );
execute( TC_ciph_mode_a5_0() );
execute( TC_ciph_mode_a5_1() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index e3a6a87..0efc3e0 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -48,6 +48,7 @@
   
   
   
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24674
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
Gerrit-Change-Number: 24674
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: add TC_assignment_fr_a5_4

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673 )


Change subject: bsc: add TC_assignment_fr_a5_4
..

bsc: add TC_assignment_fr_a5_4

Establish a TCH/F with A5/4 encryption.

Related: SYS#5324
Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
---
M bsc/BSC_Tests.ttcn
M bsc/expected-results.xml
2 files changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/73/24673/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index a5fc999..b4f3904 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3402,6 +3402,18 @@
vc_conn.done;
f_shutdown_helper();
 }
+/* Establish a Signalling channel and re-assign to TCH/F with A5/4 encryption. 
*/
+testcase TC_assignment_fr_a5_4() runs on test_CT {
+   var MSC_ConnHdlr vc_conn;
+   var TestHdlrParams pars := f_gen_test_hdlr_pars();
+   pars.encr := valueof(t_EncrParams('10'O, f_rnd_octstring(8), 
f_rnd_octstring(16)));
+
+   f_init(1, true);
+   f_sleep(1.0);
+   vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5), pars);
+   vc_conn.done;
+   f_shutdown_helper();
+}

 /* Expect ASSIGNMENT FAIL if mandatory IE is missing */
 private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on 
MSC_ConnHdlr {
@@ -8867,6 +8879,7 @@
execute( TC_assignment_fr_a5_1_codec_missing() );
}
execute( TC_assignment_fr_a5_3() );
+   execute( TC_assignment_fr_a5_4() );
execute( TC_assignment_fr_a5_not_sup() );
execute( TC_ciph_mode_a5_0() );
execute( TC_ciph_mode_a5_1() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index ab1a9e4..e3a6a87 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -47,6 +47,7 @@
   
   
   
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24673
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
Gerrit-Change-Number: 24673
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: add TC_ciph_mode_a5_4

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672 )


Change subject: bsc: add TC_ciph_mode_a5_4
..

bsc: add TC_ciph_mode_a5_4

Establish a Signalling channel with A5/4 encryption.

Related: SYS#5324
Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
---
M bsc/BSC_Tests.ttcn
M bsc/expected-results.xml
2 files changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/72/24672/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index b9e6bfd..a5fc999 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3326,7 +3326,18 @@
vc_conn.done;
f_shutdown_helper();
 }
+/* Establish a Signalling channel with A5/4 encryption. */
+testcase TC_ciph_mode_a5_4() runs on test_CT {
+   var MSC_ConnHdlr vc_conn;
+   var TestHdlrParams pars := f_gen_test_hdlr_pars();
+   pars.encr := valueof(t_EncrParams('10'O, f_rnd_octstring(8), 
f_rnd_octstring(16)));

+   f_init(1, true);
+   f_sleep(1.0);
+   vc_conn := f_start_handler(refers(f_tc_ciph_mode_a5), pars);
+   vc_conn.done;
+   f_shutdown_helper();
+}
 /* establish initial channel, enable ciphering followed by assignment to 
ciphered channel */
 private function f_tc_assignment_aoip_tla_v6(charstring id) runs on 
MSC_ConnHdlr {
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
@@ -8860,6 +8871,7 @@
execute( TC_ciph_mode_a5_0() );
execute( TC_ciph_mode_a5_1() );
execute( TC_ciph_mode_a5_3() );
+   execute( TC_ciph_mode_a5_4() );

execute( TC_assignment_codec_fr() );
execute( TC_assignment_codec_fr_by_mode_modify() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index f91de19..ab1a9e4 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -51,6 +51,7 @@
   
   
   
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24672
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
Gerrit-Change-Number: 24672
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671 )


Change subject: bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
..

bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg

Related: SYS#5324
Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/71/24671/1

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index d902301..7fb7130 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -758,11 +758,13 @@
repeat;
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap {
-   // 
bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier
if (exp_fail == true) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Unexpected Cipher Mode Complete");
} else {
setverdict(pass);
+   if 
(oct2int(bssap.pdu.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algorithmIdentifier)
 != enum2int(alg_rsl)) {
+   setverdict(fail, "Unexpected Encryption 
Algorithm ID in BSSMAP Cipher Mode Complete");
+   }
}
}
[] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24671
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
Gerrit-Change-Number: 24671
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: f_cipher_mode(): fail quicker on key mismatch

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670 )


Change subject: bsc: f_cipher_mode(): fail quicker on key mismatch
..

bsc: f_cipher_mode(): fail quicker on key mismatch

Related: SYS#5324
Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/70/24670/1

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 799d41e..d902301 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -730,6 +730,8 @@

if (alg_rsl == RSL_ALG_ID_A5_4 and ispresent(enc.enc_kc128)) {
expect_kc := enc.enc_kc128;
+   } else if (alg_rsl == RSL_ALG_ID_A5_0) {
+   expect_kc := ''O;
} else {
expect_kc := enc.enc_key;
}
@@ -737,9 +739,19 @@

alt {
/* RSL/UE Side */
-   [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, expect_kc)) -> 
value rsl {
+   [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, ?)) -> value rsl {
var PDU_ML3_NW_MS l3 := 
dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload);
log("Rx L3 from net: ", l3);
+
+   var RSL_IE_Body encr_info;
+   if (not f_rsl_find_ie(rsl, RSL_IE_ENCR_INFO, encr_info)) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Missing Encryption IE in RSL ENCR CMD");
+   } else {
+   if (not match(encr_info, tr_EncrInfo(alg_rsl, 
expect_kc))) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail,
+   "Unexpected Kc in 
Encryption IE in RSL ENCR CMD");
+   }
+   }
if (ischosen(l3.msgs.rrm.cipheringModeCommand)) {
f_rsl_reply(ts_RRM_CiphModeCompl, rsl);
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24670
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
Gerrit-Change-Number: 24670
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: replace TC_assignment_fr_a5_4 with TC_assignment_fr_a5_not_sup

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667 )


Change subject: bsc: replace TC_assignment_fr_a5_4 with 
TC_assignment_fr_a5_not_sup
..

bsc: replace TC_assignment_fr_a5_4 with TC_assignment_fr_a5_not_sup

reasons:

* TC_assignment_fr_a5_4() runs an unusual sequence of messages: it first
  fully assigns an lchan, and after that sends a Cipher Mode Command.
  Usually, the ciphering happens as part of attaching (Compl L3).
  The new test TC_assignment_fr_a5_not_sup() does the ciphering in the
  usual sequence, and properly expects a Cipher Mode Reject.

* TC_assignment_fr_a5_4 means to ask for an *unsupported* encryption
  algo. Since we are going to introduce A5/4 support shortly, we'll need
  to free up this name, for a successful A5/4 encryption test.

New test TC_assignment_fr_a5_not_sup() asks for A5/5 encryption, which
is not supported.

Related: SYS#5324
Change-Id: I83eca18d1b3d8d58177aa3750935ec5a3a985ca4
---
M bsc/BSC_Tests.ttcn
M bsc/expected-results.xml
2 files changed, 43 insertions(+), 15 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/67/24667/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 41deea1..845869a 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3415,26 +3415,54 @@
f_shutdown_helper();
 }

-private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr {
-   g_pars := f_gen_test_hdlr_pars();
-   var template PDU_BSSAP exp_compl := f_gen_exp_compl();
-   var PDU_BSSAP ass_cmd := f_gen_ass_req();
-   const OCT8 kc := '0001020304050607'O;
-   const OCT16 kc128 := kc & kc;
+private function f_TC_assignment_a5_not_sup(charstring id) runs on 
MSC_ConnHdlr {
+   var template PDU_BSSAP exp_ass_cpl := f_gen_exp_compl();
+   var PDU_BSSAP ass_tpl := f_gen_ass_req();

-   ass_cmd.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
-   ass_cmd.pdu.bssmap.assignmentRequest.codecList := 
valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
-   f_establish_fully(ass_cmd, exp_compl);
-   f_cipher_mode('10'O, kc, kc128, true);
-   /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause 
value */
+   ass_tpl.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
+   ass_tpl.pdu.bssmap.assignmentRequest.codecList := 
valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
+
+   //f_establish_fully(ass_cmd, exp_compl);
+
+   var BSSMAP_FIELD_CodecType codecType;
+   timer T := 10.0;
+
+   codecType := 
valueof(ass_tpl.pdu.bssmap.assignmentRequest.codecList.codecElements[0].codecType);
+   f_MscConnHdlr_init(g_pars.media_nr, host_bts, host_mgw_mgcp, codecType);
+
+   f_create_chan_and_exp();
+   /* we should now have a COMPL_L3 at the MSC */
+
+   var template PDU_BSSAP exp_l3_compl;
+   exp_l3_compl := tr_BSSMAP_ComplL3()
+   if (g_pars.aoip == false) {
+   exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := 
omit;
+   } else {
+   exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := 
?;
+   }
+   T.start;
+   alt {
+   [] BSSAP.receive(exp_l3_compl);
+   [] BSSAP.receive(tr_BSSMAP_ComplL3) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Received 
non-matching COMPLETE LAYER 3 INFORMATION");
+   }
+   [] T.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
waiting for COMPLETE LAYER 3 INFORMATION");
+   }
+   }
+
+   /* Start ciphering, expect Cipher Mode Reject */
+   f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key, exp_fail := 
true);
 }
-testcase TC_assignment_fr_a5_4() runs on test_CT {
+testcase TC_assignment_fr_a5_not_sup() runs on test_CT {
+   var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;

f_init(1, true);
f_sleep(1.0);

-   vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4));
+   pars.encr := valueof(t_EncrParams('20'O, f_rnd_octstring(8)));
+   vc_conn := f_start_handler(refers(f_TC_assignment_a5_not_sup), pars);
vc_conn.done;
f_shutdown_helper();
 }
@@ -8828,7 +8856,7 @@
execute( TC_assignment_fr_a5_1_codec_missing() );
}
execute( TC_assignment_fr_a5_3() );
-   execute( TC_assignment_fr_a5_4() );
+   execute( TC_assignment_fr_a5_not_sup() );
execute( TC_ciph_mode_a5_0() );
execute( TC_ciph_mode_a5_1() );
execute( TC_ciph_mode_a5_3() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index c98d3c7..f91de19 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -47,7 +47,7 @@
   
   
   
-  
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24667

Change in osmo-ttcn3-hacks[master]: bsc: implement ttcn API and cfg for A5/4

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669 )


Change subject: bsc: implement ttcn API and cfg for A5/4
..

bsc: implement ttcn API and cfg for A5/4

Implement tools for OsmoBSC a5/4 support testing:

- add g_pars.encr.enc_kc128
- in f_cipher_mode() and f_check_chan_act(), expect Kc128 key as
  appropriate.
- osmo-bsc.cfg: allow a5/4

Related: SYS#5324
Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
M bsc/osmo-bsc.cfg
3 files changed, 25 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/69/24669/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index e3720e5..b9e6bfd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3461,7 +3461,7 @@
f_init(1, true);
f_sleep(1.0);

-   pars.encr := valueof(t_EncrParams('20'O, f_rnd_octstring(8)));
+   pars.encr := valueof(t_EncrParams('20'O, f_rnd_octstring(8), 
f_rnd_octstring(16)));
vc_conn := f_start_handler(refers(f_TC_assignment_a5_not_sup), pars);
vc_conn.done;
f_shutdown_helper();
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index c266c19..799d41e 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -544,12 +544,14 @@

 type record TestHdlrEncrParams {
OCT1enc_alg,
-   octetstring enc_key
+   octetstring enc_key,
+   octetstring enc_kc128 optional
 };

-template (value) TestHdlrEncrParams t_EncrParams(OCT1 alg, octetstring key) := 
{
+template (value) TestHdlrEncrParams t_EncrParams(OCT1 alg, octetstring key, 
template (omit) octetstring kc128 := omit) := {
enc_alg := alg,
-   enc_key := key
+   enc_key := key,
+   enc_kc128 := kc128
 }

 type record TestHdlrParamsLcls {
@@ -714,6 +716,7 @@
var PDU_BSSAP bssap;
var RSL_Message rsl;
var RSL_AlgId alg_rsl;
+   var octetstring expect_kc;

if (isvalue(enc.enc_kc128)) {
BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(enc.enc_alg, 
enc.enc_key, valueof(enc.enc_kc128)));
@@ -725,9 +728,16 @@
 * so we need to convert first */
alg_rsl := f_chipher_mode_bssmap_to_rsl(enc.enc_alg);

+   if (alg_rsl == RSL_ALG_ID_A5_4 and ispresent(enc.enc_kc128)) {
+   expect_kc := enc.enc_kc128;
+   } else {
+   expect_kc := enc.enc_key;
+   }
+   log("for encryption algo ", alg_rsl, " expect kc = ", expect_kc);
+
alt {
/* RSL/UE Side */
-   [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, key)) -> value 
rsl {
+   [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, expect_kc)) -> 
value rsl {
var PDU_ML3_NW_MS l3 := 
dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload);
log("Rx L3 from net: ", l3);
if (ischosen(l3.msgs.rrm.cipheringModeCommand)) {
@@ -838,8 +848,15 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Missing Encryption IE in CHAN ACT");
} else {
var RSL_AlgId alg := 
f_chipher_mode_bssmap_to_rsl(g_pars.encr.enc_alg);
-   if (not match(encr_info, tr_EncrInfo(alg, 
g_pars.encr.enc_key))) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail, "Wrong Encryption IE in CHAN ACT");
+   var octetstring expect_key;
+   if (alg == RSL_ALG_ID_A5_4) {
+   expect_key := g_pars.encr.enc_kc128;
+   } else {
+   expect_key := g_pars.encr.enc_key;
+   }
+   if (not match(encr_info, tr_EncrInfo(alg, expect_key))) 
{
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail,
+   "Unexpected Kc in 
Encryption IE in RSL ENCR CMD");
}
}
} else {
diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg
index b64a63d..7b0fa2a 100644
--- a/bsc/osmo-bsc.cfg
+++ b/bsc/osmo-bsc.cfg
@@ -69,7 +69,7 @@
 network
  network country code 1
  mobile network code 1
- encryption a5 0 1 3
+ encryption a5 0 1 3 4
  neci 1
  paging any use tch 0
  handover 1

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24669
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
Gerrit-Change-Number: 24669
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: bsc: reduce args to f_cipher_mode()

2021-06-15 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668 )


Change subject: bsc: reduce args to f_cipher_mode()
..

bsc: reduce args to f_cipher_mode()

Instead of passing each part individually, simply pass the entire
TestHdlrEncrParams to f_cipher_mode().

Preparation for A5/4.

Related: SYS#5324
Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 8 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/68/24668/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 845869a..e3720e5 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3452,7 +3452,7 @@
}

/* Start ciphering, expect Cipher Mode Reject */
-   f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key, exp_fail := 
true);
+   f_cipher_mode(g_pars.encr, exp_fail := true);
 }
 testcase TC_assignment_fr_a5_not_sup() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
@@ -6726,7 +6726,7 @@
/* start ciphering, if requested */
if (ispresent(g_pars.encr)) {
f_logp(BSCVTY, "start ciphering");
-   f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
+   f_cipher_mode(g_pars.encr);
}
}

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index c29ccd4..c266c19 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -709,21 +709,21 @@
}
 }

-function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit, 
boolean exp_fail := false)
+function f_cipher_mode(TestHdlrEncrParams enc, boolean exp_fail := false)
 runs on MSC_ConnHdlr {
var PDU_BSSAP bssap;
var RSL_Message rsl;
var RSL_AlgId alg_rsl;

-   if (isvalue(kc128)) {
-   BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(alg, key, 
valueof(kc128)));
+   if (isvalue(enc.enc_kc128)) {
+   BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(enc.enc_alg, 
enc.enc_key, valueof(enc.enc_kc128)));
} else {
-   BSSAP.send(ts_BSSMAP_CipherModeCmd(alg, key));
+   BSSAP.send(ts_BSSMAP_CipherModeCmd(enc.enc_alg, enc.enc_key));
}

/* RSL uses a different representation of the encryption algorithm,
 * so we need to convert first */
-   alg_rsl := f_chipher_mode_bssmap_to_rsl(alg);
+   alg_rsl := f_chipher_mode_bssmap_to_rsl(enc.enc_alg);

alt {
/* RSL/UE Side */
@@ -1145,7 +1145,7 @@

/* start ciphering, if requested */
if (ispresent(g_pars.encr)) {
-   f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
+   f_cipher_mode(g_pars.encr);
}

/* bail out early if no assignment requested */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24668
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
Gerrit-Change-Number: 24668
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


Change in libosmocore[master]: gprs_ns2_sns: implement outbound SNS DEL procedures

2021-06-15 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24591 )

Change subject: gprs_ns2_sns: implement outbound SNS DEL procedures
..


Patch Set 4: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/24591/4/src/gb/gprs_ns2_sns.c
File src/gb/gprs_ns2_sns.c:

https://gerrit.osmocom.org/c/libosmocore/+/24591/4/src/gb/gprs_ns2_sns.c@2110
PS4, Line 2110: 
gprs_ns2_free_nsvc(nsvc);
Check if runtime NSVCs are still valid (sig_weight > 0)



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I53cd54dfd262c70c425c3f13dad3b29526daa523
Gerrit-Change-Number: 24591
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 12:31:39 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2_sns: implement outbound SNS ADD procedures

2021-06-15 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24123 )

Change subject: gprs_ns2_sns: implement outbound SNS ADD procedures
..


Patch Set 7:

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/24123/7/src/gb/gprs_ns2_sns.c
File src/gb/gprs_ns2_sns.c:

https://gerrit.osmocom.org/c/libosmocore/+/24123/7/src/gb/gprs_ns2_sns.c@1968
PS7, Line 1968: OSMO_ASSERT(gss->role == 
GPRS_SNS_ROLE_BSS);
Not sure if this really holds true, we should ensure that we don't accidentally 
abort here.


https://gerrit.osmocom.org/c/libosmocore/+/24123/7/src/gb/gprs_ns2_sns.c@1976
PS7, Line 1976: (void *) 1
Can we have a #define for this so it's clear what the 1 actually means?
Same in AF_INET6 below



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I71c33200bd1f0307ceb943ee958db5ebe3623d36
Gerrit-Change-Number: 24123
Gerrit-PatchSet: 7
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Tue, 15 Jun 2021 12:17:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2_sns: implement local change weight procedure

2021-06-15 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/23187 )

Change subject: gprs_ns2_sns: implement local change weight procedure
..


Patch Set 10:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_sns.c
File src/gb/gprs_ns2_sns.c:

https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_sns.c@1521
PS10, Line 1521:break;
maybe I should remove this one



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icec4dabb46bc198f68f91bfe09ba279fbe68d454
Gerrit-Change-Number: 23187
Gerrit-PatchSet: 10
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 12:10:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2_sns: implement local change weight procedure

2021-06-15 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/23187 )

Change subject: gprs_ns2_sns: implement local change weight procedure
..


Patch Set 10:

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_internal.h
File src/gb/gprs_ns2_internal.h:

https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_internal.h@79
PS10, Line 79:  NS_TOUT_TSNS_PROCEDURES_RETRIES,
Add a NS_TOUT_MAX here and #define NS_TIMERS_COUNT NS_TOUT_MAX?


https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_sns.c
File src/gb/gprs_ns2_sns.c:

https://gerrit.osmocom.org/c/libosmocore/+/23187/10/src/gb/gprs_ns2_sns.c@109
PS10, Line 109: { GPRS_SNS_EV_REQ_CHANGE_WEIGHT,
"REQ_UPDATE_WEIGHT"},
Change weight vs. update weight



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icec4dabb46bc198f68f91bfe09ba279fbe68d454
Gerrit-Change-Number: 23187
Gerrit-PatchSet: 10
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 12:06:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_ns2_sns: refactor SNS failures into a function

2021-06-15 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24649 )

Change subject: gprs_ns2_sns: refactor SNS failures into a function
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/24649/1/src/gb/gprs_ns2_sns.c
File src/gb/gprs_ns2_sns.c:

https://gerrit.osmocom.org/c/libosmocore/+/24649/1/src/gb/gprs_ns2_sns.c@184
PS1, Line 184:  gprs_ns2_free_nse(gss->nse);
As mentioned on call we have ROLE_SGSN NSE which are persistent and configured 
with specific binds (and should not be deleted).



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1896f6c3ddb4f98ca261139c1cc77aa8f1558c6f
Gerrit-Change-Number: 24649
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Tue, 15 Jun 2021 11:46:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bsc: Fix race condition exiting f_ho_out_of_this_bsc

2021-06-15 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665 )


Change subject: bsc: Fix race condition exiting f_ho_out_of_this_bsc
..

bsc: Fix race condition exiting f_ho_out_of_this_bsc

The function didn't wait to receive the 2 messages from the BSC. As a
result, they may have arrived while tearing down the test components
shortly after exiting the function and provoke a Dynamic Test Error
while pushing the messages up the stack since some of the stack layers
may already be unavailable.

Test TC_ho_out_of_this_bsc() workarounded this by using a f_sleep(1),
but TC_srvcc_eutran_to_geran_ho_out() didn't, making it fail sometimes.

Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
---
M bsc/BSC_Tests.ttcn
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/65/24665/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 41deea1..074fa60 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4858,6 +4858,12 @@
BSSAP.send(ts_BSSMAP_ClearCommand(cause));

f_expect_dlcx_conns();
+
+   interleave {
+   [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch 
tr_RRM_RR_RELEASE));
+   [] RSL.receive(tr_RSL_DEACT_SACCH(g_chan_nr));
+   [] RSL.receive(tr_RSL_RF_CHAN_REL(g_chan_nr));
+   }
setverdict(pass);
 }

@@ -4870,7 +4876,6 @@
f_establish_fully(ass_req, exp_compl);

f_ho_out_of_this_bsc();
-   f_sleep(1.0);
 }
 testcase TC_ho_out_of_this_bsc() runs on test_CT {
var MSC_ConnHdlr vc_conn;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24665
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
Gerrit-Change-Number: 24665
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in libosmocore[master]: gprs_ns2_sns: free the NSE if the SIZE PDU is not valid

2021-06-15 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/24650 )

Change subject: gprs_ns2_sns: free the NSE if the SIZE PDU is not valid
..


Patch Set 2: Code-Review-1

blocking this commit. NSE should be only freed when not persistant.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ife889091ecba4180a90743deb786767008fe863d
Gerrit-Change-Number: 24650
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 15 Jun 2021 11:19:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: ns: test if SNS fails when all signalling NSVCs failes

2021-06-15 Thread lynxis lazus
lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651 )

Change subject: ns: test if SNS fails when all signalling NSVCs failes
..

ns: test if SNS fails when all signalling NSVCs failes

As 3GPP TS 48.016 § 7.4b.1.1 specifies this behaviour.
1. do success SNS configuration
2. change sig weight of the seconds inactive bind
3. add second bind to SNS
4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
5. expect SNS SIZE

Related: OS#5039
Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
---
M ns/NS_Tests.ttcn
1 file changed, 36 insertions(+), 0 deletions(-)

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



diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 8bbb43c..9fbd5ab 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -626,6 +626,41 @@
f_clean_ns_codec();
 }

+/* Test if SNS fails when all signalling NSVCs failes
+ * 3GPP TS 48.016 § 7.4b.1.1
+ * 1. do success SNS configuration
+ * 2. change sig weight of the seconds inactive bind
+ * 3. add second bind to SNS
+ * 4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
+ * 5. expect SNS SIZE
+ */
+testcase TC_sns_bss_all_signalling_nsvcs_failed() runs on RAW_Test_CT {
+   g_handle_rx_alive := true;
+   f_init_vty();
+   f_init_ns_codec(mp_nsconfig);
+   f_init_ns_codec(mp_nsconfig, 1);
+   f_incoming_sns_size();
+   f_incoming_sns_config();
+   f_outgoing_sns_config();
+   var default d := activate(as_rx_alive_tx_ack());
+
+   f_vty_config2(NSVTY, {"ns", "bind udp local2"}, "ip-sns 
signalling-weight 0 data-weight 99");
+   f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, 
"ip-sns-bind local2");
+   f_incoming_sns_add(idx_add := 1, w_sig := 0, w_user := 99);
+   as_rx_alive_tx_ack(oneshot := true, idx := 1);
+   activate(as_rx_alive_tx_ack(idx := 1));
+   /* 2x NSVCs up, stop first NSVC */
+   deactivate(d);
+   /* libosmocore will rotate the SNS binds on failure */
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   f_incoming_sns_size(idx := 1);
+
+   setverdict(pass);
+   f_clean_ns_codec();
+}
+
 control {
if (mp_dialect == NS2_DIALECT_STATIC_RESETBLOCK or mp_dialect == 
NS2_DIALECT_IPACCESS) {
execute( TC_tx_reset() );
@@ -676,6 +711,7 @@
execute( TC_sns_bss_add() );
execute( TC_sns_bss_del() );
execute( TC_sns_bss_add_change_del() );
+   execute( TC_sns_bss_all_signalling_nsvcs_failed() );
}
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
Gerrit-Change-Number: 24651
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


  1   2   >