openbsc[master]: libmsc/auth.c: use libosmogsm authentication API

2018-03-21 Thread Neels Hofmeyr

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/7398/2/openbsc/src/libmsc/auth.c
File openbsc/src/libmsc/auth.c:

Line 107:   aud2g.algo = OSMO_AUTH_ALG_XOR;
IIUC, there is no actual XOR implementation as osmo_auth_algo in libosmocore; 
there's lots of stubs, but no actual registering of an osmo_auth_algo: grep for 
"MILENAGE" shows 

  auth_milenage.c:172:  .algo = OSMO_AUTH_ALG_MILENAGE,

but no such match for XOR.


-- 
To view, visit https://gerrit.osmocom.org/7398
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I08dae631bcfc1bb3a4817084723e04a59c745329
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


openbsc[master]: libmsc/auth.c: add Milenage algorithm support

2018-03-21 Thread Neels Hofmeyr

Patch Set 2: Code-Review-1

This patch is naive: for milenage, just the K is not enough. You need OP/OPC 
and SQN management. Take a look at what osmo-hlr and osmo-msc are doing to 
support UMTS AKA on GERAN (2G).

Meta: our choice was explicitly to not backport all of that into osmo-nitb, 
since it is a large amount of work for a pretty much dead-end program. If you 
really really want to go that way, you'd be pretty much alone maintaining that. 
I would recommend otherwise and am personally not prepared to spend time 
reviewing such changes.

Do take a look at the openbsc.git vlr_2G branch that was working prior to the 
repository split. It is a code state of osmo-nitb that should be capable of 
talking to osmo-hlr for auth tokens. Following that is vlr_3G, which actually 
cuts off GERAN support for the benefit of UTRAN. I believe it would be more fun 
to use osmo-hlr and libvlr with osmo-nitb from that branch, and to backport 
fixes we've applied in osmo-msc since, instead of re-implementing all of the 
AKA again. (I'd still not want to spend time on that though, just suggesting a 
solution that makes slightly less no sense, IMHO.)

-- 
To view, visit https://gerrit.osmocom.org/7399
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I519e6bb4eb37a5ac70556d580a18fcae62730a76
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-pcu[master]: Revert "Use Timing Advance Index in UL assignments"

2018-03-21 Thread Neels Hofmeyr

Patch Set 1:

I know that you opposed these reverts; but since nothing else is happening to 
fix usability of osmo-pcu, I still think that it's a good start to remove the 
changes that broke it. Let's re-apply them once we understand whatever it is 
that they are doing; particularly since these reverts apply cleanly onto 
current master, which means that the changes are sufficiently independent of 
the other changes that happened since. If we never get time to do it, then at 
least osmo-pcu isn't broken forever, like it is now.

-- 
To view, visit https://gerrit.osmocom.org/6976
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5e0fd8c9c3b89e519e7382e3d0bb24e0aeddeff6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-msc[master]: trans_free: tear down conn when last transaction is done

2018-03-21 Thread Neels Hofmeyr

Patch Set 3:

I still think it makes sense to merge this. Even when I revisit the subscr conn 
FSM soon, something similar would have to happen there, and the unit test will 
ensure that I get that bit right.

-- 
To view, visit https://gerrit.osmocom.org/7303
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I46ff2e9b09b67e4e0d79cccf8c04936f17281fcb
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: fixup: apply mnc3 change also in ipaccess/network_listen.c

2018-03-21 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/7441

fixup: apply mnc3 change also in ipaccess/network_listen.c

Preceding commit I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8 changed the
ipac_bcch_info.cgi type to osmo_cell_global_id, but did not carry out
corresponding changes in ipaccess/network_listen.c.

The reason this was not caught is that recent commit
I68286d26e2014048b054f39ef29c35fef420cc97 adding the new gscon FSM actually
disables ipaccess-config in the build.

Fix the build, given that ipaccess-config were re-enabled.

Change-Id: I15cd58e8ba0563ce4e42a61e79d01394b61593dd
---
M src/ipaccess/network_listen.c
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/src/ipaccess/network_listen.c b/src/ipaccess/network_listen.c
index dd6cb4b..bbaf798 100644
--- a/src/ipaccess/network_listen.c
+++ b/src/ipaccess/network_listen.c
@@ -185,10 +185,10 @@
DEBUGP(DNM, "BCCH Info parsing failed\n");
break;
}
-   DEBUGP(DNM, "==> ARFCN %u, RxLev %2u, RxQual %2u: %3d-%d, LAC 
%d CI %d BSIC %u\n",
+   DEBUGP(DNM, "==> ARFCN %u, RxLev %2u, RxQual %2u: %s, LAC %d CI 
%d BSIC %u\n",
binfo.arfcn, binfo.rx_lev, binfo.rx_qual,
-   binfo.cgi.mcc, binfo.cgi.mnc,
-   binfo.cgi.lac, binfo.cgi.ci, binfo.bsic);
+   osmo_plmn_name(),
+   binfo.cgi.lai.lac, binfo.cgi.cell_identity, binfo.bsic);
 
if (binfo.arfcn != last_arfcn) {
/* report is on a new arfcn, need to clear channel list 
*/

-- 
To view, visit https://gerrit.osmocom.org/7441
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15cd58e8ba0563ce4e42a61e79d01394b61593dd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] openbsc[master]: backport support for 3-digit MNC with leading zeros

2018-03-21 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7417

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

backport support for 3-digit MNC with leading zeros

Backport the patches with the following change-ids:
 osmo-bsc.git:
  I5b097dbb6329f284e3b4914a744d5c3ad628f715
  I8e722103344186fde118b26d8353db95a4581daa
  I78f30aef7aa224b2e9db54c3a844d8f520b3aee0
  I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8
 osmo-iuh.git:
  I29ebcddd45fe3079f8883589a83cc7216a535475

Also apply change of ipac_bcch_info.cgi to struct osmo_cell_global_id in
src/ipaccess/network_listen.c, a change that appears to not have been necessary
in the new split repositories.

Related: OS#3010
Change-Id: Ibf50fd7e1ca5472d0a38fcb87c68227d6de44f42
---
M openbsc/include/openbsc/abis_nm.h
M openbsc/include/openbsc/bsc_msc_data.h
M openbsc/include/openbsc/gsm_data.h
M openbsc/include/openbsc/pcuif_proto.h
M openbsc/src/ipaccess/network_listen.c
M openbsc/src/libbsc/abis_nm.c
M openbsc/src/libbsc/bsc_ctrl_commands.c
M openbsc/src/libbsc/bsc_init.c
M openbsc/src/libbsc/bsc_vty.c
M openbsc/src/libbsc/pcu_sock.c
M openbsc/src/libbsc/system_information.c
M openbsc/src/libcommon-cs/common_cs.c
M openbsc/src/libcommon-cs/common_cs_vty.c
M openbsc/src/libcommon/gsm_data.c
M openbsc/src/libiu/iu.c
M openbsc/src/libmsc/gsm_04_08.c
M openbsc/src/osmo-bsc/osmo_bsc_api.c
M openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
M openbsc/src/osmo-bsc/osmo_bsc_filter.c
M openbsc/src/osmo-bsc/osmo_bsc_msc.c
M openbsc/src/osmo-bsc/osmo_bsc_vty.c
M openbsc/tests/ctrl_test_runner.py
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
23 files changed, 211 insertions(+), 160 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/17/7417/2

diff --git a/openbsc/include/openbsc/abis_nm.h 
b/openbsc/include/openbsc/abis_nm.h
index db2a659..d7ab7d5 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -31,13 +31,6 @@
 /* max number of attributes represented as 3GPP TS 52.021 §9.4.62 SW 
Description array */
 #define MAX_BTS_ATTR 5
 
-struct cell_global_id {
-   uint16_t mcc;
-   uint16_t mnc;
-   uint16_t lac;
-   uint16_t ci;
-};
-
 /* The BCCH info from an ip.access test, in host byte order
  * and already parsed... */
 struct ipac_bcch_info {
@@ -52,7 +45,7 @@
uint16_t frame_offset;
uint32_t frame_nr_offset;
uint8_t bsic;
-   struct cell_global_id cgi;
+   struct osmo_cell_global_id cgi;
uint8_t ba_list_si2[16];
uint8_t ba_list_si2bis[16];
uint8_t ba_list_si2ter[16];
diff --git a/openbsc/include/openbsc/bsc_msc_data.h 
b/openbsc/include/openbsc/bsc_msc_data.h
index 9a92955..1b1ffc2 100644
--- a/openbsc/include/openbsc/bsc_msc_data.h
+++ b/openbsc/include/openbsc/bsc_msc_data.h
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -74,8 +75,7 @@
struct osmo_timer_list pong_timer;
int advanced_ping;
struct bsc_msc_connection *msc_con;
-   int core_mnc;
-   int core_mcc;
+   struct osmo_plmn_id core_plmn;
int core_lac;
int core_ci;
int rtp_base;
diff --git a/openbsc/include/openbsc/gsm_data.h 
b/openbsc/include/openbsc/gsm_data.h
index b823acc..2e1e64f 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -317,9 +318,8 @@
 };
 
 struct gsm_network {
-   /* global parameters */
-   uint16_t country_code;
-   uint16_t network_code;
+   struct osmo_plmn_id plmn;
+
char *name_long;
char *name_short;
enum gsm_auth_policy auth_policy;
@@ -428,6 +428,16 @@
 * pointer is NULL to indicate absence of a bsc_subscribers list. */
struct llist_head *bsc_subscribers;
 };
+
+static inline const struct osmo_location_area_id *bts_lai(struct gsm_bts *bts)
+{
+   static struct osmo_location_area_id lai;
+   lai = (struct osmo_location_area_id){
+   .plmn = bts->network->plmn,
+   .lac = bts->location_area_code,
+   };
+   return 
+}
 
 struct osmo_esme;
 
@@ -568,7 +578,7 @@
 const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
 int bts_gprs_mode_is_compat(struct gsm_bts *bts, enum bts_gprs_mode mode);
 
-int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts);
+void gsm48_ra_id_by_bts(struct gsm48_ra_id *buf, struct gsm_bts *bts);
 void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
 struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan);
 
diff --git a/openbsc/include/openbsc/pcuif_proto.h 
b/openbsc/include/openbsc/pcuif_proto.h
index eb28d66..2e3f782 100644
--- a/openbsc/include/openbsc/pcuif_proto.h
+++ b/openbsc/include/openbsc/pcuif_proto.h
@@ -1,7 +1,7 @@
 #ifndef _PCUIF_PROTO_H
 #define _PCUIF_PROTO_H
 
-#define PCU_IF_VERSION 0x08
+#define PCU_IF_VERSION 0x09
 
 /* msg_type */
 #define 

[MERGED] osmo-bsc[master]: cosmetic: abis_nm: use osmo_cell_global_id, parse 3-digit MNC

2018-03-21 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: abis_nm: use osmo_cell_global_id, parse 3-digit MNC
..


cosmetic: abis_nm: use osmo_cell_global_id, parse 3-digit MNC

Instead of a local redefinition, use osmo_cell_global_id.

This change is cosmetic because the decoded PLMN is currently actually never
used.

Change-Id: I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8
---
M include/osmocom/bsc/abis_nm.h
M src/libbsc/abis_nm.c
2 files changed, 5 insertions(+), 24 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h
index 18f87cd..9586ded 100644
--- a/include/osmocom/bsc/abis_nm.h
+++ b/include/osmocom/bsc/abis_nm.h
@@ -31,13 +31,6 @@
 /* max number of attributes represented as 3GPP TS 52.021 §9.4.62 SW 
Description array */
 #define MAX_BTS_ATTR 5
 
-struct cell_global_id {
-   uint16_t mcc;
-   uint16_t mnc;
-   uint16_t lac;
-   uint16_t ci;
-};
-
 /* The BCCH info from an ip.access test, in host byte order
  * and already parsed... */
 struct ipac_bcch_info {
@@ -52,7 +45,7 @@
uint16_t frame_offset;
uint32_t frame_nr_offset;
uint8_t bsic;
-   struct cell_global_id cgi;
+   struct osmo_cell_global_id cgi;
uint8_t ba_list_si2[16];
uint8_t ba_list_si2bis[16];
uint8_t ba_list_si2ter[16];
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index c2cb1d0..2ee2e24 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -2871,23 +2871,11 @@
return get_value_string(ipacc_testres_names, res);
 }
 
-void ipac_parse_cgi(struct cell_global_id *cid, const uint8_t *buf)
+void ipac_parse_cgi(struct osmo_cell_global_id *cid, const uint8_t *buf)
 {
-   cid->mcc = (buf[0] & 0xf) * 100;
-   cid->mcc += (buf[0] >> 4) *  10;
-   cid->mcc += (buf[1] & 0xf) *  1;
-
-   if (buf[1] >> 4 == 0xf) {
-   cid->mnc = (buf[2] & 0xf) * 10;
-   cid->mnc += (buf[2] >> 4) *  1;
-   } else {
-   cid->mnc = (buf[2] & 0xf) * 100;
-   cid->mnc += (buf[2] >> 4) *  10;
-   cid->mnc += (buf[1] >> 4) *   1;
-   }
-
-   cid->lac = ntohs(*((uint16_t *)[3]));
-   cid->ci = ntohs(*((uint16_t *)[5]));
+   osmo_plmn_from_bcd(buf, >lai.plmn);
+   cid->lai.lac = ntohs(*((uint16_t *)[3]));
+   cid->cell_identity = ntohs(*((uint16_t *)[5]));
 }
 
 /* parse BCCH information IEI from wire format to struct ipac_bcch_info */

-- 
To view, visit https://gerrit.osmocom.org/7415
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-iuh[master]: cosmetic: use osmo_plmn_id instead of mcc, mnc

2018-03-21 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: use osmo_plmn_id instead of mcc,mnc
..


cosmetic: use osmo_plmn_id instead of mcc,mnc

It's cosmetic since the MCC and MNC in the PLMN aren't actually used,
currently. It makes sense to do it properly anyway, while I'm still in the
3-digit MNC topic, for the future.

Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
---
M src/iu_client.c
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/iu_client.c b/src/iu_client.c
index 0f89515..4aecfec 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -42,8 +42,7 @@
  * PLMN identity is a BCD representation of the MCC and MNC.
  * See iu_grnc_id_parse(). */
 struct iu_grnc_id {
-   uint16_t mcc;
-   uint16_t mnc;
+   struct osmo_plmn_id plmn;
uint16_t rnc_id;
 };
 
@@ -310,8 +309,7 @@
   " should be 3, is %d\n", src->pLMNidentity.size);
return -1;
}
-   gsm48_mcc_mnc_from_bcd(>pLMNidentity.buf[0],
-  >mcc, >mnc);
+   osmo_plmn_from_bcd(>pLMNidentity.buf[0], >plmn);
dst->rnc_id = (uint16_t)src->rNC_ID;
return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/7413
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-ci[master]: jobs: gerrit-osmo-ttcn3-hacks: Make deps before cleaning

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7406
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07fee78bba5b07c7f3f4359869e00ef2583e0769
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: abis_nm: use osmo_cell_global_id, parse 3-digit MNC

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7415
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-iuh[master]: cosmetic: use osmo_plmn_id instead of mcc,mnc

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7413
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: l1sap: Avoid assumption that l1sap is at head of msgb

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7429
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I51a880328497673a06d153bfb76c428265b8cbb8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: BSC_Tests: split up f_mt_call and f_mo_call

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+1

Why the large FIXME before the sleep?

-- 
To view, visit https://gerrit.osmocom.org/7430
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0da9cf64d10de4036eb037ef5e491bfe3088670b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: BSC_Tests: split up f_mt_call and f_mo_call

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7430
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0da9cf64d10de4036eb037ef5e491bfe3088670b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: BSC_Tests: remove obsolete VTY configuration

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7411
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If67cdba2a043c5dbf23f998659c5000db924a7df
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: remove obsolete VTY configuration

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: BSC_Tests: remove obsolete VTY configuration
..


BSC_Tests: remove obsolete VTY configuration

The settings concerning the IPA ping are a leftover from the
time where osmo-bsc used an IPA multiplex to support the the
SCCP lite A interface dialect. Since the related code is now
removed and osmo-bsc has been migrated to libosmo-sccp and
real AoIP interface, the configuration is no longer needed.

Change-Id: If67cdba2a043c5dbf23f998659c5000db924a7df
---
M bsc/osmo-bsc.cfg
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg
index fad276a..2fa67e9 100644
--- a/bsc/osmo-bsc.cfg
+++ b/bsc/osmo-bsc.cfg
@@ -338,10 +338,6 @@
 phys_chan_config PDCH
 hopping enabled 0
 msc 0
- ip.access rtp-base 4000
- timeout-ping 20
- timeout-pong 5
- no timeout-ping advanced
  no bsc-welcome-text
  no bsc-msc-lost-text
  no bsc-grace-text

-- 
To view, visit https://gerrit.osmocom.org/7411
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If67cdba2a043c5dbf23f998659c5000db924a7df
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  199s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  199s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  199s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  199s] make[4]: Nothing to be done for 'install-exec-am'.
[  199s] make[4]: Nothing to be done for 'install-data-am'.
[  199s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  199s]dh_install
[  199s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  199s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  199s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  199s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  199s] dh_install: missing files, aborting
[  199s] debian/rules:45: recipe for target 'binary' failed
[  199s] make: *** [binary] Error 2
[  199s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  199s] 
[  199s] armbuild22 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
23:42:13 UTC 2018.
[  199s] 
[  199s] ### VM INTERACTION START ###
[  203s] [  192.155698] SysRq : Power Off
[  203s] [  192.171651] reboot: Power down
[  203s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  203s] ### VM INTERACTION END ###
[  203s] 
[  203s] armbuild22 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
23:42:17 UTC 2018.
[  203s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[MERGED] osmo-ttcn3-hacks[master]: Add BSSMAP SPDI definitions (speech/data indicator octets)

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Add BSSMAP SPDI definitions (speech/data indicator octets)
..


Add BSSMAP SPDI definitions (speech/data indicator octets)

Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
---
M library/BSSMAP_Templates.ttcn
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 5d13899..8156ca8 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -329,13 +329,19 @@
 const OCT1 ChRate_TCHForH := '0F'O;
 const OCT1 ChRate_TCHForH_nochg := '1F'O;
 
+const OCT1 Spdi_TCHF_FR  := '01'O;
+const OCT1 Spdi_TCHF_EFR := '11'O;
+const OCT1 Spdi_TCHF_AMR := '21'O;
+const OCT1 Spdi_TCHH_HR  := '05'O;
+const OCT1 Spdi_TCHH_AMR := '25'O;
+
 template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := {
elementIdentifier := '0B'O, /* overwritten */
lengthIndicator := 0,   /* overwritten */
speechOrDataIndicator := '0001'B,   /* speech */
spare1_4 := ''B,
channelRateAndType := ChRate_TCHF,
-   speechId_DataIndicator := '01'O /* FRv1 */
+   speechId_DataIndicator := Spdi_TCHF_FR
 }
 
 template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies 
ts_BSSMAP_IE_ChannelType := {

-- 
To view, visit https://gerrit.osmocom.org/7436
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()
..


MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()

Make sure that the "tag" member of the RslChanelNr sub-structure
is always initialized.  This can be achieved without any extra code
by using the existing templates rather than hand-coding it.

Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 5 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 6bf3221..44def3b 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -477,20 +477,19 @@
 /* Convert from Ericsson ChanDesc2 format to Osmocom RslChannelNr format */
 function f_ChDesc2RslChanNr(ChannelDescription2_V ch_desc, out RslChannelNr 
chan_nr, out GsmArfcn arfcn) {
var BIT5 inp := ch_desc.channelTypeandTDMAOffset;
-
-   chan_nr.tn := bit2int(ch_desc.timeslotNumber);
+   var uint3_t tn := bit2int(ch_desc.timeslotNumber);
 
if (match(inp, '1'B)) { /* TCH/F */
-   chan_nr.u.ch0 := RSL_CHAN_NR_Bm_ACCH;
+   chan_nr := valueof(t_RslChanNr_Bm(tn));
}
else if (match(inp, '0001?'B)) { /* TCH/H */
-   chan_nr.u.lm.sub_chan := bit2int(substr(inp, 4, 1));
+   chan_nr := valueof(t_RslChanNr_Lm(tn, bit2int(substr(inp, 4, 
1;
}
else if (match(inp, '001??'B)) { /* SDCCH/4 */
-   chan_nr.u.sdcch4.sub_chan := bit2int(substr(inp, 3, 2));
+   chan_nr := valueof(t_RslChanNr_SDCCH4(tn, bit2int(substr(inp, 
3, 2;
}
else if (match(inp, '01???'B)) { /* SDCCH/8 */
-   chan_nr.u.sdcch8.sub_chan := bit2int(substr(inp, 2, 3));
+   chan_nr := valueof(t_RslChanNr_SDCCH8(tn, bit2int(substr(inp, 
2, 3;
}
else {
setverdict(fail, "Unknown ChDesc!");

-- 
To view, visit https://gerrit.osmocom.org/7439
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()
..


bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()

If the function was called once, don't start another VTY/telnet
component.

Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 32f834d..6bf3221 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -297,14 +297,19 @@
 
var MediaState g_media;
var TestHdlrParams g_pars;
+
+   var boolean g_vty_initialized := false;
 }
 
 /* initialize all parameters */
 function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw) runs on 
MSC_ConnHdlr {
f_MediaState_init(g_media, i, bts, mgw);
-   map(self:BSCVTY, system:BSCVTY);
-   f_vty_set_prompts(BSCVTY);
-   f_vty_transceive(BSCVTY, "enable");
+   if (not g_vty_initialized) {
+   map(self:BSCVTY, system:BSCVTY);
+   f_vty_set_prompts(BSCVTY);
+   f_vty_transceive(BSCVTY, "enable");
+   g_vty_initialized := true;
+   }
 }
 
 /* Callback function from general BSSMAP_Emulation whenever a connectionless

-- 
To view, visit https://gerrit.osmocom.org/7438
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bsc: Add tests for assigning channels of all 5 codecs

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bsc: Add tests for assigning channels of all 5 codecs
..


bsc: Add tests for assigning channels of all 5 codecs

This tests if the BSC is chosing the correct codec during the assignment
procedure.

Change-Id: Ia67c09fa725eff48ec56779f8674ddcaa08a8793
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 177 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 94f38fd..ea67105 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1569,6 +1569,173 @@
vc_conn.done;
 }
 
+/***
+ * Codec (list) testing
+ ***/
+
+/* check if the given rsl_mode is compatible with the a_elem */
+private function f_match_codec(BSSMAP_FIELD_CodecElement a_elem, 
RSL_IE_ChannelMode rsl_mode)
+return boolean {
+   select (a_elem.codecType) {
+   case (GSM_FR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM1))) {
+   return true;
+   }
+   }
+   case (GSM_HR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, 
RSL_CMOD_SP_GSM1))) {
+   return true;
+   }
+   }
+   case (GSM_EFR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM2))) {
+   return true;
+   }
+   }
+   case (FR_AMR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM3))) {
+   return true;
+   }
+   }
+   case (HR_AMR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, 
RSL_CMOD_SP_GSM3))) {
+   return true;
+   }
+   }
+   case else { }
+   }
+   return false;
+}
+
+/* check if the given rsl_mode is compatible with the a_list */
+private function f_match_codecs(BSSMAP_IE_SpeechCodecList a_list, 
RSL_IE_ChannelMode rsl_mode)
+return boolean {
+   for (var integer i := 0; i < sizeof(a_list); i := i+1) {
+   if (f_match_codec(a_list.codecElements[i], rsl_mode)) {
+   return true;
+   }
+   }
+   return false;
+}
+
+/* determine BSSMAP_IE_ChannelType from *first* element of 
BSSMAP_FIELD_CodecElement */
+private function f_BSSMAP_chtype_from_codec(BSSMAP_FIELD_CodecElement a_elem)
+return BSSMAP_IE_ChannelType {
+   /* FIXME: actually look at all elements of BSSMAP_IE_SpeechCodecList */
+   var BSSMAP_IE_ChannelType ret := valueof(ts_BSSMAP_IE_ChannelType);
+   select (a_elem.codecType) {
+   case (GSM_FR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_FR;
+   }
+   case (GSM_HR) {
+   ret.channelRateAndType := ChRate_TCHH;
+   ret.speechId_DataIndicator := Spdi_TCHH_HR;
+   }
+   case (GSM_EFR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_EFR;
+   }
+   case (FR_AMR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_AMR;
+   }
+   case (HR_AMR) {
+   ret.channelRateAndType := ChRate_TCHH;
+   ret.speechId_DataIndicator := Spdi_TCHH_AMR;
+   }
+   case else {
+   setverdict(fail, "Unsupported codec ", a_elem);
+   self.stop;
+   }
+   }
+   return ret;
+}
+
+type record CodecListTest {
+   BSSMAP_IE_SpeechCodecList codec_list,
+   charstring id
+}
+type record of CodecListTest CodecListTests
+
+private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
+   var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+   var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
+   var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
+
+   /* puzzle together the ASSIGNMENT REQ for given codec[s] */
+   ass_cmd.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list;
+   ass_cmd.pdu.bssmap.assignmentRequest.channelType :=
+   
f_BSSMAP_chtype_from_codec(g_pars.ass_codec_list.codecElements[0]);
+   exp_compl.pdu.bssmap.assignmentComplete.speechCodec.codecElements[0] :=
+   
g_pars.ass_codec_list.codecElements[0];
+   log("expecting ASS COMPL like this: ", exp_compl);
+
+   f_establish_fully(ass_cmd, exp_compl);
+}
+
+testcase TC_assignment_codec_fr() runs on test_CT {
+   var 

[MERGED] osmo-ttcn3-hacks[master]: RSL: Add tr_RSL_ChanMode

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL: Add tr_RSL_ChanMode
..


RSL: Add tr_RSL_ChanMode

Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
---
M library/RSL_Types.ttcn
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index f8b66c6..f26a1d8 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -332,6 +332,16 @@
ch_rate_type := t,
coding_alg_rate := alg
}
+   template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t,
+   template RSL_SpeechAlgo 
alg) := {
+   len := ?,
+   reserved := '00'B,
+   dtx_d := ?,
+   dtx_u := ?,
+   spd_ind := RSL_SPDI_SPEECH,
+   ch_rate_type := t,
+   coding_alg_rate := alg
+   }
 
/* 9.3.4 */
type record RSL_IE_BS_Power {

-- 
To view, visit https://gerrit.osmocom.org/7437
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: don't use setverdict(inconc) anymore. Use 'fail' at all times

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: don't use setverdict(inconc) anymore.  Use 'fail' at all times
..


don't use setverdict(inconc) anymore.  Use 'fail' at all times

The problem is that Junit-XML doesn't have a mapping for inconclusive
results, and hence they show up as 'passed'.

By introducing this change, we make sure all tests that don't pass
show up as failed.

Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
---
M bsc-nat/MSC_ConnectionHandler.ttcn
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
4 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn 
b/bsc-nat/MSC_ConnectionHandler.ttcn
index 0a06759..102869c 100644
--- a/bsc-nat/MSC_ConnectionHandler.ttcn
+++ b/bsc-nat/MSC_ConnectionHandler.ttcn
@@ -146,7 +146,7 @@
/* Guard timer has expired, close connection */
[] T.timeout {
BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
-   setverdict(inconc);
+   setverdict(fail, "Timeout of guard timer");
self.stop;
}
 
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index aff6336..ea90f06 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1674,7 +1674,7 @@
setverdict(pass);
}
[] BSSAP.receive { setverdict(fail, "unexpected BSSAP"); }
-   [] T.timeout { setverdict(inconc); }
+   [] T.timeout { setverdict(fail, "Timeout waiting for RR STATUS"); }
}
 }
 testcase TC_err_84_unknown_msg() runs on test_CT {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 62c2a71..7c5a6d7 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -682,7 +682,7 @@
setverdict(fail, "Received non-matching ASSIGNMENT FAIL");
}
[] T.timeout {
-   setverdict(inconc, "Timeout waiting for ASSIGNMENT COMPLETE");
+   setverdict(fail, "Timeout waiting for ASSIGNMENT COMPLETE");
}
}
log("g_media ", g_media);
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 5ae5d60..84f33b7 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -161,7 +161,7 @@
alt {
[] GSUP_IPA_EVENT.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP)) { 
}
[] T.timeout {
-   setverdict(inconc, "No connection to GSUP Port");
+   setverdict(fail, "No connection to GSUP Port");
self.stop
}
}
@@ -1511,7 +1511,7 @@
self.stop;
}
[] BSSAP.receive {
-   setverdict(inconc, "Unknown/unexpected BSSAP received");
+   setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
}
}
@@ -1578,7 +1578,7 @@
self.stop;
}
[] BSSAP.receive {
-   setverdict(inconc, "Unknown/unexpected BSSAP received");
+   setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
}
}

-- 
To view, visit https://gerrit.osmocom.org/7409
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


[MERGED] osmo-ttcn3-hacks[master]: bsc: Move TestHdlrParams to global per-component var g_pars

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bsc: Move TestHdlrParams to global per-component var g_pars
..


bsc: Move TestHdlrParams to global per-component var g_pars

Change-Id: Ifd811bab7719b205a6174e3f6ba367643dfcb0ec
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 38 insertions(+), 27 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index ea90f06..94f38fd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1,7 +1,7 @@
 module BSC_Tests {
 
 /* Integration Tests for OsmoBSC
- * (C) 2017 by Harald Welte 
+ * (C) 2017-2018 by Harald Welte 
  * All rights reserved.
  *
  * Released under the terms of GNU General Public License, Version 2 or
@@ -1397,7 +1397,8 @@
 type function void_fn(charstring id) runs on MSC_ConnHdlr;
 
 /* helper function to create, connect and start a MSC_ConnHdlr component */
-function f_start_handler(void_fn fn, charstring id) runs on test_CT return 
MSC_ConnHdlr {
+function f_start_handler(void_fn fn, charstring id, template (omit) 
TestHdlrParams pars := omit)
+runs on test_CT return MSC_ConnHdlr {
var MSC_ConnHdlr vc_conn;
 
vc_conn := MSC_ConnHdlr.create(id);
@@ -1411,12 +1412,21 @@
}
connect(vc_conn:BSSAP, g_bssap.vc_BSSMAP:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
-   vc_conn.start(derefers(fn)(id));
+   vc_conn.start(f_handler_init(fn, id, pars));
return vc_conn;
 }
 
+/* first function inside ConnHdlr component; sets g_pars + starts function */
+private function f_handler_init(void_fn fn, charstring id, template (omit) 
TestHdlrParams pars := omit)
+runs on MSC_ConnHdlr {
+   if (isvalue(pars)) {
+   g_pars := valueof(pars);
+   }
+   fn.apply(id);
+}
+
 private function f_tc_assignment_fr_a5_0(charstring id) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
@@ -1425,7 +1435,7 @@
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(pars, ass_cmd, exp_compl);
+   f_establish_fully(ass_cmd, exp_compl);
f_cipher_mode('01'O, kc);
 }
 
@@ -1442,7 +1452,7 @@
 
 
 private function f_tc_assignment_fr_a5_1(charstring id) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
 
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
@@ -1452,7 +1462,7 @@
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(pars, ass_cmd, exp_compl);
+   f_establish_fully(ass_cmd, exp_compl);
f_cipher_mode('02'O, kc);
 }
 
@@ -1468,14 +1478,14 @@
 
 /* Expect ASSIGNMENT FAIL if mandatory IE is missing */
 private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on 
MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
const OCT8 kc := '0001020304050607'O;
 
ass_cmd.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
-   f_establish_fully(pars, ass_cmd, exp_fail);
+   f_establish_fully(ass_cmd, exp_fail);
 }
 
 testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT {
@@ -1490,7 +1500,7 @@
 
 
 private function f_tc_assignment_fr_a5_3(charstring id ) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
@@ -1499,7 +1509,7 @@

osmo-ttcn3-hacks[master]: don't use setverdict(inconc) anymore. Use 'fail' at all times

2018-03-21 Thread Harald Welte

Patch Set 1: Verified+1

-- 
To view, visit https://gerrit.osmocom.org/7409
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: bsc: Add tests for assigning channels of all 5 codecs

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7440
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia67c09fa725eff48ec56779f8674ddcaa08a8793
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7439
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: don't use setverdict(inconc) anymore. Use 'fail' at all times

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7409
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7438
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: RSL: Add tr_RSL_ChanMode

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7437
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: bsc: Move TestHdlrParams to global per-component var g_pars

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7435
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd811bab7719b205a6174e3f6ba367643dfcb0ec
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Add BSSMAP SPDI definitions (speech/data indicator octets)

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7436
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: bsc: Move TestHdlrParams to global per-component var g_pars

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7435

bsc: Move TestHdlrParams to global per-component var g_pars

Change-Id: Ifd811bab7719b205a6174e3f6ba367643dfcb0ec
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 38 insertions(+), 27 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index ea90f06..94f38fd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1,7 +1,7 @@
 module BSC_Tests {
 
 /* Integration Tests for OsmoBSC
- * (C) 2017 by Harald Welte 
+ * (C) 2017-2018 by Harald Welte 
  * All rights reserved.
  *
  * Released under the terms of GNU General Public License, Version 2 or
@@ -1397,7 +1397,8 @@
 type function void_fn(charstring id) runs on MSC_ConnHdlr;
 
 /* helper function to create, connect and start a MSC_ConnHdlr component */
-function f_start_handler(void_fn fn, charstring id) runs on test_CT return 
MSC_ConnHdlr {
+function f_start_handler(void_fn fn, charstring id, template (omit) 
TestHdlrParams pars := omit)
+runs on test_CT return MSC_ConnHdlr {
var MSC_ConnHdlr vc_conn;
 
vc_conn := MSC_ConnHdlr.create(id);
@@ -1411,12 +1412,21 @@
}
connect(vc_conn:BSSAP, g_bssap.vc_BSSMAP:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
-   vc_conn.start(derefers(fn)(id));
+   vc_conn.start(f_handler_init(fn, id, pars));
return vc_conn;
 }
 
+/* first function inside ConnHdlr component; sets g_pars + starts function */
+private function f_handler_init(void_fn fn, charstring id, template (omit) 
TestHdlrParams pars := omit)
+runs on MSC_ConnHdlr {
+   if (isvalue(pars)) {
+   g_pars := valueof(pars);
+   }
+   fn.apply(id);
+}
+
 private function f_tc_assignment_fr_a5_0(charstring id) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
@@ -1425,7 +1435,7 @@
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(pars, ass_cmd, exp_compl);
+   f_establish_fully(ass_cmd, exp_compl);
f_cipher_mode('01'O, kc);
 }
 
@@ -1442,7 +1452,7 @@
 
 
 private function f_tc_assignment_fr_a5_1(charstring id) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
 
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
@@ -1452,7 +1462,7 @@
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(pars, ass_cmd, exp_compl);
+   f_establish_fully(ass_cmd, exp_compl);
f_cipher_mode('02'O, kc);
 }
 
@@ -1468,14 +1478,14 @@
 
 /* Expect ASSIGNMENT FAIL if mandatory IE is missing */
 private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on 
MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
const OCT8 kc := '0001020304050607'O;
 
ass_cmd.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
-   f_establish_fully(pars, ass_cmd, exp_fail);
+   f_establish_fully(ass_cmd, exp_fail);
 }
 
 testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT {
@@ -1490,7 +1500,7 @@
 
 
 private function f_tc_assignment_fr_a5_3(charstring id ) runs on MSC_ConnHdlr {
-   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   g_pars := valueof(t_def_TestHdlrPars);
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
@@ -1499,7 +1509,7 @@
ass_cmd.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := 
valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));

[PATCH] osmo-ttcn3-hacks[master]: RSL: Add tr_RSL_ChanMode

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7437

RSL: Add tr_RSL_ChanMode

Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
---
M library/RSL_Types.ttcn
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index f8b66c6..f26a1d8 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -332,6 +332,16 @@
ch_rate_type := t,
coding_alg_rate := alg
}
+   template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t,
+   template RSL_SpeechAlgo 
alg) := {
+   len := ?,
+   reserved := '00'B,
+   dtx_d := ?,
+   dtx_u := ?,
+   spd_ind := RSL_SPDI_SPEECH,
+   ch_rate_type := t,
+   coding_alg_rate := alg
+   }
 
/* 9.3.4 */
type record RSL_IE_BS_Power {

-- 
To view, visit https://gerrit.osmocom.org/7437
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: Add BSSMAP SPDI definitions (speech/data indicator octets)

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7436

Add BSSMAP SPDI definitions (speech/data indicator octets)

Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
---
M library/BSSMAP_Templates.ttcn
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 5d13899..8156ca8 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -329,13 +329,19 @@
 const OCT1 ChRate_TCHForH := '0F'O;
 const OCT1 ChRate_TCHForH_nochg := '1F'O;
 
+const OCT1 Spdi_TCHF_FR  := '01'O;
+const OCT1 Spdi_TCHF_EFR := '11'O;
+const OCT1 Spdi_TCHF_AMR := '21'O;
+const OCT1 Spdi_TCHH_HR  := '05'O;
+const OCT1 Spdi_TCHH_AMR := '25'O;
+
 template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := {
elementIdentifier := '0B'O, /* overwritten */
lengthIndicator := 0,   /* overwritten */
speechOrDataIndicator := '0001'B,   /* speech */
spare1_4 := ''B,
channelRateAndType := ChRate_TCHF,
-   speechId_DataIndicator := '01'O /* FRv1 */
+   speechId_DataIndicator := Spdi_TCHF_FR
 }
 
 template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies 
ts_BSSMAP_IE_ChannelType := {

-- 
To view, visit https://gerrit.osmocom.org/7436
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7438

bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()

If the function was called once, don't start another VTY/telnet
component.

Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 32f834d..6bf3221 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -297,14 +297,19 @@
 
var MediaState g_media;
var TestHdlrParams g_pars;
+
+   var boolean g_vty_initialized := false;
 }
 
 /* initialize all parameters */
 function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw) runs on 
MSC_ConnHdlr {
f_MediaState_init(g_media, i, bts, mgw);
-   map(self:BSCVTY, system:BSCVTY);
-   f_vty_set_prompts(BSCVTY);
-   f_vty_transceive(BSCVTY, "enable");
+   if (not g_vty_initialized) {
+   map(self:BSCVTY, system:BSCVTY);
+   f_vty_set_prompts(BSCVTY);
+   f_vty_transceive(BSCVTY, "enable");
+   g_vty_initialized := true;
+   }
 }
 
 /* Callback function from general BSSMAP_Emulation whenever a connectionless

-- 
To view, visit https://gerrit.osmocom.org/7438
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: bsc: Add tests for assigning channels of all 5 codecs

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7440

bsc: Add tests for assigning channels of all 5 codecs

This tests if the BSC is chosing the correct codec during the assignment
procedure.

Change-Id: Ia67c09fa725eff48ec56779f8674ddcaa08a8793
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 177 insertions(+), 2 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 94f38fd..ea67105 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1569,6 +1569,173 @@
vc_conn.done;
 }
 
+/***
+ * Codec (list) testing
+ ***/
+
+/* check if the given rsl_mode is compatible with the a_elem */
+private function f_match_codec(BSSMAP_FIELD_CodecElement a_elem, 
RSL_IE_ChannelMode rsl_mode)
+return boolean {
+   select (a_elem.codecType) {
+   case (GSM_FR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM1))) {
+   return true;
+   }
+   }
+   case (GSM_HR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, 
RSL_CMOD_SP_GSM1))) {
+   return true;
+   }
+   }
+   case (GSM_EFR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM2))) {
+   return true;
+   }
+   }
+   case (FR_AMR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, 
RSL_CMOD_SP_GSM3))) {
+   return true;
+   }
+   }
+   case (HR_AMR) {
+   if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, 
RSL_CMOD_SP_GSM3))) {
+   return true;
+   }
+   }
+   case else { }
+   }
+   return false;
+}
+
+/* check if the given rsl_mode is compatible with the a_list */
+private function f_match_codecs(BSSMAP_IE_SpeechCodecList a_list, 
RSL_IE_ChannelMode rsl_mode)
+return boolean {
+   for (var integer i := 0; i < sizeof(a_list); i := i+1) {
+   if (f_match_codec(a_list.codecElements[i], rsl_mode)) {
+   return true;
+   }
+   }
+   return false;
+}
+
+/* determine BSSMAP_IE_ChannelType from *first* element of 
BSSMAP_FIELD_CodecElement */
+private function f_BSSMAP_chtype_from_codec(BSSMAP_FIELD_CodecElement a_elem)
+return BSSMAP_IE_ChannelType {
+   /* FIXME: actually look at all elements of BSSMAP_IE_SpeechCodecList */
+   var BSSMAP_IE_ChannelType ret := valueof(ts_BSSMAP_IE_ChannelType);
+   select (a_elem.codecType) {
+   case (GSM_FR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_FR;
+   }
+   case (GSM_HR) {
+   ret.channelRateAndType := ChRate_TCHH;
+   ret.speechId_DataIndicator := Spdi_TCHH_HR;
+   }
+   case (GSM_EFR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_EFR;
+   }
+   case (FR_AMR) {
+   ret.channelRateAndType := ChRate_TCHF;
+   ret.speechId_DataIndicator := Spdi_TCHF_AMR;
+   }
+   case (HR_AMR) {
+   ret.channelRateAndType := ChRate_TCHH;
+   ret.speechId_DataIndicator := Spdi_TCHH_AMR;
+   }
+   case else {
+   setverdict(fail, "Unsupported codec ", a_elem);
+   self.stop;
+   }
+   }
+   return ret;
+}
+
+type record CodecListTest {
+   BSSMAP_IE_SpeechCodecList codec_list,
+   charstring id
+}
+type record of CodecListTest CodecListTests
+
+private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
+   var BSSMAP_IE_AoIP_TransportLayerAddress tla := 
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+   var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
+   var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, 
?);
+
+   /* puzzle together the ASSIGNMENT REQ for given codec[s] */
+   ass_cmd.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list;
+   ass_cmd.pdu.bssmap.assignmentRequest.channelType :=
+   
f_BSSMAP_chtype_from_codec(g_pars.ass_codec_list.codecElements[0]);
+   exp_compl.pdu.bssmap.assignmentComplete.speechCodec.codecElements[0] :=
+   
g_pars.ass_codec_list.codecElements[0];
+   log("expecting ASS COMPL like this: ", exp_compl);
+
+   f_establish_fully(ass_cmd, exp_compl);
+}
+
+testcase TC_assignment_codec_fr() runs on test_CT {
+   var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+   var MSC_ConnHdlr vc_conn;
+
+   f_init(1, true);
+   f_sleep(1.0);
+
+   

[PATCH] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7439

MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()

Make sure that the "tag" member of the RslChanelNr sub-structure
is always initialized.  This can be achieved without any extra code
by using the existing templates rather than hand-coding it.

Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 5 insertions(+), 6 deletions(-)


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

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 6bf3221..44def3b 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -477,20 +477,19 @@
 /* Convert from Ericsson ChanDesc2 format to Osmocom RslChannelNr format */
 function f_ChDesc2RslChanNr(ChannelDescription2_V ch_desc, out RslChannelNr 
chan_nr, out GsmArfcn arfcn) {
var BIT5 inp := ch_desc.channelTypeandTDMAOffset;
-
-   chan_nr.tn := bit2int(ch_desc.timeslotNumber);
+   var uint3_t tn := bit2int(ch_desc.timeslotNumber);
 
if (match(inp, '1'B)) { /* TCH/F */
-   chan_nr.u.ch0 := RSL_CHAN_NR_Bm_ACCH;
+   chan_nr := valueof(t_RslChanNr_Bm(tn));
}
else if (match(inp, '0001?'B)) { /* TCH/H */
-   chan_nr.u.lm.sub_chan := bit2int(substr(inp, 4, 1));
+   chan_nr := valueof(t_RslChanNr_Lm(tn, bit2int(substr(inp, 4, 
1;
}
else if (match(inp, '001??'B)) { /* SDCCH/4 */
-   chan_nr.u.sdcch4.sub_chan := bit2int(substr(inp, 3, 2));
+   chan_nr := valueof(t_RslChanNr_SDCCH4(tn, bit2int(substr(inp, 
3, 2;
}
else if (match(inp, '01???'B)) { /* SDCCH/8 */
-   chan_nr.u.sdcch8.sub_chan := bit2int(substr(inp, 2, 3));
+   chan_nr := valueof(t_RslChanNr_SDCCH8(tn, bit2int(substr(inp, 
2, 3;
}
else {
setverdict(fail, "Unknown ChDesc!");

-- 
To view, visit https://gerrit.osmocom.org/7439
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


osmo-bsc[master]: bssmap: State correct speech codec in ASSIGNMENT COMPLETE

2018-03-21 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7434
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6feebfae77fdc93a7ce333a25dd9b9267c5a4a2e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: bssmap: State correct speech codec in ASSIGNMENT COMPLETE

2018-03-21 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7434

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

bssmap: State correct speech codec in ASSIGNMENT COMPLETE

Correctly compute the TS 48.008 "speech mode" (codec) for AMR on TCH/F.

There are way too many different ways how to express a given voice
codec.  There are two different schemes in TS 48.008 alone, plus one
on TS 48.058 and one in 04.08 / 44.018.  Let's avoid unneeded
conversion (that we might get wrong) and avoid storing information in
a sub-struct of the lchan if we can simply derive it from the lchan
at the time we need it.

Also, move BSSAP related encoding/conversion functions closer to the
user (osmo_bsc_bssap), rather than in libbsc.

Without this patch, TCH/F with AMR was erroneously reported as TCH/H
with AMR in the BSSMAP ASSIGNMENT COMPLETE.  After this patch, it's
reported correctly.

Change-Id: I6feebfae77fdc93a7ce333a25dd9b9267c5a4a2e
Related: OS#3094
---
M include/osmocom/bsc/bsc_api.h
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/osmo_bsc_api.c
5 files changed, 91 insertions(+), 110 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/7434/2

diff --git a/include/osmocom/bsc/bsc_api.h b/include/osmocom/bsc/bsc_api.h
index 01f90b1..06f8093 100644
--- a/include/osmocom/bsc/bsc_api.h
+++ b/include/osmocom/bsc/bsc_api.h
@@ -21,9 +21,7 @@
void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
struct msgb *msg);
/*! \brief BSC->MSC: Assignment of lchan successful */
-   void (*assign_compl)(struct gsm_subscriber_connection *conn,
- uint8_t rr_cause, uint8_t chosen_channel,
- uint8_t encr_alg_id, uint8_t speech_mode);
+   void (*assign_compl)(struct gsm_subscriber_connection *conn, uint8_t 
rr_cause);
/*! \brief BSC->MSC: Assignment of lchan failed */
void (*assign_fail)(struct gsm_subscriber_connection *conn,
 uint8_t cause, uint8_t *rr_cause);
@@ -45,9 +43,6 @@
/** Callback for additional actions during conn cleanup */
void (*conn_cleanup)(struct gsm_subscriber_connection *conn);
 };
-
-uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan);
-uint8_t chan_mode_to_speech(struct gsm_lchan *lchan);
 
 int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
 int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb 
*msg, int link_id, int allow_sacch);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 82a5a51..f743e9c 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -416,9 +416,6 @@
 * assignment completed message */
struct {
uint8_t rr_cause;
-   uint8_t chosen_channel;
-   uint8_t encr_alg_id;
-   uint8_t speech_mode;
bool valid;
} ass_compl;
} abis_ip;
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 7482453..142efef 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -50,89 +50,6 @@
 static void handle_chan_ack(struct gsm_subscriber_connection *conn, struct 
bsc_api *bsc, struct  gsm_lchan *lchan);
 static void handle_chan_nack(struct gsm_subscriber_connection *conn, struct 
bsc_api *bsc, struct  gsm_lchan *lchan);
 
-/* GSM 08.08 3.2.2.33 */
-uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
-{
-   uint8_t channel_mode = 0, channel = 0;
-
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   case GSM48_CMODE_SPEECH_EFR:
-   case GSM48_CMODE_SPEECH_AMR:
-   channel_mode = 0x9;
-   break;
-   case GSM48_CMODE_SIGN:
-   channel_mode = 0x8;
-   break;
-   case GSM48_CMODE_DATA_14k5:
-   channel_mode = 0xe;
-   break;
-   case GSM48_CMODE_DATA_12k0:
-   channel_mode = 0xb;
-   break;
-   case GSM48_CMODE_DATA_6k0:
-   channel_mode = 0xc;
-   break;
-   case GSM48_CMODE_DATA_3k6:
-   channel_mode = 0xd;
-   break;
-   }
-
-   switch (lchan->type) {
-   case GSM_LCHAN_NONE:
-   channel = 0x0;
-   break;
-   case GSM_LCHAN_SDCCH:
-   channel = 0x1;
-   break;
-   case GSM_LCHAN_TCH_F:
-   channel = 0x8;
-   break;
-   case GSM_LCHAN_TCH_H:
-   channel = 0x9;
-   break;
-   case GSM_LCHAN_UNKNOWN:
-   default:
-   LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %p\n", lchan);
-   break;
-   }
-
-   return channel_mode << 4 | channel;
-}
-
-uint8_t chan_mode_to_speech(struct gsm_lchan *lchan)
-{
-   int 

osmo-bsc[master]: BSSAP: document match_codec_pref() more thoroughly

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7432
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If08c2c2db674d6ddc43339744a78b1632d075d4a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: BSSAP: Fix test_codec_pref() implementation for AMR

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7431
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a3f362667a689135d5b62d151d491490dfd2976
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: GSCON FSM: Fix argument order when calling gsm0808_assign_req()

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7433
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I80f2a016a7646252bce8d86ed0bab236f3adbfca
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: bssmap: State correct speech codec in ASSIGNMENT COMPLETE

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7434

bssmap: State correct speech codec in ASSIGNMENT COMPLETE

Correctly compute the TS 48.008 "speech mode" (codec) for AMR on TCH/F.

There are way too many different ways how to express a given voice
codec.  There are two different schemes in TS 48.008 alone, plus one
on TS 48.058 and one in 04.08 / 44.018.  Let's avoid unneeded
conversion (that we might get wrong) and avoid storing information in
a sub-struct of the lchan if we can simply derive it from the lchan
at the time we need it.

Also, move BSSAP related encoding/conversion functions closer to the
user (osmo_bsc_bssap), rather than in libbsc.

Without this patch, TCH/F with AMR was erroneously reported as TCH/H
with AMR in the BSSMAP ASSIGNMENT COMPLETE.  After this patch, it's
reported correctly.

Change-Id: I6feebfae77fdc93a7ce333a25dd9b9267c5a4a2e
Related: OS#3094
---
M include/osmocom/bsc/bsc_api.h
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/osmo_bsc_api.c
5 files changed, 93 insertions(+), 110 deletions(-)


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

diff --git a/include/osmocom/bsc/bsc_api.h b/include/osmocom/bsc/bsc_api.h
index 01f90b1..06f8093 100644
--- a/include/osmocom/bsc/bsc_api.h
+++ b/include/osmocom/bsc/bsc_api.h
@@ -21,9 +21,7 @@
void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
struct msgb *msg);
/*! \brief BSC->MSC: Assignment of lchan successful */
-   void (*assign_compl)(struct gsm_subscriber_connection *conn,
- uint8_t rr_cause, uint8_t chosen_channel,
- uint8_t encr_alg_id, uint8_t speech_mode);
+   void (*assign_compl)(struct gsm_subscriber_connection *conn, uint8_t 
rr_cause);
/*! \brief BSC->MSC: Assignment of lchan failed */
void (*assign_fail)(struct gsm_subscriber_connection *conn,
 uint8_t cause, uint8_t *rr_cause);
@@ -45,9 +43,6 @@
/** Callback for additional actions during conn cleanup */
void (*conn_cleanup)(struct gsm_subscriber_connection *conn);
 };
-
-uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan);
-uint8_t chan_mode_to_speech(struct gsm_lchan *lchan);
 
 int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
 int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb 
*msg, int link_id, int allow_sacch);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 82a5a51..f743e9c 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -416,9 +416,6 @@
 * assignment completed message */
struct {
uint8_t rr_cause;
-   uint8_t chosen_channel;
-   uint8_t encr_alg_id;
-   uint8_t speech_mode;
bool valid;
} ass_compl;
} abis_ip;
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 7482453..142efef 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -50,89 +50,6 @@
 static void handle_chan_ack(struct gsm_subscriber_connection *conn, struct 
bsc_api *bsc, struct  gsm_lchan *lchan);
 static void handle_chan_nack(struct gsm_subscriber_connection *conn, struct 
bsc_api *bsc, struct  gsm_lchan *lchan);
 
-/* GSM 08.08 3.2.2.33 */
-uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
-{
-   uint8_t channel_mode = 0, channel = 0;
-
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   case GSM48_CMODE_SPEECH_EFR:
-   case GSM48_CMODE_SPEECH_AMR:
-   channel_mode = 0x9;
-   break;
-   case GSM48_CMODE_SIGN:
-   channel_mode = 0x8;
-   break;
-   case GSM48_CMODE_DATA_14k5:
-   channel_mode = 0xe;
-   break;
-   case GSM48_CMODE_DATA_12k0:
-   channel_mode = 0xb;
-   break;
-   case GSM48_CMODE_DATA_6k0:
-   channel_mode = 0xc;
-   break;
-   case GSM48_CMODE_DATA_3k6:
-   channel_mode = 0xd;
-   break;
-   }
-
-   switch (lchan->type) {
-   case GSM_LCHAN_NONE:
-   channel = 0x0;
-   break;
-   case GSM_LCHAN_SDCCH:
-   channel = 0x1;
-   break;
-   case GSM_LCHAN_TCH_F:
-   channel = 0x8;
-   break;
-   case GSM_LCHAN_TCH_H:
-   channel = 0x9;
-   break;
-   case GSM_LCHAN_UNKNOWN:
-   default:
-   LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %p\n", lchan);
-   break;
-   }
-
-   return channel_mode << 4 | channel;
-}
-
-uint8_t chan_mode_to_speech(struct gsm_lchan *lchan)
-{
-   int mode = 0;
-
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   mode = 

Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  574s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  574s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  574s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  574s] make[4]: Nothing to be done for 'install-exec-am'.
[  574s] make[4]: Nothing to be done for 'install-data-am'.
[  574s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  574s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  574s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  574s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  574s]dh_install
[  575s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  575s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  575s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  575s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  575s] dh_install: missing files, aborting
[  575s] debian/rules:45: recipe for target 'binary' failed
[  575s] make: *** [binary] Error 2
[  575s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  575s] 
[  575s] obs-arm-2 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
21:21:41 UTC 2018.
[  575s] 
[  575s] ### VM INTERACTION START ###
[  578s] [  529.505712] sysrq: SysRq : Power Off
[  578s] [  529.523019] reboot: Power down
[  578s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_16/root.monitor: Permission denied
[  578s] ### VM INTERACTION END ###
[  578s] 
[  578s] obs-arm-2 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
21:21:44 UTC 2018.
[  578s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  233s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  233s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  233s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  233s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  233s] make[4]: Nothing to be done for 'install-exec-am'.
[  233s] make[4]: Nothing to be done for 'install-data-am'.
[  233s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  233s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  233s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  233s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  233s]dh_install
[  233s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  233s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  233s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  233s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  233s] dh_install: missing files, aborting
[  233s] debian/rules:45: recipe for target 'binary' failed
[  233s] make: *** [binary] Error 2
[  233s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  233s] 
[  233s] lamb52 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:50:18 UTC 2018.
[  233s] 
[  233s] ### VM INTERACTION START ###
[  236s] [  208.798739] reboot: Power down
[  236s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  236s] ### VM INTERACTION END ###
[  236s] 
[  236s] lamb52 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:50:21 UTC 2018.
[  236s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  198s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  199s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  199s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  199s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  199s] make[4]: Nothing to be done for 'install-exec-am'.
[  199s] make[4]: Nothing to be done for 'install-data-am'.
[  199s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  199s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  199s]dh_install
[  199s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  199s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  199s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  199s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  199s] dh_install: missing files, aborting
[  199s] debian/rules:45: recipe for target 'binary' failed
[  199s] make: *** [binary] Error 2
[  199s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  199s] 
[  199s] lamb58 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:48:14 UTC 2018.
[  199s] 
[  199s] ### VM INTERACTION START ###
[  202s] [  193.125017] reboot: Power down
[  202s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_11/root.monitor: Permission denied
[  202s] ### VM INTERACTION END ###
[  202s] 
[  202s] lamb58 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:48:17 UTC 2018.
[  202s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  213s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  213s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  213s] make[4]: Nothing to be done for 'install-exec-am'.
[  213s] make[4]: Nothing to be done for 'install-data-am'.
[  213s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  213s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  213s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  213s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  213s]dh_install
[  213s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in ., debian/tmp)
[  213s] 
[  213s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  213s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in ., debian/tmp)
[  213s] 
[  213s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  213s] dh_install: missing files, aborting
[  213s] debian/rules:45: recipe for target 'binary' failed
[  213s] make: *** [binary] Error 25
[  213s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  213s] 
[  213s] lamb27 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:47:48 UTC 2018.
[  213s] 
[  213s] ### VM INTERACTION START ###
[  216s] [  202.771043] reboot: Power down
[  216s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_7/root.monitor: Permission denied
[  216s] ### VM INTERACTION END ###
[  216s] 
[  216s] lamb27 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:47:51 UTC 2018.
[  216s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  140s] make[5]: Nothing to be done for 'install-data-am'.
[  140s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests'
[  140s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  140s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  140s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  140s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  140s] make[4]: Nothing to be done for 'install-exec-am'.
[  140s] make[4]: Nothing to be done for 'install-data-am'.
[  140s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  140s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  140s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  140s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  140s]dh_install
[  140s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  140s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  140s] dh_install: missing files, aborting
[  140s] debian/rules:45: recipe for target 'binary' failed
[  140s] make: *** [binary] Error 2
[  140s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  140s] 
[  140s] lamb15 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:47:11 UTC 2018.
[  140s] 
[  140s] ### VM INTERACTION START ###
[  143s] [  136.698155] reboot: Power down
[  143s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_3/root.monitor: Permission denied
[  143s] ### VM INTERACTION END ###
[  143s] 
[  143s] lamb15 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:47:14 UTC 2018.
[  143s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  182s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  182s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  182s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  182s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  182s] make[4]: Nothing to be done for 'install-exec-am'.
[  182s] make[4]: Nothing to be done for 'install-data-am'.
[  182s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  182s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  182s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  182s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  182s]dh_install
[  182s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  182s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  182s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  182s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  182s] dh_install: missing files, aborting
[  182s] debian/rules:45: recipe for target 'binary' failed
[  182s] make: *** [binary] Error 2
[  182s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  182s] 
[  182s] lamb24 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:45:50 UTC 2018.
[  182s] 
[  182s] ### VM INTERACTION START ###
[  185s] [  176.921669] reboot: Power down
[  185s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_6/root.monitor: Permission denied
[  185s] ### VM INTERACTION END ###
[  185s] 
[  185s] lamb24 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:45:54 UTC 2018.
[  185s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  125s] make[5]: Nothing to be done for 'install-data-am'.
[  125s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests'
[  125s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  125s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  125s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  125s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  125s] make[4]: Nothing to be done for 'install-exec-am'.
[  125s] make[4]: Nothing to be done for 'install-data-am'.
[  125s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  125s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  125s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  125s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  125s]dh_install
[  125s] cp: cannot stat 'debian/tmp/usr/bin/ipaccess-config': No such file or 
directory
[  125s] dh_install: cp -a debian/tmp/usr/bin/ipaccess-config 
debian/osmo-bsc-ipaccess-utils//usr/bin/ returned exit code 1
[  125s] debian/rules:45: recipe for target 'binary' failed
[  125s] make: *** [binary] Error 2
[  125s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  125s] 
[  125s] build70 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:42:47 UTC 2018.
[  125s] 
[  125s] ### VM INTERACTION START ###
[  126s] Powering off.
[  126s] [  120.038430] reboot: Power down
[  126s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  126s] ### VM INTERACTION END ###
[  126s] 
[  126s] build70 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:42:48 UTC 2018.
[  126s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  163s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  163s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  163s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  163s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  163s] make[4]: Nothing to be done for 'install-exec-am'.
[  163s] make[4]: Nothing to be done for 'install-data-am'.
[  163s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  163s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  163s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  163s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  163s]dh_install
[  164s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  164s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  164s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  164s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  164s] dh_install: missing files, aborting
[  164s] debian/rules:45: recipe for target 'binary' failed
[  164s] make: *** [binary] Error 2
[  164s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  164s] 
[  164s] lamb74 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:42:09 UTC 2018.
[  164s] 
[  164s] ### VM INTERACTION START ###
[  167s] [  158.548573] reboot: Power down
[  167s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  167s] ### VM INTERACTION END ###
[  167s] 
[  167s] lamb74 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:42:12 UTC 2018.
[  167s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  142s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  142s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  142s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  142s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  142s] make[4]: Nothing to be done for 'install-exec-am'.
[  142s] make[4]: Nothing to be done for 'install-data-am'.
[  142s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  142s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  142s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  142s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  142s]dh_install
[  142s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  142s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  142s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  142s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  142s] dh_install: missing files, aborting
[  142s] debian/rules:45: recipe for target 'binary' failed
[  142s] make: *** [binary] Error 2
[  142s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  142s] 
[  142s] lamb24 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:41:16 UTC 2018.
[  142s] 
[  142s] ### VM INTERACTION START ###
[  145s] [  137.124290] reboot: Power down
[  145s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  145s] ### VM INTERACTION END ###
[  145s] 
[  145s] lamb24 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:41:20 UTC 2018.
[  145s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  128s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  128s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  128s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  128s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  128s] make[4]: Nothing to be done for 'install-exec-am'.
[  128s] make[4]: Nothing to be done for 'install-data-am'.
[  128s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  128s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  128s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  128s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  128s]dh_install
[  128s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" 
(tried in "." and "debian/tmp")
[  128s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  128s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried 
in "." and "debian/tmp")
[  128s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  128s] dh_install: missing files, aborting
[  128s] debian/rules:45: recipe for target 'binary' failed
[  128s] make: *** [binary] Error 2
[  128s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  128s] 
[  128s] lamb08 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:41:17 UTC 2018.
[  128s] 
[  128s] ### VM INTERACTION START ###
[  131s] [  123.808215] reboot: Power down
[  131s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  132s] ### VM INTERACTION END ###
[  132s] 
[  132s] lamb08 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:41:21 UTC 2018.
[  132s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586

Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  174s] make[5]: Nothing to be done for 'install-data-am'.
[  174s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests'
[  174s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  174s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  174s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  174s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  174s] make[4]: Nothing to be done for 'install-exec-am'.
[  174s] make[4]: Nothing to be done for 'install-data-am'.
[  174s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  174s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  174s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  174s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  174s]dh_install
[  175s] dh_install: osmo-bsc-ipaccess-utils missing files: 
usr/bin/ipaccess-config
[  175s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config
[  175s] dh_install: missing files, aborting
[  175s] debian/rules:45: recipe for target 'binary' failed
[  175s] make: *** [binary] Error 2
[  175s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  175s] 
[  175s] lamb52 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:38:11 UTC 2018.
[  175s] 
[  175s] ### VM INTERACTION START ###
[  178s] [  170.001720] reboot: Power down
[  178s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_6/root.monitor: Permission denied
[  178s] ### VM INTERACTION END ###
[  178s] 
[  178s] lamb52 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:38:15 UTC 2018.
[  178s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-bsc[master]: GSCON FSM: Fix argument order when calling gsm0808_assign_req()

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7433

GSCON FSM: Fix argument order when calling gsm0808_assign_req()

The first argument is the channel mode (codec), the second one is
a flag whether or not it's a full-rate channel.

Before this patch the two arguments are reversed, resulting in
* all assignments being TCH/F in general
* all assignments have FR1 as codec, as the full_Rate=1 is interpreted as FR1

Change-Id: I80f2a016a7646252bce8d86ed0bab236f3adbfca
Related: OS#3094
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index c7ed438..a2b818b 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -356,7 +356,8 @@
 * conn->user_plane.chan_mode parameter that this
 * assignment is for a signalling channel and will then
 * change back to ST_ACTIVE (here) immediately. */
-   rc = gsm0808_assign_req(conn, 
conn->user_plane.full_rate, conn->user_plane.chan_mode);
+   rc = gsm0808_assign_req(conn, 
conn->user_plane.chan_mode,
+   conn->user_plane.full_rate);
if (rc != 0) {
resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
sigtran_send(conn, resp, fi);
@@ -448,7 +449,7 @@
 * then start the channel assignment. */
conn->user_plane.rtp_port = conn_peer->port;
conn->user_plane.rtp_ip = 
osmo_ntohl(inet_addr(conn_peer->addr));
-   rc = gsm0808_assign_req(conn, conn->user_plane.full_rate, 
conn->user_plane.chan_mode);
+   rc = gsm0808_assign_req(conn, conn->user_plane.chan_mode, 
conn->user_plane.full_rate);
if (rc != 0) {
resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE,
 NULL);
sigtran_send(conn, resp, fi);

-- 
To view, visit https://gerrit.osmocom.org/7433
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80f2a016a7646252bce8d86ed0bab236f3adbfca
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-bsc[master]: BSSAP: document match_codec_pref() more thoroughly

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7432

BSSAP: document match_codec_pref() more thoroughly

Change-Id: If08c2c2db674d6ddc43339744a78b1632d075d4a
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 04847b2..3cd6051 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -153,8 +153,14 @@
return false;
 }
 
-/* Helper function for bssmap_handle_assignm_req(), matches the codec
- * preferences from the MSC with the codec preferences */
+/*! Helper function for bssmap_handle_assignm_req(), matches the codec
+ *  preferences from the MSC with the codec preferences
+ *  \param[out] full_rate '1' if full-rate, '0' if half-rate, '-1' if no match
+ *  \param[out] chan_mode GSM 04.08 channel mode
+ *  \param[in] ct GSM 08.08 channel type
+ *  \param[in] scl GSM 08.08 speech codec list
+ *  \param[in] msc MSC data [for configuration]
+ *  \returns 0 on success, -1 in case no match was found */
 static int match_codec_pref(int *full_rate, enum gsm48_chan_mode *chan_mode,
const struct gsm0808_channel_type *ct,
const struct gsm0808_speech_codec_list *scl,

-- 
To view, visit https://gerrit.osmocom.org/7432
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08c2c2db674d6ddc43339744a78b1632d075d4a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586

2018-03-21 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  131s] make[5]: Nothing to be done for 'install-data-am'.
[  131s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests'
[  131s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests'
[  131s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  131s] make[3]: Entering directory '/usr/src/packages/BUILD'
[  131s] make[4]: Entering directory '/usr/src/packages/BUILD'
[  131s] make[4]: Nothing to be done for 'install-exec-am'.
[  131s] make[4]: Nothing to be done for 'install-data-am'.
[  131s] make[4]: Leaving directory '/usr/src/packages/BUILD'
[  131s] make[3]: Leaving directory '/usr/src/packages/BUILD'
[  131s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  131s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  131s]dh_install
[  131s] cp: cannot stat 'debian/tmp/usr/bin/ipaccess-config': No such file or 
directory
[  131s] dh_install: cp -a debian/tmp/usr/bin/ipaccess-config 
debian/osmo-bsc-ipaccess-utils//usr/bin/ returned exit code 1
[  131s] debian/rules:45: recipe for target 'binary' failed
[  131s] make: *** [binary] Error 2
[  131s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
[  131s] 
[  131s] lamb67 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:31:41 UTC 2018.
[  131s] 
[  131s] ### VM INTERACTION START ###
[  132s] Powering off.
[  132s] [  125.487988] reboot: Power down
[  132s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_8/root.monitor: Permission denied
[  132s] ### VM INTERACTION END ###
[  132s] 
[  132s] lamb67 failed "build osmo-bsc_1.1.2.20180321.dsc" at Wed Mar 21 
20:31:43 UTC 2018.
[  132s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-bsc[master]: BSSAP: Fix test_codec_pref() implementation for AMR

2018-03-21 Thread Harald Welte

Review at  https://gerrit.osmocom.org/7431

BSSAP: Fix test_codec_pref() implementation for AMR

In AMR-type cahnels, the gsm0808_speech_codec doesn't only include
the codec (like EFR/FR/AMR) but also the specific codec configuration,
i.e. the sub-set of AMR modes.

Hence, we cannot convert from a channel type (just the codec) to the
full gsm0808_speech_codec and then memcmp() that with the codec config
received from the MSC.  Rather, we must only compare the *type*.

Change-Id: I0a3f362667a689135d5b62d151d491490dfd2976
Related: OS#3094
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index e793a14..04847b2 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -146,7 +146,7 @@
/* Try to find extrapolated speech codec data in
 * the speech codec list */
for (i = 0; i < scl->len; i++) {
-   if (memcmp(, >codec[i], sizeof(sc)) == 0)
+   if (sc.type == scl->codec[i].type)
return true;
}
 

-- 
To view, visit https://gerrit.osmocom.org/7431
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a3f362667a689135d5b62d151d491490dfd2976
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: split up f_mt_call and f_mo_call

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7430

BSC_Tests: split up f_mt_call and f_mo_call

The functions f_mt_call and f_mo_call establish a call, hold it
for 3 sec. and tear it down again. However, there may be test
situation where one wants to establish a call and then hold it
in order to perform other actions.

- split up the function into an _establish and _hangup part.
- add a replacement f_mt_call and f_mo_call function for the
  already existing testcases

Change-Id: I0da9cf64d10de4036eb037ef5e491bfe3088670b
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 50 insertions(+), 45 deletions(-)


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

diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 72e2a4e..ed89268 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -405,14 +405,12 @@
mgcp_connection_id_mss := '0'H //
 };
 
-
-function f_mt_call(inout CallParameters cpars)
+function f_mt_call_establish(inout CallParameters cpars)
 runs on BSC_ConnHdlr {
 
var MobileIdentityLV mi;
var MNCC_PDU mncc;
var MgcpCommand mgcp_cmd;
-   var boolean respond_to_dlcx;
 
f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
 
@@ -494,45 +492,10 @@
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id)));
MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref));
 
-   /* FIXME */
-   f_sleep(3.0);
-
-   /* Hangup by "A" side */
-   MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(23;
-   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id)));
-
-   if (false) {
-   /* A-side (PLMN) Release of call */
-   MNCC.send(ts_MNCC_REL_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(42;
-   
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
-   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id)));
-   } else {
-   /* B-side (MS) Release of call */
-   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_RELEASE(cpars.transaction_id, '1'B, 
'000'B)));
-   MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref));
-   
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_REL_COMPL(cpars.transaction_id)));
-   }
-
-   respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and 
valueof(cpars.mgw_drop_dlcx));
-
-   /* clearing of radio channel */
-   interleave {
-   [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
-   BSSAP.send(ts_BSSMAP_ClearComplete);
-   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
-   }
-   [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
-   if (respond_to_dlcx) {
-   /* TODO: For one or all connections on EP? */
-   MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id));
-   f_create_mgcp_delete_ep(cpars.mgcp_ep);
-   }
-   }
-   }
setverdict(pass);
 }
 
-function f_mo_call(inout CallParameters cpars)
+function f_mo_call_establish(inout CallParameters cpars)
 runs on BSC_ConnHdlr {
 
var MobileIdentityLV mi;
@@ -625,16 +588,31 @@

BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id)));

BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id)));
 
-   f_sleep(3.0);
+   setverdict(pass);
+}
 
-   /* Hangup by "B" side */
+function f_call_hangup(inout CallParameters cpars, boolean release_by_ms)
+runs on BSC_ConnHdlr {
+
+   var MobileIdentityLV mi;
+   var MNCC_PDU mncc;
+   var MgcpCommand mgcp_cmd;
+   var boolean respond_to_dlcx;
+
MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(23;
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id)));
 
-   /* Release of call */
-   MNCC.send(ts_MNCC_REL_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(42;
-   
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
-   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id)));
+   if (release_by_ms) {
+   /* B-side (MS) Release of call */
+   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_RELEASE(cpars.transaction_id, '1'B, 
'000'B)));
+   MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref));
+   
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_REL_COMPL(cpars.transaction_id)));
+   } else {
+   /* A-side (PLMN) Release of call */
+   MNCC.send(ts_MNCC_REL_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(42;
+   
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
+   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id)));
+   }
 
respond_to_dlcx := not 

[ABANDON] osmocom-bb[fixeria/trx]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change.

Change subject: virt_phy: Add missing gprs related entries to l1ctlPrimNames
..


Abandoned

-- 
To view, visit https://gerrit.osmocom.org/7418
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


osmocom-bb[fixeria/trx]: trx_toolkit: Add cmdline arg to set bind addr

2018-03-21 Thread Pau Espin Pedrol

Patch Set 3: Code-Review+1

Hm It seems my editor was using incorrect tab size for the files?

-- 
To view, visit https://gerrit.osmocom.org/7410
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7be18fef40967fb7551f4115f22cbbd9cdb0840d
Gerrit-PatchSet: 3
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: l1sap: Avoid assumption that l1sap is at head of msgb

2018-03-21 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/7429

l1sap: Avoid assumption that l1sap is at head of msgb

This assumption used while sending the rx data to gsmtap in l1sap_up was
making osmo-bts-virtual crash, since that bts model is allocating the
l1sap in the stack rather than inside the msgb.
Instead, let's use the assumption that l2h is set correctly in msgb by
the bts model lower layer.

crash report:
Program received signal SIGSEGV, Segmentation fault.
0x76234ec3 in __memmove_sse2_unaligned_erms () from /usr/lib/libc.so.6
(gdb) bt
0  0x76234ec3 in __memmove_sse2_unaligned_erms () from 
/usr/lib/libc.so.6
1  0x76dbf4c8 in gsmtap_makemsg_ex (type=, 
arfcn=arfcn@entry=17255, ts=ts@entry=6 '\006',
chan_type=, ss=ss@entry=0 '\000', fn=fn@entry=11249, 
signal_dbm=0 '\000', snr=0 '\000',
data=0x557d5b50 "", len=4294967263) at libosmocore/src/gsmtap_util.c:179
2  0x76dbf6d8 in gsmtap_send_ex (gti=0x55877f10, type=type@entry=1 
'\001', arfcn=arfcn@entry=17255,
ts=ts@entry=6 '\006', chan_type=, ss=, 
fn=11249, signal_dbm=0 '\000', snr=0 '\000',
data=0x557d5b50 "", len=4294967263) at libosmocore/src/gsmtap_util.c:311
3  0x76dbf765 in gsmtap_send (gti=, 
arfcn=arfcn@entry=17255, ts=ts@entry=6 '\006',
chan_type=, ss=, fn=fn@entry=11249, 
signal_dbm=0 '\000', snr=0 '\000',
data=0x557d5b50 "", len=4294967263) at libosmocore/src/gsmtap_util.c:330
4  0x55573571 in to_gsmtap (trx=0x77ef8070, l1sap=0x7fffde80)
at osmo-bts/src/common/l1sap.c:397
5  0x55573b9c in l1sap_up (trx=0x77ef8070, 
l1sap=l1sap@entry=0x7fffde80)
at osmo-bts/src/common/l1sap.c:1285
6  0xec06 in virt_um_rcv_cb (vui=, msg=)
at osmo-bts/src/osmo-bts-virtual/l1_if.c:170
7  0xf5c6 in virt_um_fd_cb (ofd=0x5587cc30, what=)
at osmo-bts/src/osmo-bts-virtual/virtual_um.c:50
8  0x76db6991 in osmo_fd_disp_fds (_eset=0x7fffe090, 
_wset=0x7fffe010, _rset=0x7fffdf90)
at libosmocore/src/select.c:216
9  osmo_select_main (polling=polling@entry=0) at libosmocore/src/select.c:256
10 0x55576fbc in bts_main (argc=5, argv=0x7fffe288)
at osmo-bts/src/common/main.c:364
11 0x761b5f4a in __libc_start_main () from /usr/lib/libc.so.6
12 0xc4ca in _start ()

In the old code when the sizeof(osmo_phsap_prim) was being substracted
it resulted on a negative len which later was casted to unsigned int and
became a really big number.

Fixes: OS#3092

Change-Id: I51a880328497673a06d153bfb76c428265b8cbb8
---
M src/common/l1sap.c
1 file changed, 15 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/7429/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0a229e1..e7cef4e 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -235,14 +235,14 @@
 
 /* send primitive as gsmtap */
 static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
- uint8_t *ss, uint32_t fn, uint8_t **data, int *len,
+ uint8_t *ss, uint32_t fn, uint8_t **data, unsigned 
int *len,
  uint8_t num_agch)
 {
struct msgb *msg = l1sap->oph.msg;
uint8_t chan_nr, link_id;
 
-   *data = msg->data + sizeof(struct osmo_phsap_prim);
-   *len = msg->len - sizeof(struct osmo_phsap_prim);
+   *data = msgb_l2(msg);
+   *len = msgb_l2len(msg);
chan_nr = l1sap->u.data.chan_nr;
link_id = l1sap->u.data.link_id;
 
@@ -276,18 +276,18 @@
 }
 
 static int gsmtap_pdch(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
-  uint8_t *ss, uint32_t fn, uint8_t **data, int *len)
+  uint8_t *ss, uint32_t fn, uint8_t **data, unsigned int 
*len)
 {
struct msgb *msg = l1sap->oph.msg;
 
-   *data = msg->data + sizeof(struct osmo_phsap_prim);
-   *len = msg->len - sizeof(struct osmo_phsap_prim);
+   *data = msgb_l2(msg);
+   *len = msgb_l2len(msg);
 
if (L1SAP_IS_PTCCH(fn)) {
*chan_type = GSMTAP_CHANNEL_PTCCH;
*ss = L1SAP_FN2PTCCHBLOCK(fn);
-   if (l1sap->oph.primitive
-   == PRIM_OP_INDICATION) {
+   if (l1sap->oph.primitive == PRIM_OP_INDICATION) {
+   OSMO_ASSERT(len > 0);
if ((*data[0]) == 7)
return -EINVAL;
(*data)++;
@@ -300,7 +300,7 @@
 }
 
 static int gsmtap_ph_rach(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
-   uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len)
+   uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, unsigned int 
*len)
 {
uint8_t chan_nr;
 
@@ -345,7 +345,7 @@
 static int to_gsmtap(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap)
 {
uint8_t *data;
-   int len;
+   unsigned int len;
uint8_t chan_type = 

osmocom-bb[fixeria/trx]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Vadim Yanitskiy

Patch Set 1:

> I cherry-picked it for master in https://gerrit.osmocom.org/#/c/7419/

Thanks! This one should be abandoned.

-- 
To view, visit https://gerrit.osmocom.org/7418
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmocom-bb[fixeria/trx]: trxcon/l1ctl.c: hexdump content of unhandled messages

2018-03-21 Thread Vadim Yanitskiy
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7414

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

trxcon/l1ctl.c: hexdump content of unhandled messages

Change-Id: Iec8fc6d49d1e35fe101960dd969de559e37a6a75
---
M src/host/trxcon/l1ctl.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/14/7414/3

diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 3de0cf6..2aa73d4 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -794,7 +794,8 @@
case L1CTL_CRYPTO_REQ:
return l1ctl_rx_crypto_req(l1l, msg);
default:
-   LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", l1h->msg_type);
+   LOGP(DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", 
l1h->msg_type,
+   osmo_hexdump(msgb_data(msg), msgb_length(msg)));
msgb_free(msg);
return -EINVAL;
}

-- 
To view, visit https://gerrit.osmocom.org/7414
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iec8fc6d49d1e35fe101960dd969de559e37a6a75
Gerrit-PatchSet: 3
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


osmocom-bb[fixeria/trx]: trxcon/l1ctl.c: hexdump content of unhandled messages

2018-03-21 Thread Vadim Yanitskiy

Patch Set 4: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/7414
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iec8fc6d49d1e35fe101960dd969de559e37a6a75
Gerrit-PatchSet: 4
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmocom-bb[fixeria/trx]: trx_toolkit: Add cmdline arg to set bind addr

2018-03-21 Thread Vadim Yanitskiy

Patch Set 3: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/7410
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7be18fef40967fb7551f4115f22cbbd9cdb0840d
Gerrit-PatchSet: 3
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-HasComments: No


[PATCH] osmocom-bb[fixeria/trx]: trx_toolkit: Add cmdline arg to set bind addr

2018-03-21 Thread Vadim Yanitskiy
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7410

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

trx_toolkit: Add cmdline arg to set bind addr

Previous hardcoded default of 0.0.0.0 was inappropiate in some
scenarios, as it sets the SRC addr of the packets sent through the
socket based on the routing.

For instance, if iface IF1 has assigned two IP addresses A and B,
A being the first addr of the interface, and osmo-bts-trx is
configured with "osmotrx ip local A" and "osmotrx ip remote B",
the following happens:

  CMD POWER OFF src=A:5801 dst=B:5701
  RSP POWER OFF src=A:5701 dst=A:5701 <-- A is assigned as src addr.

But osmo-bts-trx is waiting for packets from B:5701, and the packet
is dropped with ICMP Unreachable. If addr binding is forced in
fake_trx to B, then everthing's fine.

Let's extend the UDPLink in order to allow manual, but optional
setting of bind address, and add a corresponding cmdline
argument to all executables.

Change-Id: I7be18fef40967fb7551f4115f22cbbd9cdb0840d
---
M src/target/trx_toolkit/burst_gen.py
M src/target/trx_toolkit/burst_send.py
M src/target/trx_toolkit/clck_gen.py
M src/target/trx_toolkit/ctrl_cmd.py
M src/target/trx_toolkit/ctrl_if_bb.py
M src/target/trx_toolkit/ctrl_if_bts.py
M src/target/trx_toolkit/fake_trx.py
M src/target/trx_toolkit/udp_link.py
8 files changed, 58 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/10/7410/3

diff --git a/src/target/trx_toolkit/burst_gen.py 
b/src/target/trx_toolkit/burst_gen.py
index 4bc036e..d83f137 100755
--- a/src/target/trx_toolkit/burst_gen.py
+++ b/src/target/trx_toolkit/burst_gen.py
@@ -39,6 +39,7 @@
 class Application:
# Application variables
remote_addr = "127.0.0.1"
+   bind_addr = "0.0.0.0"
base_port = 5700
conn_mode = "TRX"
output_file = None
@@ -70,11 +71,11 @@
def run(self):
# Init DATA interface with TRX or L1
if self.conn_mode == "TRX":
-   self.data_if = DATAInterface(self.remote_addr,
-   self.base_port + 2, self.base_port + 102)
+   self.data_if = DATAInterface(self.remote_addr, 
self.base_port + 2,
+   self.bind_addr, self.base_port + 102)
elif self.conn_mode == "L1":
-   self.data_if = DATAInterface(self.remote_addr,
-   self.base_port + 102, self.base_port + 2)
+   self.data_if = DATAInterface(self.remote_addr, 
self.base_port + 102,
+   self.bind_addr, self.base_port + 2)
 
# Init random burst generator
burst_gen = RandBurstGen()
@@ -149,6 +150,7 @@
 "  -o --output-fileWrite bursts to a capture 
file\n"\
 "  -m --conn-mode  Send bursts to: TRX (default) / 
L1\n"\
 "  -r --remote-addrSet remote address (default 
%s)\n"   \
+"  -b --bind-addr  Set local address (default 
%s)\n"\
 "  -p --base-port  Set base port number (default 
%d)\n\n"
 
s += " Burst generation\n" \
@@ -161,7 +163,7 @@
 " --toaSet ToA in symbols (default 
random)\n"   \
 " --toa256 Set ToA in 1/256 symbol 
periods\n"
 
-   print(s % (self.remote_addr, self.base_port))
+   print(s % (self.remote_addr, self.bind_addr, self.base_port))
 
if msg is not None:
print(msg)
@@ -169,12 +171,13 @@
def parse_argv(self):
try:
opts, args = getopt.getopt(sys.argv[1:],
-   "o:m:r:p:b:c:f:t:h",
+   "o:m:r:b:p:b:c:f:t:h",
[
"help",
"output-file="
"conn-mode=",
"remote-addr=",
+   "bind-addr=",
"base-port=",
"burst-type=",
"burst-count=",
@@ -200,6 +203,8 @@
self.conn_mode = v
elif o in ("-r", "--remote-addr"):
self.remote_addr = v
+   elif o in ("-b", "--bind-addr"):
+   self.bind_addr = v
elif o in ("-p", "--base-port"):
self.base_port = int(v)
 
diff --git a/src/target/trx_toolkit/burst_send.py 
b/src/target/trx_toolkit/burst_send.py
index 7405c90..f6c85ba 100755
--- 

[MERGED] osmo-msc[master]: cosmetic: gsm_04_08.c: drop unused struct gsm_lai

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: gsm_04_08.c: drop unused struct gsm_lai
..


cosmetic: gsm_04_08.c: drop unused struct gsm_lai

Change-Id: I3236841b1701dc902754d4a388c7806b0685a91e
---
M src/libmsc/gsm_04_08.c
1 file changed, 0 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 437cb59..563b835 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -82,12 +82,6 @@
 static int gsm48_tx_simple(struct gsm_subscriber_connection *conn,
   uint8_t pdisc, uint8_t msg_type);
 
-struct gsm_lai {
-   uint16_t mcc;
-   uint16_t mnc;
-   uint16_t lac;
-};
-
 static uint32_t new_callref = 0x8001;
 
 /* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher 
*/

-- 
To view, visit https://gerrit.osmocom.org/7412
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3236841b1701dc902754d4a388c7806b0685a91e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7306
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: cosmetic: use enum ranap_nsap_addr_enc instead of int

2018-03-21 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7296
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic9f8bf53f4b605c166e84cd7edd90c10fe7d7a1f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-msc[master]: cosmetic: gsm_04_08.c: drop unused struct gsm_lai

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7412
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3236841b1701dc902754d4a388c7806b0685a91e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: fix typo

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7421
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I36ed82dcb6010b331fe247a60f373d8e2e8a4bfc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: fix incomplete sentence in comment.

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7424
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6a04811704750cf715e72eba2959d08e761ced29
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: remove dead code and obsolete fixmes

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7426
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib171f4b5697c04603a20ffc6ebd617260a38ccb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: remove old, already commented-out code

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7427
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief994b840e3fe694b37330c46c3899746d810a39
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: fix argument order of forward_dtap()

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7422
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida77c82e600f99d690ffa1850450925359e33ae8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: Cosmetic: fix missing semicolon after osmo-assert

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7425
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a1144b70ab82156175c6cdee32a6d22b4b53539
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: remove unused enum members

2018-03-21 Thread Harald Welte

Patch Set 1:

I would prefer we'd actually use those events. I  originally created them as an 
implicit TODO/FIXME that the logic currently done in the legacy libbsc code 
actually logically belongs into the gscon FSM, IMHO.

-- 
To view, visit https://gerrit.osmocom.org/7420
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I301f7160b9ec8380849f9c9906b41c121a54f49f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: remove needless fixme note.

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7423
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4860412f8228756f7cd5669c4f6c7d845904e36b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: cosmetic: remove unused variable

2018-03-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: remove unused variable
..


cosmetic: remove unused variable

Change-Id: Ic19d0401557d506d104b82f88b4dcf72055d62e1
---
M src/libmsc/a_iface_bssap.c
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 2be9afa..3c1bcc8 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -512,13 +512,9 @@
 static int bssmap_rx_ass_compl(struct gsm_subscriber_connection *conn, struct 
msgb *msg,
   struct tlv_parsed *tp)
 {
-   struct mgcp_client *mgcp;
struct sockaddr_storage rtp_addr;
struct sockaddr_in *rtp_addr_in;
int rc;
-
-   mgcp = conn->network->mgw.client;
-   OSMO_ASSERT(mgcp);
 
LOGPCONN(conn, LOGL_INFO, "Rx BSSMAP ASSIGNMENT COMPLETE message\n");
 

-- 
To view, visit https://gerrit.osmocom.org/7416
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic19d0401557d506d104b82f88b4dcf72055d62e1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: cosmetic: remove unused variable

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7416
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic19d0401557d506d104b82f88b4dcf72055d62e1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmocom-bb[master]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7419
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: Cosmetic: fix missing semicolon after osmo-assert

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7425

Cosmetic: fix missing semicolon after osmo-assert

- add the missing semicolong,
- correct wrong indentation caused by the missing semicolon

Change-Id: I9a1144b70ab82156175c6cdee32a6d22b4b53539
Related: OS#2823
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 5154fb2..dc088a1 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -866,9 +866,9 @@
/* Note: An MGW connection die per definition at any time.
 * However, if it dies during the assignment we must return
 * with an assignment failure */
-   OSMO_ASSERT(fi->state != ST_INIT && fi->state != ST_WAIT_CC)
-   if (fi->state == ST_WAIT_CRCX_BTS || fi->state == 
ST_WAIT_ASS_CMPL || fi->state == ST_WAIT_MDCX_BTS
-   || fi->state == ST_WAIT_CRCX_MSC) {
+   OSMO_ASSERT(fi->state != ST_INIT && fi->state != ST_WAIT_CC);
+   if (fi->state == ST_WAIT_CRCX_BTS || fi->state == 
ST_WAIT_ASS_CMPL || fi->state == ST_WAIT_MDCX_BTS
+   || fi->state == ST_WAIT_CRCX_MSC) {
resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
sigtran_send(conn, resp, fi);
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);

-- 
To view, visit https://gerrit.osmocom.org/7425
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a1144b70ab82156175c6cdee32a6d22b4b53539
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: fix incomplete sentence in comment.

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7424

cosmetic: fix incomplete sentence in comment.

Change-Id: I6a04811704750cf715e72eba2959d08e761ced29
Related: OS#2823
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 0d82564..5154fb2 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -415,8 +415,8 @@
case GSCON_EV_MGW_CRCX_RESP_BTS:
conn_peer = data;
 
-   /* Check if the MGW has assigned an enpoint to us, we can not
-* proceed */
+   /* Check if the MGW has assigned an enpoint to us, otherwise we
+* can not proceed. */
if (strlen(conn_peer->endpoint) <= 0) {
resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
sigtran_send(conn, resp, fi);

-- 
To view, visit https://gerrit.osmocom.org/7424
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a04811704750cf715e72eba2959d08e761ced29
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: remove dead code and obsolete fixmes

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7426

cosmetic: remove dead code and obsolete fixmes

Change-Id: Ib171f4b5697c04603a20ffc6ebd617260a38ccb4
Related: OS#2823
---
M src/osmo-bsc/osmo_bsc_audio.c
1 file changed, 2 insertions(+), 17 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c
index 99a3ebd..8eef8d2 100644
--- a/src/osmo-bsc/osmo_bsc_audio.c
+++ b/src/osmo-bsc/osmo_bsc_audio.c
@@ -75,23 +75,8 @@
if (con->ho) {
LOGPHO(con->ho, LOGL_DEBUG, "BTS sent MDCX ACK\n");
/* No need to do anything for handover here. As soon as 
a HANDOVER DETECT
-* happens, osmo_bsc_mgcp.c will trigger the MGCP MDCX 
towards MGW by
-* receiving an S_LCHAN_HANDOVER_DETECT signal.
-*
-* FIXME: This will not work, osmo_bsc_mgcp.c is now 
removed. The
-* switchover must be handled by the GSCON FSM because 
there we
-* we instantiate the child FSMs which handle the MGCP 
traffic. */
-#if 0
-/* FIXME: This does not work anymore, we will have to implement this in the 
GSCON FSM */
-   /* NOTE: When an ho_lchan exists, the MDCX is part of an
-* handover operation (intra-bsc). This means we will 
not
-* inform the MSC about the event, which means that no
-* assignment complete message is transmitted, we just
-* inform the logic that controls the MGW about the new
-* connection info */
-   LOGP(DMSC, LOGL_INFO,"RTP connection handover 
initiated...\n");
-   mgcp_handover(con->user_plane.mgcp_ctx, con->ho_lchan);
-#endif
+* happens, handover_logic.c and bsc_subscr_conn_fsm.c  
will trigger the
+* MGCP MDCX towards MGW by receiving an 
S_LCHAN_HANDOVER_DETECT signal. */
} else if (is_ipaccess_bts(conn_get_bts(con)) && 
con->user_plane.rtp_ip) {
/* NOTE: This is only relevant on AoIP networks with
 * IPA based base stations. See also osmo_bsc_api.c,

-- 
To view, visit https://gerrit.osmocom.org/7426
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib171f4b5697c04603a20ffc6ebd617260a38ccb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: remove needless fixme note.

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7423

cosmetic: remove needless fixme note.

Change-Id: I4860412f8228756f7cd5669c4f6c7d845904e36b
Related: OS#2823
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index da9d46b..0d82564 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -316,14 +316,6 @@
/* FIXME: We need to check if current channel is sufficient. If
 * yes, do MODIFY. If not, do assignment (see commented lines 
below) */
 
-   /* FIXME: At the moment, the FSM is constructed in an
-* unfortunate way. In case of a voice channel assignment
-* we first go through a couple of MGCP related states,
-* then reach the state where the actual channel assignment
-* happens and then again we perform some MGCP related
-* actions and eventually end up in ST_ACTIVE again. This
-* could be restructured */
-
switch (conn->user_plane.chan_mode) {
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_EFR:

-- 
To view, visit https://gerrit.osmocom.org/7423
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4860412f8228756f7cd5669c4f6c7d845904e36b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: remove old, already commented-out code

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7427

cosmetic: remove old, already commented-out code

Change-Id: Ief994b840e3fe694b37330c46c3899746d810a39
Related: OS#2823
---
M src/osmo-bsc/osmo_bsc_api.c
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 40c06dd..7a42f3c 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -259,7 +259,6 @@
}
 
/* allocate resource for a new connection */
-   //ret = bsc_create_new_connection(conn, msc, send_ping);
ret = osmo_bsc_sigtran_new_conn(conn, msc);
 
if (ret != BSC_CON_SUCCESS) {
@@ -283,7 +282,6 @@
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), NULL);
if (!resp) {
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   //osmo_bsc_sigtran_del_conn(conn);
return BSC_API_CONN_POL_REJECT;
}
 

-- 
To view, visit https://gerrit.osmocom.org/7427
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief994b840e3fe694b37330c46c3899746d810a39
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: remove dead code

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7428

cosmetic: remove dead code

There is a lot of dead code in osmo_bsc_msc.c that used to handle
the IPA multiplexed SSCP lite A interface.

- remove portions of the dead code
- remove IPA Ping related VTY commands

Change-Id: I5cf3fec31cc774c902f3cfe6d16fb85ef301694a
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_vty.c
5 files changed, 6 insertions(+), 593 deletions(-)


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

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 2d759ca..2a41d84 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -78,10 +78,6 @@
 phys_chan_config TCH/F
 hopping enabled 0
 msc 0
- ip.access rtp-base 4000
- timeout-ping 20
- timeout-pong 5
- no timeout-ping advanced
  no bsc-welcome-text
  no bsc-msc-lost-text
  no bsc-grace-text
diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index a04e632..bedf412 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -73,11 +73,6 @@
 
 
/* Connection data */
-   int ping_timeout;
-   int pong_timeout;
-   struct osmo_timer_list ping_timer;
-   struct osmo_timer_list pong_timer;
-   int advanced_ping;
struct bsc_msc_connection *msc_con;
struct osmo_plmn_id core_plmn;
int core_lac;
@@ -158,8 +153,6 @@
 
 int osmo_bsc_msc_init(struct bsc_msc_data *msc);
 int osmo_bsc_sccp_init(struct gsm_network *gsmnet);
-int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int 
proto);
-int msc_queue_write_with_ping(struct bsc_msc_connection *, struct msgb *msg, 
int proto);
 
 int osmo_bsc_audio_init(struct gsm_network *network);
 
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 7a42f3c..e34f5bc 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -237,18 +237,8 @@
 {
int con_type, rc, lu_cause;
char *imsi = NULL;
-   struct timeval tv;
struct msgb *resp;
enum bsc_con ret;
-   int send_ping = msc->advanced_ping;
-
-   /* Advanced ping/pong handling */
-   if (osmo_timer_pending(>pong_timer))
-   send_ping = 0;
-   if (msc->ping_timeout <= 0)
-   send_ping = 0;
-   if (send_ping && osmo_timer_remaining(>ping_timer, NULL, ) == 
-1)
-   send_ping = 0;
 
/* Check the filter */
rc = bsc_filter_initial(msc->network->bsc_data, msc, conn, msg,
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index e0c7556..b2a0bb9 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -40,515 +40,25 @@
 #include 
 #include 
 
-#if 0
-static void initialize_if_needed(struct bsc_msc_connection *conn);
-static void send_lacs(struct gsm_network *net, struct bsc_msc_connection 
*conn);
-static void send_id_get_response(struct bsc_msc_data *data, int fd, struct 
msgb *inp);
-static void send_ping(struct bsc_msc_data *data);
-static void schedule_ping_pong(struct bsc_msc_data *data);
-
-/*
- * MGCP forwarding code
- */
-
-#endif
-static int mgcp_do_read(struct osmo_fd *fd)
-{
-   struct bsc_msc_data *data = (struct bsc_msc_data *) fd->data;
-   struct msgb *mgcp;
-   int ret;
-
-   mgcp = msgb_alloc_headroom(4096, 128, "mgcp_from_gw");
-   if (!mgcp) {
-   LOGP(DMGCP, LOGL_ERROR, "Failed to allocate MGCP message.\n");
-   return -1;
-   }
-
-   ret = read(fd->fd, mgcp->data, 4096 - 128);
-   if (ret <= 0) {
-   LOGP(DMGCP, LOGL_ERROR, "Failed to read: %d/%s\n", errno, 
strerror(errno));
-   msgb_free(mgcp);
-   return -1;
-   } else if (ret > 4096 - 128) {
-   LOGP(DMGCP, LOGL_ERROR, "Too much data: %d\n", ret);
-   msgb_free(mgcp);
-   return -1;
-}
-
-   mgcp->l2h = msgb_put(mgcp, ret);
-   msc_queue_write(data->msc_con, mgcp, IPAC_PROTO_MGCP_OLD);
-   return 0;
-}
-
-static int mgcp_do_write(struct osmo_fd *fd, struct msgb *msg)
-{
-   int ret;
-
-   LOGP(DMGCP, LOGL_DEBUG, "Sending msg to MGCP GW size: %u\n", msg->len);
-
-   ret = write(fd->fd, msg->data, msg->len);
-   if (ret != msg->len)
-   LOGP(DMGCP, LOGL_ERROR, "Failed to forward message to MGCP GW 
(%s).\n", strerror(errno));
-
-   return ret;
-}
-
-#if 0
-static void mgcp_forward(struct bsc_msc_data *data, struct msgb *msg)
-{
-   struct msgb *mgcp;
-
-   if (msgb_l2len(msg) > 4096) {
-   LOGP(DMGCP, LOGL_ERROR, "Can not forward too big message.\n");
-   return;
-   }
-
-   mgcp = msgb_alloc(4096, "mgcp_to_gw");
-   if (!mgcp) {
-   LOGP(DMGCP, LOGL_ERROR, "Failed to send 

[PATCH] osmo-bsc[master]: cosmetic: fix argument order of forward_dtap()

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7422

cosmetic: fix argument order of forward_dtap()

The order of the arguments for forward_dtap() differs from
submit_dtap() and sigtran_send()

- bring arguments into a uniform order for all three functions

Change-Id: Ida77c82e600f99d690ffa1850450925359e33ae8
Related: OS#2823
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 8 insertions(+), 9 deletions(-)


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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index cdd85be..da9d46b 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -196,8 +196,7 @@
 }
 
 /* forward MO DTAP from RSL side to BSSAP side */
-/* FIXME: move fi parameter to the beginning */
-static void forward_dtap(struct msgb *msg, struct gsm_subscriber_connection 
*conn, struct osmo_fsm_inst *fi)
+static void forward_dtap(struct gsm_subscriber_connection *conn, struct msgb 
*msg, struct osmo_fsm_inst *fi)
 {
struct msgb *resp = NULL;
 
@@ -397,7 +396,7 @@
/* FIXME: reject any handover requests with HO FAIL until 
implemented */
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -457,7 +456,7 @@
osmo_fsm_inst_state_chg(fi, ST_WAIT_ASS_CMPL, 
GSM0808_T10_VALUE, GSM0808_T10_TIMER_NR);
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -532,7 +531,7 @@
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -583,7 +582,7 @@
 
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -621,7 +620,7 @@
 
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -654,7 +653,7 @@
break;
/* FIXME: Do we need to handle DTAP traffic in this state? 
Maybe yes? Needs to be checked. */
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);
@@ -748,7 +747,7 @@
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
break;
case GSCON_EV_MO_DTAP:
-   forward_dtap((struct msgb *)data, conn, fi);
+   forward_dtap(conn, (struct msgb *)data, fi);
break;
case GSCON_EV_MT_DTAP:
submit_dtap(conn, (struct msgb *)data, fi);

-- 
To view, visit https://gerrit.osmocom.org/7422
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida77c82e600f99d690ffa1850450925359e33ae8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: remove unused enum members

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7420

cosmetic: remove unused enum members

The enum gscon_fsm_event has three unused members.

- remove GSCON_EV_RR_HO_ACC, GSCON_EV_RR_HO_COMPL, GSCON_EV_RR_HO_FAIL

Change-Id: I301f7160b9ec8380849f9c9906b41c121a54f49f
Related: OS#2823
---
M include/osmocom/bsc/bsc_subscr_conn_fsm.h
M src/libbsc/bsc_subscr_conn_fsm.c
2 files changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h 
b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index 234161f..9421528 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -24,12 +24,6 @@
/* RR MODE MODIFY ACK received */
GSCON_EV_RR_MODE_MODIFY_ACK,
 
-   /* RR HO ACC (access burst on ext HO) */
-   GSCON_EV_RR_HO_ACC, /* NOT USED YET! */
-   /* RR HANDOVER COMPLETE received */
-   GSCON_EV_RR_HO_COMPL,   /* NOT USED YET! */
-   GSCON_EV_RR_HO_FAIL,/* NOT USED YET! */
-
/* RSL RLL Release Indication */
GSCON_EV_RLL_REL_IND,
/* RSL CONNection FAILure Indication */
diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index c7ed438..cdd85be 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -100,8 +100,6 @@
{GSCON_EV_RR_ASS_COMPL, "RR_ASSIGN_COMPL"},
{GSCON_EV_RR_ASS_FAIL, "RR_ASSIGN_FAIL"},
{GSCON_EV_RR_MODE_MODIFY_ACK, "RR_MODE_MODIFY_ACK"},
-   {GSCON_EV_RR_HO_ACC, "RR_HO_ACCESS"},
-   {GSCON_EV_RR_HO_COMPL, "RR_HO_COMPLETE"},
{GSCON_EV_RLL_REL_IND, "RLL_RELEASE.ind"},
{GSCON_EV_RSL_CONN_FAIL, "RSL_CONN_FAIL.ind"},
{GSCON_EV_RSL_CLEAR_COMPL, "RSL_CLEAR_COMPLETE"},

-- 
To view, visit https://gerrit.osmocom.org/7420
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I301f7160b9ec8380849f9c9906b41c121a54f49f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: fix typo

2018-03-21 Thread dexter

Review at  https://gerrit.osmocom.org/7421

cosmetic: fix typo

Change-Id: I36ed82dcb6010b331fe247a60f373d8e2e8a4bfc
Related: OS#2823
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 82a5a51..fa65ab9 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -184,7 +184,7 @@
/* Channel rate flag, FR=1, HR=0, Invalid=-1 */
int full_rate;
 
-   /* Channel mode flage (signaling or voice channel) */
+   /* Channel mode flag (signaling or voice channel) */
enum gsm48_chan_mode chan_mode;
 
} user_plane;

-- 
To view, visit https://gerrit.osmocom.org/7421
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36ed82dcb6010b331fe247a60f373d8e2e8a4bfc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


osmocom-bb[fixeria/trx]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Pau Espin Pedrol

Patch Set 1:

I cherry-picked it for master in https://gerrit.osmocom.org/#/c/7419/

-- 
To view, visit https://gerrit.osmocom.org/7418
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmocom-bb[master]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/7419

virt_phy: Add missing gprs related entries to l1ctlPrimNames

Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
---
M src/host/virt_phy/src/logging.c
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/19/7419/1

diff --git a/src/host/virt_phy/src/logging.c b/src/host/virt_phy/src/logging.c
index feb5081..631a6e6 100644
--- a/src/host/virt_phy/src/logging.c
+++ b/src/host/virt_phy/src/logging.c
@@ -56,7 +56,12 @@
 "L1CTL_NEIGH_PM_IND",
 "L1CTL_TRAFFIC_REQ",
 "L1CTL_TRAFFIC_CONF",
-"L1CTL_TRAFFIC_IND"};
+"L1CTL_TRAFFIC_IND",
+"L1CTL_TBF_CFG_REQ",
+"L1CTL_TBF_CFG_CONF",
+"L1CTL_DATA_TBF_REQ",
+"L1CTL_DATA_TBF_CONF"
+};
 
 static const struct log_info_cat default_categories[] = {
[DL1C] = {

-- 
To view, visit https://gerrit.osmocom.org/7419
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-gsm-tester[master]: ms: Create a cumulative distribution function class

2018-03-21 Thread Pau Espin Pedrol

Patch Set 7:

Current status for this patchset to be merged is basically to investigate why 
the cdf_test.py is not being run. Other than that it looks fine. I see that the 
latest patch is neither running this test, so we can probably try running it 
with a new patch attempting to fix it later.

Holger can you confirm that at least it passes locally and attempt to fix this 
issue in jenkins? It's fine to fix it in an extra commit.

-- 
To view, visit https://gerrit.osmocom.org/6230
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3
Gerrit-PatchSet: 7
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmocom-bb[fixeria/trx]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Vadim Yanitskiy

Patch Set 1: Code-Review-1

Exactly this change should be merged directly to master.

-- 
To view, visit https://gerrit.osmocom.org/7418
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmocom-bb[fixeria/trx]: virt_phy: Add missing gprs related entries to l1ctlPrimNames

2018-03-21 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/7418

virt_phy: Add missing gprs related entries to l1ctlPrimNames

Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
---
M src/host/virt_phy/src/logging.c
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/18/7418/1

diff --git a/src/host/virt_phy/src/logging.c b/src/host/virt_phy/src/logging.c
index feb5081..631a6e6 100644
--- a/src/host/virt_phy/src/logging.c
+++ b/src/host/virt_phy/src/logging.c
@@ -56,7 +56,12 @@
 "L1CTL_NEIGH_PM_IND",
 "L1CTL_TRAFFIC_REQ",
 "L1CTL_TRAFFIC_CONF",
-"L1CTL_TRAFFIC_IND"};
+"L1CTL_TRAFFIC_IND",
+"L1CTL_TBF_CFG_REQ",
+"L1CTL_TBF_CFG_CONF",
+"L1CTL_DATA_TBF_REQ",
+"L1CTL_DATA_TBF_CONF"
+};
 
 static const struct log_info_cat default_categories[] = {
[DL1C] = {

-- 
To view, visit https://gerrit.osmocom.org/7418
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59e22cda9cf5e25b5e2b1fe38f8ec3937b16f80
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmocom-bb[fixeria/trx]: trxcon: l1ctl_rx_cb: hexdump content of unknown msg type

2018-03-21 Thread Pau Espin Pedrol

trxcon: l1ctl_rx_cb: hexdump content of unknown msg type

Change-Id: Iec8fc6d49d1e35fe101960dd969de559e37a6a75
---
M src/host/trxcon/l1ctl.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/14/7414/2

diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 3de0cf6..2aa73d4 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -794,7 +794,8 @@
case L1CTL_CRYPTO_REQ:
return l1ctl_rx_crypto_req(l1l, msg);
default:
-   LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", l1h->msg_type);
+   LOGP(DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", 
l1h->msg_type,
+   osmo_hexdump(msgb_data(msg), msgb_length(msg)));
msgb_free(msg);
return -EINVAL;
}

-- 
To view, visit https://gerrit.osmocom.org/7414
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iec8fc6d49d1e35fe101960dd969de559e37a6a75
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Pau Espin Pedrol 


osmo-hlr[master]: VTY: enable Milenage-2G authentication algorithm

2018-03-21 Thread Neels Hofmeyr

Patch Set 2:

to clarify, osmo-hlr has 2G and 3G auth tokens, and separate database tables 
for them, because 3G tokens need more columns. If you put a milenage KI in the 
2G database table, you're lacking essential OP/OPC and SQN.

The decision which to use where is made in the auth tuple consumers, i.e. 
osmo-msc and osmo-sgsn. They will ask the HLR for auth tokens, and then will, 
if present, use the full UMTS (="3G") auth tokens on a GERAN=2G network if SIM, 
MS and network are R99 capable (see system-information and classmark). Then 
there's also some compat layer to use the milenage crypto algo but still using 
old shorter GSM AKA tokens; then there's also the choice of the MS to reply in 
GSM AKA and the need for the network to handle that (fixed only recently in 
osmo-msc). We have all of it implemented and working, at best there may be bugs 
in it.

-- 
To view, visit https://gerrit.osmocom.org/7391
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e6ff11d87bd9462db153ce6e32e7afc8197c38b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmo-hlr[master]: VTY: enable Milenage-2G authentication algorithm

2018-03-21 Thread Neels Hofmeyr

Patch Set 2: Code-Review-2

true, that looks like GERAN doesn't support milenage, but I think that _2G and 
_3G was actually a misnomer in osmo-hlr and should have been _GSM and _UMTS. So 
we use the AUTH_ALG_TYPES_3G also on an R99 2G network, and this patch is 
misunderstanding that.

We have full Milenage support for both 3G and 2G RAN, GERAN would use the 3G 
auth tokens if present. No need to change osmo-hlr at all for Milenage support, 
it's all there.

-- 
To view, visit https://gerrit.osmocom.org/7391
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e6ff11d87bd9462db153ce6e32e7afc8197c38b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


  1   2   >