[PATCH] osmo-bsc[master]: OML: consider administrative state when reporting

2017-11-29 Thread Max

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

OML: consider administrative state when reporting

Report state as degraded if BTS or any of its TRX are administratively
locked.

Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f
Related: OS#2486
---
M include/osmocom/bsc/abis_nm.h
M src/libbsc/abis_nm.c
M src/libbsc/bts_ipaccess_nanobts.c
3 files changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h
index e25cb4f..b0cb166 100644
--- a/include/osmocom/bsc/abis_nm.h
+++ b/include/osmocom/bsc/abis_nm.h
@@ -162,7 +162,7 @@
 const char *ipacc_testres_name(uint8_t res);
 
 /* Functions calling into other code parts */
-bool all_trx_rsl_connected(const struct gsm_bts *bts);
+bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts);
 int nm_is_running(struct gsm_nm_state *s);
 
 int abis_nm_vty_init(void);
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index b7391a1..295cefd 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -683,13 +683,18 @@
return 0;
 }
 
-bool all_trx_rsl_connected(const struct gsm_bts *bts)
+bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts)
 {
const struct gsm_bts_trx *trx;
 
+   if (bts->mo.nm_state.administrative == NM_STATE_LOCKED)
+   return false;
+
llist_for_each_entry(trx, &bts->trx_list, list) {
if (!trx->rsl_link)
return false;
+   if (trx->mo.nm_state.administrative == NM_STATE_LOCKED)
+   return false;
}
 
return true;
diff --git a/src/libbsc/bts_ipaccess_nanobts.c 
b/src/libbsc/bts_ipaccess_nanobts.c
index 9e273f5..03bb708 100644
--- a/src/libbsc/bts_ipaccess_nanobts.c
+++ b/src/libbsc/bts_ipaccess_nanobts.c
@@ -50,7 +50,7 @@
 static char *get_oml_status(const struct gsm_bts *bts)
 {
if (bts->oml_link)
-   return all_trx_rsl_connected(bts) ? "connected" : "degraded";
+   return all_trx_rsl_connected_unlocked(bts) ? "connected" : 
"degraded";
 
return "disconnected";
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC

2017-11-29 Thread Max

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

cosmetic: remove obsolete ROLE_BSC

It's leftover from the time when gsm_data_shared.* was actually shared
with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it
entirely and make working with gsm_data_shared.h slightly easier.

Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon/gsm_data_shared.c
3 files changed, 0 insertions(+), 117 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index b9427b8..75109e3 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -218,7 +218,6 @@
 };
 
 
-#define ROLE_BSC
 #include "gsm_data_shared.h"
 
 
diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 04669e2..37f7976 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -19,11 +19,6 @@
 #include 
 
 #include 
-
-#ifndef ROLE_BSC
-#include 
-#endif
-
 #include 
 #include 
 
@@ -251,7 +246,6 @@
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t speech_mode;
-#ifdef ROLE_BSC
struct rtp_socket *rtp_socket;
 
/* info we need to postpone the AoIP
@@ -263,16 +257,12 @@
uint8_t speech_mode;
bool valid;
} ass_compl;
-#else
-   struct osmo_rtp_socket *rtp_socket;
-#endif
} abis_ip;
 
uint8_t rqd_ta;
 
char *name;
 
-#ifdef ROLE_BSC
struct osmo_timer_list T3101;
struct osmo_timer_list T3109;
struct osmo_timer_list T3111;
@@ -300,88 +290,6 @@
struct gsm48_req_ref *rqd_ref;
uint8_t rqd_ta;
} dyn;
-#else
-   /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.
-* Currently we don't share these headers so this is a magic number. */
-   struct llist_head sapi_cmds;
-   uint8_t sapis_dl[23];
-   uint8_t sapis_ul[23];
-   struct lapdm_channel lapdm_ch;
-   struct llist_head dl_tch_queue;
-   struct {
-   /* bitmask of all SI that are present/valid in si_buf */
-   uint32_t valid;
-   uint32_t last;
-   /* buffers where we put the pre-computed SI:
-  SI2Q_MAX_NUM is the max number of SI2quater messages (see 
3GPP TS 44.018) */
-   sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
-   } si;
-   struct {
-   uint8_t flags;
-   /* RSL measurment result number, 0 at lchan_act */
-   uint8_t res_nr;
-   /* current Tx power level of the BTS */
-   uint8_t bts_tx_pwr;
-   /* number of measurements stored in array below */
-   uint8_t num_ul_meas;
-   struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
-   /* last L1 header from the MS */
-   uint8_t l1_info[2];
-   struct gsm_meas_rep_unidir ul_res;
-   } meas;
-   struct {
-   struct amr_multirate_conf amr_mr;
-   struct {
-   struct osmo_fsm_inst *dl_amr_fsm;
-   /* TCH cache */
-   uint8_t cache[20];
-   /* FACCH cache */
-   uint8_t facch[GSM_MACBLOCK_LEN];
-   uint8_t len;
-   uint32_t fn;
-   bool is_update;
-   /* set for each SID frame to detect talkspurt for codecs
-  without explicit ONSET event */
-   bool ul_sid;
-   /* indicates if DTXd was active during DL measurement
-  period */
-   bool dl_active;
-   } dtx;
-   uint8_t last_cmr;
-   uint32_t last_fn;
-   } tch;
-
-   /* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
-   int16_t ms_t_offs;
-   /* 3GPP TS 45.010 § 1.2 round trip propagation delay (in symbols) or -1 
*/
-   int16_t p_offs;
-
-   /* BTS-side ciphering state (rx only, bi-directional, ...) */
-   uint8_t ciph_state;
-   uint8_t ciph_ns;
-   uint8_t loopback;
-   struct {
-   uint8_t active;
-   uint8_t ref;
-   /* T3105: PHYS INF retransmission */
-   struct osmo_timer_list t3105;
-   /* counts up to Ny1 */
-   unsigned int phys_info_count;
-   } ho;
-   /* S counter for link loss */
-   int s;
-   /* Kind of the release/activation. E.g. RSL or PCU */
-   int rel_act_kind;
-   /* RTP header Marker bit to indicate beginning of speech after pause  */
-   bool rtp_tx_marker;
-   /* power han

osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: logging: Extend the LOGPSRC macro to put cont in it as well

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bsc[master]: OML: consider administrative state when reporting

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-sgsn[master]: tests: Fix selection of python version

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-sgsn[master]: Replace '.' in counter names with ':'

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: OML: consider administrative state when reporting

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: OML: consider administrative state when reporting
..


OML: consider administrative state when reporting

Report state as degraded if BTS or any of its TRX are administratively
locked.

Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f
Related: OS#2486
---
M include/osmocom/bsc/abis_nm.h
M src/libbsc/abis_nm.c
M src/libbsc/bts_ipaccess_nanobts.c
3 files changed, 8 insertions(+), 3 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 e25cb4f..b0cb166 100644
--- a/include/osmocom/bsc/abis_nm.h
+++ b/include/osmocom/bsc/abis_nm.h
@@ -162,7 +162,7 @@
 const char *ipacc_testres_name(uint8_t res);
 
 /* Functions calling into other code parts */
-bool all_trx_rsl_connected(const struct gsm_bts *bts);
+bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts);
 int nm_is_running(struct gsm_nm_state *s);
 
 int abis_nm_vty_init(void);
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index b7391a1..295cefd 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -683,13 +683,18 @@
return 0;
 }
 
-bool all_trx_rsl_connected(const struct gsm_bts *bts)
+bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts)
 {
const struct gsm_bts_trx *trx;
 
+   if (bts->mo.nm_state.administrative == NM_STATE_LOCKED)
+   return false;
+
llist_for_each_entry(trx, &bts->trx_list, list) {
if (!trx->rsl_link)
return false;
+   if (trx->mo.nm_state.administrative == NM_STATE_LOCKED)
+   return false;
}
 
return true;
diff --git a/src/libbsc/bts_ipaccess_nanobts.c 
b/src/libbsc/bts_ipaccess_nanobts.c
index 9e273f5..03bb708 100644
--- a/src/libbsc/bts_ipaccess_nanobts.c
+++ b/src/libbsc/bts_ipaccess_nanobts.c
@@ -50,7 +50,7 @@
 static char *get_oml_status(const struct gsm_bts *bts)
 {
if (bts->oml_link)
-   return all_trx_rsl_connected(bts) ? "connected" : "degraded";
+   return all_trx_rsl_connected_unlocked(bts) ? "connected" : 
"degraded";
 
return "disconnected";
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[MERGED] osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: cosmetic: remove obsolete ROLE_BSC
..


cosmetic: remove obsolete ROLE_BSC

It's leftover from the time when gsm_data_shared.* was actually shared
with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it
entirely and make working with gsm_data_shared.h slightly easier.

Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon/gsm_data_shared.c
3 files changed, 0 insertions(+), 117 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index b9427b8..75109e3 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -218,7 +218,6 @@
 };
 
 
-#define ROLE_BSC
 #include "gsm_data_shared.h"
 
 
diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 04669e2..37f7976 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -19,11 +19,6 @@
 #include 
 
 #include 
-
-#ifndef ROLE_BSC
-#include 
-#endif
-
 #include 
 #include 
 
@@ -251,7 +246,6 @@
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t speech_mode;
-#ifdef ROLE_BSC
struct rtp_socket *rtp_socket;
 
/* info we need to postpone the AoIP
@@ -263,16 +257,12 @@
uint8_t speech_mode;
bool valid;
} ass_compl;
-#else
-   struct osmo_rtp_socket *rtp_socket;
-#endif
} abis_ip;
 
uint8_t rqd_ta;
 
char *name;
 
-#ifdef ROLE_BSC
struct osmo_timer_list T3101;
struct osmo_timer_list T3109;
struct osmo_timer_list T3111;
@@ -300,88 +290,6 @@
struct gsm48_req_ref *rqd_ref;
uint8_t rqd_ta;
} dyn;
-#else
-   /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.
-* Currently we don't share these headers so this is a magic number. */
-   struct llist_head sapi_cmds;
-   uint8_t sapis_dl[23];
-   uint8_t sapis_ul[23];
-   struct lapdm_channel lapdm_ch;
-   struct llist_head dl_tch_queue;
-   struct {
-   /* bitmask of all SI that are present/valid in si_buf */
-   uint32_t valid;
-   uint32_t last;
-   /* buffers where we put the pre-computed SI:
-  SI2Q_MAX_NUM is the max number of SI2quater messages (see 
3GPP TS 44.018) */
-   sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
-   } si;
-   struct {
-   uint8_t flags;
-   /* RSL measurment result number, 0 at lchan_act */
-   uint8_t res_nr;
-   /* current Tx power level of the BTS */
-   uint8_t bts_tx_pwr;
-   /* number of measurements stored in array below */
-   uint8_t num_ul_meas;
-   struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
-   /* last L1 header from the MS */
-   uint8_t l1_info[2];
-   struct gsm_meas_rep_unidir ul_res;
-   } meas;
-   struct {
-   struct amr_multirate_conf amr_mr;
-   struct {
-   struct osmo_fsm_inst *dl_amr_fsm;
-   /* TCH cache */
-   uint8_t cache[20];
-   /* FACCH cache */
-   uint8_t facch[GSM_MACBLOCK_LEN];
-   uint8_t len;
-   uint32_t fn;
-   bool is_update;
-   /* set for each SID frame to detect talkspurt for codecs
-  without explicit ONSET event */
-   bool ul_sid;
-   /* indicates if DTXd was active during DL measurement
-  period */
-   bool dl_active;
-   } dtx;
-   uint8_t last_cmr;
-   uint32_t last_fn;
-   } tch;
-
-   /* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
-   int16_t ms_t_offs;
-   /* 3GPP TS 45.010 § 1.2 round trip propagation delay (in symbols) or -1 
*/
-   int16_t p_offs;
-
-   /* BTS-side ciphering state (rx only, bi-directional, ...) */
-   uint8_t ciph_state;
-   uint8_t ciph_ns;
-   uint8_t loopback;
-   struct {
-   uint8_t active;
-   uint8_t ref;
-   /* T3105: PHYS INF retransmission */
-   struct osmo_timer_list t3105;
-   /* counts up to Ny1 */
-   unsigned int phys_info_count;
-   } ho;
-   /* S counter for link loss */
-   int s;
-   /* Kind of the release/activation. E.g. RSL or PCU */
-   int rel_a

osmo-ci[master]: jenkins docker: remove smalltalk things

2017-11-29 Thread Harald Welte

Patch Set 3: Code-Review+1

we do have various osmo-st- related jenkins jobs, I presume you have verified 
that none of them uses docker images to do build testing?  Holger probably 
knows in detail.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


osmo-bsc[master]: mgcp: use hexadecimal digits in endpoint names

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e
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]: mgcp: do not fail silently on snprintf()

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56
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 duplicate logging

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06
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: do not cast void pointer

2017-11-29 Thread Harald Welte

Patch Set 3:

I'm not sure we should spend time on this kind of things. It's not bad style to 
have the typecast...

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

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


osmo-bsc[master]: mgcp: cosmetic fixups

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9
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-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg
..


examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg

Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269
---
M doc/examples/osmo-ggsn.cfg
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/examples/osmo-ggsn.cfg b/doc/examples/osmo-ggsn.cfg
index 763e561..8317684 100644
--- a/doc/examples/osmo-ggsn.cfg
+++ b/doc/examples/osmo-ggsn.cfg
@@ -53,6 +53,7 @@
   type-support v6
   ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56
   ipv6 dns 0 2001:4860:4860::
+  ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56
   no shutdown
  apn inet46
@@ -65,6 +66,7 @@
   ip ifconfig 176.16.46.0/24
   ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56
   ipv6 dns 0 2001:4860:4860::
+  ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56
   no shutdown
  default-apn internet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


osmo-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: auth: remove obsolete VTY commands

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: auth: remove obsolete VTY commands
..


auth: remove obsolete VTY commands

Authentication is no longer done in the BSC, the variables that
set the authentication policy and the IMSI regex have no longer
any effect.

Remove auth policy and authorized-regexp

Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
7 files changed, 0 insertions(+), 64 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 69f8ab7..60338d2 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -8,8 +8,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- auth policy closed
- authorized-regexp .*
  location updating reject cause 13
  encryption a5 0
  authentication optional
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 59e7090..f9f5ba6 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -7,8 +7,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- auth policy closed
- authorized-regexp .*
  location updating reject cause 13
  encryption a5 0
  authentication optional
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 75109e3..857dd4f 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -368,9 +368,6 @@
uint16_t network_code;
char *name_long;
char *name_short;
-   enum gsm_auth_policy auth_policy;
-   regex_t authorized_regexp;
-   char *authorized_reg_str;
enum gsm48_reject_value reject_cause;
int a5_encryption;
bool authentication_required;
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index fa8c477..1874200 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -477,14 +477,6 @@
return -EINVAL;
}
 
-   if (bts->network->auth_policy == GSM_AUTH_POLICY_ACCEPT_ALL &&
-   !bts->si_common.rach_control.cell_bar)
-   LOGP(DNM, LOGL_ERROR, "\nWARNING: You are running an 
'accept-all' "
-   "network on a BTS that is not barred.  This "
-   "configuration is likely to interfere with production "
-   "GSM networks and should only be used in a RF "
-   "shielded environment such as a faraday cage!\n\n");
-
/* Control Channel Description is set from vty/config */
 
/* T3212 is set from vty/config */
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 71c2cef..cd18e3a 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -171,10 +171,6 @@
net->name_long, VTY_NEWLINE);
vty_out(vty, "  Short network name: '%s'%s",
net->name_short, VTY_NEWLINE);
-   vty_out(vty, "  Authentication policy: %s",
-   gsm_auth_policy_name(net->auth_policy));
-   if (net->authorized_reg_str)
-   vty_out(vty, ", authorized regexp: %s", 
net->authorized_reg_str);
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, "  Location updating reject cause: %u%s",
net->reject_cause, VTY_NEWLINE);
@@ -803,9 +799,6 @@
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
-   vty_out(vty, " auth policy %s%s", 
gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE);
-   if (gsmnet->authorized_reg_str)
-   vty_out(vty, " authorized-regexp %s%s", 
gsmnet->authorized_reg_str, VTY_NEWLINE);
vty_out(vty, " location updating reject cause %u%s",
gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 16d51a1..b3037c6 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -44,14 +44,8 @@
 {
struct gsm_network *net;
 
-   const char *default_regexp = ".*";
-
net = talloc_zero(ctx, struct gsm_network);
if (!net)
-   return NULL;
-
-   if (gsm_parse_reg(net, &net->authorized_regexp, 
&net->authorized_reg_str, 1,
- &default_regexp) != 0)
return NULL;
 
ne

osmo-bsc[master]: auth: remove obsolete VTY commands

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams

2017-11-29 Thread Harald Welte

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/4980/5/src/libmsc/msc_mgcp.c
File src/libmsc/msc_mgcp.c:

Line 731:.in_event_mask = S(EV_TEARDOWN) | 
S(EV_DLCX_ALL_RESP),
the halt state when entered immediately terminates.  Yet we are accepting 
inbound events like DLCX_ALL_RESP only in that state.  How can that be?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538
Gerrit-PatchSet: 5
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[MERGED] osmo-gsm-manuals[master]: OsmoGsmTester: Put several permission categories under cat U...

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGsmTester: Put several permission categories under cat User 
Permission
..


OsmoGsmTester: Put several permission categories under cat User Permission

Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39
---
M OsmoGSMTester/chapters/install.adoc
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/install.adoc 
b/OsmoGSMTester/chapters/install.adoc
index 146dae1..d19f909 100644
--- a/OsmoGSMTester/chapters/install.adoc
+++ b/OsmoGSMTester/chapters/install.adoc
@@ -444,7 +444,7 @@
 your terminal is in turn is picked up in the tcpdump trace, and so forth. When
 testing 'tcpdump' access, make sure to have proper filter expressions in place.
 
- Allow Core Files
+= Allow Core Files
 
 In case a binary run for the test crashes, a core file of the crash should be
 written. This requires a limit rule. Create a file with the required rule:
@@ -464,7 +464,7 @@
 sysctl -w kernel.core_pattern=core
 
 
- Allow Realtime Priority
+= Allow Realtime Priority
 
 Certain binaries should be run with real-time priority, like 'osmo-bts-trx'.
 Add this permission on the main unit:
@@ -477,7 +477,7 @@
 Re-login the user to make these changes take effect.
 
 [[user_config_uhd]]
- UHD
+= UHD
 
 Grant permission to use the UHD driver to run USRP devices for osmo-bts-trx, by
 adding the jenkins user to the 'usrp' group:
@@ -486,7 +486,7 @@
 gpasswd -a jenkins usrp
 
 
- Allow CAP_NET_RAW capability
+= Allow CAP_NET_RAW capability
 
 Certain binaries require 'CAP_NET_RAW' to be set, like 'osmo-bts-octphy' as it
 uses a 'AF_PACKET' socket.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39
Gerrit-PatchSet: 4
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add suites_dir section

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGSMTester: Add suites_dir section
..


OsmoGSMTester: Add suites_dir section

Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424
---
M OsmoGSMTester/chapters/config.adoc
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/config.adoc 
b/OsmoGSMTester/chapters/config.adoc
index a56c4ad..def9843 100644
--- a/OsmoGSMTester/chapters/config.adoc
+++ b/OsmoGSMTester/chapters/config.adoc
@@ -58,6 +58,16 @@
 that the 'state_dir' is used to reserve resources, which only works when all
 configurations that share resources also use the same 'state_dir'.
 
+[[suites_dir]]
+ 'suites_dir'
+
+Suites contain a set of tests which are designed to be run together to test a
+set of features given a specific set of resources. As a result, resources are
+allocated per suite and not per test.
+
+Tests for a given suite are located in the form of '.py' python scripts in the
+same directory where the 'suite.conf' lays.
+
 [[scenarios_dir]]
  'scenarios_dir'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424
Gerrit-PatchSet: 4
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-bsc[master]: cosmetic: bsc_vty: Fix trailing whitespace

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGSMTester: Add state_dir section
..


OsmoGSMTester: Add state_dir section

Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d
---
M OsmoGSMTester/chapters/config.adoc
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/config.adoc 
b/OsmoGSMTester/chapters/config.adoc
index def9843..7e250e0 100644
--- a/OsmoGSMTester/chapters/config.adoc
+++ b/OsmoGSMTester/chapters/config.adoc
@@ -54,10 +54,32 @@
 scenarios_dir: './scenarios'
 
 
+[[state_dir]]
+ 'state_dir'
+
+It contains global or system-wide state for osmo-gsm-tester. In a typical state
+dir you can find the following files:
+
+'last_used_msisdn.state'::
+   Contains last used msisdn number, which is automatically increased every
+   time osmo-gsm-tester needs to assign a new subscriber in a test.
+'lock'::
+   Lock file used to implement a mutual exclusion zone around the
+   'reserved_resources.state' file.
+'reserved_resources.state'::
+   File containing a set of reserved resources by any number of
+   osmo-gsm-tester instances. Each osmo-gsm-tester instance is responsible
+   to clear its resources from the list once it is done using them and are
+   no longer reserved.
+
 If you would like to set up several separate configurations (not typical), note
 that the 'state_dir' is used to reserve resources, which only works when all
 configurations that share resources also use the same 'state_dir'.
 
+This way, several concurrent users of osmo-gsm-tester (ie. several
+osmo-gsm-tester processes running in parallel) can run without interfering with
+each other (e.g. using same ARFCN, same IP or same ofono modem path).
+
 [[suites_dir]]
  'suites_dir'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d
Gerrit-PatchSet: 4
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-bsc[master]: cosmetic: bsc_vty: Fix trailing whitespace

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: bsc_vty: Fix trailing whitespace
..


cosmetic: bsc_vty: Fix trailing whitespace

Change-Id: I7089062285c40ec11af479c98b43d1d407397c82
---
M src/libbsc/bsc_vty.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index cd18e3a..3f75ac0 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -605,7 +605,7 @@
else
vty_out(vty, "  radio-link-timeout %d%s",
gsm_bts_get_radio_link_timeout(bts), VTY_NEWLINE);
-   
+
vty_out(vty, "  channel allocator %s%s",
bts->chan_alloc_reverse ? "descending" : "ascending",
VTY_NEWLINE);
@@ -1440,7 +1440,7 @@
}
bts = gsm_bts_num(net, bts_nr);
bts_paging_dump_vty(vty, bts);
-   
+
return CMD_SUCCESS;
}
for (bts_nr = 0; bts_nr < net->num_bts; bts_nr++) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7089062285c40ec11af479c98b43d1d407397c82
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: cosmetic: bsc_vty: Document bvci reserved values

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-sgsn[master]: Replace '.' in counter names with ':'

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Replace '.' in counter names with ':'
..


Replace '.' in counter names with ':'

'.' is an illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.

Change-Id: Ie7734cc42151581897d220b445984448ceb57aed
---
M src/gprs/gprs_sgsn.c
1 file changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 5eff404..768d953 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -65,21 +65,21 @@
 LLIST_HEAD(sgsn_pdp_ctxts);
 
 static const struct rate_ctr_desc mmctx_ctr_description[] = {
-   { "sign.packets.in","Signalling Messages ( In)" },
-   { "sign.packets.out",   "Signalling Messages (Out)" },
-   { "udata.packets.in",   "User Data  Messages ( In)" },
-   { "udata.packets.out",  "User Data  Messages (Out)" },
-   { "udata.bytes.in", "User Data  Bytes( In)" },
-   { "udata.bytes.out","User Data  Bytes(Out)" },
+   { "sign:packets:in","Signalling Messages ( In)" },
+   { "sign:packets:out",   "Signalling Messages (Out)" },
+   { "udata:packets:in",   "User Data  Messages ( In)" },
+   { "udata:packets:out",  "User Data  Messages (Out)" },
+   { "udata:bytes:in", "User Data  Bytes( In)" },
+   { "udata:bytes:out","User Data  Bytes(Out)" },
{ "pdp_ctx_act","PDP Context Activations  " },
{ "suspend","SUSPEND Count" },
-   { "paging.ps",  "Paging Packet Switched   " },
-   { "paging.cs",  "Paging Circuit Switched  " },
+   { "paging:ps",  "Paging Packet Switched   " },
+   { "paging:cs",  "Paging Circuit Switched  " },
{ "ra_update",  "Routing Area Update  " },
 };
 
 static const struct rate_ctr_group_desc mmctx_ctrg_desc = {
-   .group_name_prefix = "sgsn.mmctx",
+   .group_name_prefix = "sgsn:mmctx",
.group_description = "SGSN MM Context Statistics",
.num_ctr = ARRAY_SIZE(mmctx_ctr_description),
.ctr_desc = mmctx_ctr_description,
@@ -87,14 +87,14 @@
 };
 
 static const struct rate_ctr_desc pdpctx_ctr_description[] = {
-   { "udata.packets.in",   "User Data  Messages ( In)" },
-   { "udata.packets.out",  "User Data  Messages (Out)" },
-   { "udata.bytes.in", "User Data  Bytes( In)" },
-   { "udata.bytes.out","User Data  Bytes(Out)" },
+   { "udata:packets:in",   "User Data  Messages ( In)" },
+   { "udata:packets:out",  "User Data  Messages (Out)" },
+   { "udata:bytes:in", "User Data  Bytes( In)" },
+   { "udata:bytes:out","User Data  Bytes(Out)" },
 };
 
 static const struct rate_ctr_group_desc pdpctx_ctrg_desc = {
-   .group_name_prefix = "sgsn.pdpctx",
+   .group_name_prefix = "sgsn:pdpctx",
.group_description = "SGSN PDP Context Statistics",
.num_ctr = ARRAY_SIZE(pdpctx_ctr_description),
.ctr_desc = pdpctx_ctr_description,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7734cc42151581897d220b445984448ceb57aed
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGSMTester: Add scenarios_dir section
..


OsmoGSMTester: Add scenarios_dir section

It explains how scenario combination works

Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
---
M OsmoGSMTester/chapters/config.adoc
1 file changed, 55 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/config.adoc 
b/OsmoGSMTester/chapters/config.adoc
index 3f8cb44..a56c4ad 100644
--- a/OsmoGSMTester/chapters/config.adoc
+++ b/OsmoGSMTester/chapters/config.adoc
@@ -58,6 +58,61 @@
 that the 'state_dir' is used to reserve resources, which only works when all
 configurations that share resources also use the same 'state_dir'.
 
+[[scenarios_dir]]
+ 'scenarios_dir'
+
+This dir contains scenario configuration files.
+
+Scenarios define constraints to serve the resource requests of a 'suite.conf',
+to select specific resources from the general resource pool specified in 
'resources.conf'.
+
+All 'times' attributes are expanded before matching. For example, if a 
'suite.conf'
+requests two BTS, we may enforce that both BTS should be of type 
'osmo-bts-sysmo' in
+these ways:
+
+
+resources:
+  bts:
+  - type: osmo-bts-sysmo
+  - type: osmo-bts-sysmo
+
+
+or alternatively,
+
+
+resources:
+  bts:
+  - times: 2
+type: osmo-bts-sysmo
+
+
+If only one resource is specified in the scenario, then the resource allocator
+assumes the restriction is to be applied to the first resource and that 
remaining
+resources have no restrictions to be taken into consideration.
+
+To apply restrictions only on the second resource, the first element can be 
left
+emtpy, like:
+
+
+resources:
+  bts:
+  - {}
+  - type: osmo-bts-sysmo
+
+
+On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any 
number of
+such scenario configurations can be combined in the form:
+
+
+:[+[+...]]
+
+
+e.g.
+
+
+my_suite:sysmo+tch_f+amr
+
+
 [[resources_conf]]
 === 'resources.conf'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 6
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update import test->testenv

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGSMTester: Update import test->testenv
..


OsmoGSMTester: Update import test->testenv

Latest changes in osmo-gsm-tester require this import change.

Depends on: osmo-gsm-tester I520bd046cb09042b5567d967f951f050e4e02e85

Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a
---
M OsmoGSMTester/chapters/intro.adoc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/intro.adoc 
b/OsmoGSMTester/chapters/intro.adoc
index 55f1a5e..14daba4 100644
--- a/OsmoGSMTester/chapters/intro.adoc
+++ b/OsmoGSMTester/chapters/intro.adoc
@@ -161,7 +161,7 @@
 
 
 #!/usr/bin/env python3
-from osmo_gsm_tester.test import *
+from osmo_gsm_tester.testenv import *
 
 hlr = suite.hlr()
 bts = suite.bts()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-bsc[master]: cosmetic: bsc_vty: Document bvci reserved values

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: bsc_vty: Document bvci reserved values
..


cosmetic: bsc_vty: Document bvci reserved values

Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a
---
M src/libbsc/bsc_vty.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 3f75ac0..c5dedb3 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -2377,6 +2377,7 @@
"GPRS BSSGP VC Identifier\n"
"GPRS BSSGP VC Identifier")
 {
+   /* ETSI TS 101 343: values 0 and 1 are reserved for signalling and PTM 
*/
struct gsm_bts *bts = vty->index;
 
if (bts->gprs.mode == BTS_GPRS_NONE) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-sgsn[master]: tests: Fix selection of python version

2017-11-29 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: tests: Fix selection of python version
..


tests: Fix selection of python version

According to documentation (and personal experience), AM_PATH_PYTHON
selects the highest version of python, no matter if major version is
different, which means if both python2 and 3 are available, 3 will be
chosen an PYTHON will point to "/.../python" which is python3. Apparently,
the macro cannot be easily used to pick highest python2 version.

As {vty,ctrl}_test_runner.py require python2 and are incompatible with
python3, let's instead rely on the system having a "python2" binary
available, which is the case in most distros.

Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f
---
M configure.ac
M tests/Makefile.am
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
4 files changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/configure.ac b/configure.ac
index 9a6f963..a1dbce5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,10 @@
[Include the VTY/CTRL tests in make check 
[default=no]]),
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
 if test "x$enable_ext_tests" = "xyes" ; then
-   AM_PATH_PYTHON
+   AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes)
+if test "x$PYTHON2_AVAIL" != "xyes" ; then
+   AC_MSG_ERROR([Please install python2 to run the VTY/CTRL 
tests.])
+   fi
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
 if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
AC_MSG_ERROR([Please install 
git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 10bb916..3cd8bff 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -56,8 +56,8 @@
 python-tests: $(BUILT_SOURCES)
osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
-   $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v
-   $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v
+   $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v
+   $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v
rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart 
$(top_builddir)/gtphub_restart_count
 else
 python-tests: $(BUILT_SOURCES)
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
old mode 100644
new mode 100755
index 7c64f48..e9d73ff
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # (C) 2013 by Jacob Erlbeck 
 # (C) 2014 by Holger Hans Peter Freyther
diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py
old mode 100644
new mode 100755
index 9b8c560..eeb151c
--- a/tests/vty_test_runner.py
+++ b/tests/vty_test_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # (C) 2013 by Katerina Barone-Adesi 
 # (C) 2013 by Holger Hans Peter Freyther

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy

2017-11-29 Thread Harald Welte

Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8
Gerrit-PatchSet: 5
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-mgw[master]: MGCP: Connection Identifiers are hex strings

2017-11-29 Thread Harald Welte

Patch Set 7: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/4906/7/src/libosmo-mgcp/mgcp_conn.c
File src/libosmo-mgcp/mgcp_conn.c:

Line 86:OSMO_ASSERT(id);
we still have those OSMO_ASSERT in here, despite Neels already mentioning twice 
that they need to go.  Please fix  known review comments before re-submitting a 
patch, as this just multiplies the amount of time needed for code review.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436
Gerrit-PatchSet: 7
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: Yes


python/osmo-python-tests[master]: Add rate counter dumper

2017-11-29 Thread Harald Welte

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2
Gerrit-PatchSet: 4
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-bsc[master]: compiler warnings: drop some unused variables

2017-11-29 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: compiler warnings: constify in abis_nm.c

2017-11-29 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_*

2017-11-29 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar...

2017-11-29 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c...

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: examples: add osmo-bsc-minimal.cfg

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: HO prep: pass gsm_network to gsm_bts_alloc() already

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on...

2017-11-29 Thread Harald Welte

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5050/2/src/libbsc/handover_vty.c
File src/libbsc/handover_vty.c:

Line 2: #include 
no copyright header / disclaimer in new C file


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_*

2017-11-29 Thread Max

Patch Set 2:

Doh! Missed this one and merged the same thing recently. Sorry about it.

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

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


osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar...

2017-11-29 Thread Max

Patch Set 2: Code-Review+1

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

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


osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n...

2017-11-29 Thread Harald Welte

Patch Set 7: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/4905/7/src/libosmo-mgcp/mgcp_conn.c
File src/libosmo-mgcp/mgcp_conn.c:

Line 63:LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a 
unique connectionIdentifier\n",
I think it's 0x prefixed in other patches now?


https://gerrit.osmocom.org/#/c/4905/7/tests/mgcp/mgcp_test.c
File tests/mgcp/mgcp_test.c:

Line 579:   OSMO_ASSERT(strlen(conn_id) <= 32);
so we receive a response from another network element, which is UDP based and 
can be spoofed by anyone, and we crash our MGW based on this?  "ASSERT" should 
be used in cases where something has gone wrong so badly that assumptions of 
the developer have not been fulfilled.  Under no circumstances we should ASSERT 
on any message received from a remote entity on the network.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c
Gerrit-PatchSet: 7
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: Yes


[PATCH] osmo-bsc[master]: cosmetic: tighten function type signatures

2017-11-29 Thread Max

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

cosmetic: tighten function type signatures

* change return type to bool
* constify parameters

The nm_is_running(), trx_is_usable() and ts_is_usable() always return
boolean value and are always used as such anyway. The also do not change
their parameters.

Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
---
M include/osmocom/bsc/abis_nm.h
M include/osmocom/bsc/chan_alloc.h
M src/libbsc/abis_nm.c
M src/libbsc/chan_alloc.c
4 files changed, 11 insertions(+), 11 deletions(-)


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

diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h
index b0cb166..18f87cd 100644
--- a/include/osmocom/bsc/abis_nm.h
+++ b/include/osmocom/bsc/abis_nm.h
@@ -163,7 +163,7 @@
 
 /* Functions calling into other code parts */
 bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts);
-int nm_is_running(struct gsm_nm_state *s);
+bool nm_is_running(const struct gsm_nm_state *s);
 
 int abis_nm_vty_init(void);
 
diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h
index 7388e14..320fa94 100644
--- a/include/osmocom/bsc/chan_alloc.h
+++ b/include/osmocom/bsc/chan_alloc.h
@@ -49,6 +49,6 @@
 void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts);
 void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
 
-int trx_is_usable(struct gsm_bts_trx *trx);
+bool trx_is_usable(const struct gsm_bts_trx *trx);
 
 #endif /* _CHAN_ALLOC_H */
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index 295cefd..f1a56a6 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -159,7 +159,7 @@
 
 static int abis_nm_rcvmsg_sw(struct msgb *mb);
 
-int nm_is_running(struct gsm_nm_state *s) {
+bool nm_is_running(const struct gsm_nm_state *s) {
return (s->operational == NM_OPSTATE_ENABLED) && (
(s->availability == NM_AVSTATE_OK) ||
(s->availability == 0xff)
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index f0275bc..4b2531e 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -36,41 +36,41 @@
 
 #include 
 
-static int ts_is_usable(struct gsm_bts_trx_ts *ts)
+static bool ts_is_usable(const struct gsm_bts_trx_ts *ts)
 {
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(ts->trx->bts)) {
if (!nm_is_running(&ts->mo.nm_state))
-   return 0;
+   return false;
}
 
/* If a TCH/F_PDCH TS is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
if (ts->flags & TS_F_PDCH_PENDING_MASK)
-   return 0;
+   return false;
}
 
/* If a dynamic channel is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
if (ts->dyn.pchan_is != ts->dyn.pchan_want)
-   return 0;
+   return false;
}
 
-   return 1;
+   return true;
 }
 
-int trx_is_usable(struct gsm_bts_trx *trx)
+bool trx_is_usable(const struct gsm_bts_trx *trx)
 {
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(trx->bts)) {
if (!nm_is_running(&trx->mo.nm_state) ||
!nm_is_running(&trx->bb_transc.mo.nm_state))
-   return 0;
+   return false;
}
 
-   return 1;
+   return true;
 }
 
 static struct gsm_lchan *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-bsc[master]: OML: check TRX usability when reporting

2017-11-29 Thread Max

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

OML: check TRX usability when reporting

Use already available function to check that TRX is actually usable when
reporting OML status via CTRL.

Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a
Related: OS#2486
---
M src/libbsc/abis_nm.c
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index f1a56a6..c9f03e1 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define OM_ALLOC_SIZE  1024
 #define OM_HEADROOM_SIZE   128
@@ -693,6 +694,10 @@
llist_for_each_entry(trx, &bts->trx_list, list) {
if (!trx->rsl_link)
return false;
+
+   if (!trx_is_usable(trx))
+   return false;
+
if (trx->mo.nm_state.administrative == NM_STATE_LOCKED)
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-bsc[master]: Fix tests linking

2017-11-29 Thread Max

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

Fix tests linking

Code in libbsc is using gsm48_create_mm_serv_rej() which is defined in
libcommon-cs but neither libbsc itself nor tests using it are actually
linked against libcommon-cs. Fix this by using proper include and
linking where necessary. Also change build order to make sure
libcommon-cs is built before libbsc.

Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084
---
M src/Makefile.am
M src/libbsc/Makefile.am
M src/libbsc/gsm_04_08_utils.c
M tests/abis/Makefile.am
M tests/nanobts_omlattr/Makefile.am
5 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/src/Makefile.am b/src/Makefile.am
index dd1ad3d..454bf26 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,10 +22,10 @@
 # Libraries
 SUBDIRS = \
libcommon \
+   libcommon-cs \
libbsc \
libtrau \
libfilter \
-   libcommon-cs \
$(NULL)
 
 # Programs
diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am
index e78bde6..fc12d05 100644
--- a/src/libbsc/Makefile.am
+++ b/src/libbsc/Makefile.am
@@ -17,6 +17,8 @@
libbsc.a \
$(NULL)
 
+libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a
+
 libbsc_a_SOURCES = \
abis_nm.c \
abis_nm_vty.c \
diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c
index 7fc696f..451133d 100644
--- a/src/libbsc/gsm_04_08_utils.c
+++ b/src/libbsc/gsm_04_08_utils.c
@@ -29,7 +29,7 @@
 
 #include 
 #include 
-
+#include 
 #include 
 #include 
 #include 
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index 1c5dede..8dc6248 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -27,6 +27,7 @@
 abis_test_LDADD = \
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon/libcommon.a \
+   $(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/nanobts_omlattr/Makefile.am 
b/tests/nanobts_omlattr/Makefile.am
index 8b5e116..4b49518 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -26,6 +26,7 @@
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(top_builddir)/src/libcommon/libcommon.a \
+   $(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c...

2017-11-29 Thread Max

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5047/1/include/osmocom/bsc/handover.h
File include/osmocom/bsc/handover.h:

Line 3: struct gsm_lchan;
Why is this better than including gsm_data_shared.h?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: Yes


[PATCH] osmo-sgsn[master]: sgsn_cdr: Split log formatting into a snprintf function

2017-11-29 Thread Pau Espin Pedrol

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

sgsn_cdr: Split log formatting into a snprintf function

This function is going to be re-used to send TRAP messages over CTRL
interface.

Related: OS#2360

Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d
---
M src/gprs/sgsn_cdr.c
1 file changed, 52 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/86/5086/1

diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index 474d41a..bc051ac 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -68,12 +68,34 @@
fprintf(cdr_file, 
"timestamp,imsi,imei,msisdn,cell_id,lac,hlr,event,pdp_duration,ggsn_addr,sgsn_addr,apni,eua_addr,vol_in,vol_out,charging_id\n");
 }
 
+static int cdr_snprintf_mm(char *buf, size_t size, const char *ev,
+   struct sgsn_mm_ctx *mmctx)
+{
+   struct tm tm;
+   struct timeval tv;
+   int ret;
+
+   gettimeofday(&tv, NULL);
+   gmtime_r(&tv.tv_sec, &tm);
+   ret = snprintf(buf, size, 
"%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s",
+   tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
+   tm.tm_hour, tm.tm_min, tm.tm_sec,
+   (int)(tv.tv_usec / 1000),
+   mmctx->imsi,
+   mmctx->imei,
+   mmctx->msisdn,
+   mmctx->gb.cell_id,
+   mmctx->ra.lac,
+   mmctx->hlr,
+   ev);
+   return ret;
+}
+
 static void cdr_log_mm(struct sgsn_instance *inst, const char *ev,
struct sgsn_mm_ctx *mmctx)
 {
FILE *cdr_file;
-   struct tm tm;
-   struct timeval tv;
+   char buf[1024];
 
if (!inst->cfg.cdr.filename)
return;
@@ -86,19 +108,8 @@
}
 
maybe_print_header(cdr_file);
-   gettimeofday(&tv, NULL);
-   gmtime_r(&tv.tv_sec, &tm);
-   fprintf(cdr_file, "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s\n",
-   tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
-   tm.tm_hour, tm.tm_min, tm.tm_sec,
-   (int)(tv.tv_usec / 1000),
-   mmctx->imsi,
-   mmctx->imei,
-   mmctx->msisdn,
-   mmctx->gb.cell_id,
-   mmctx->ra.lac,
-   mmctx->hlr,
-   ev);
+   cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx);
+   fprintf(cdr_file, "%s\n", buf);
 
fclose(cdr_file);
 }
@@ -124,10 +135,9 @@
}
 }
 
-static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev,
+static int cdr_snprintf_pdp(char *buf, size_t size, const char *ev,
struct sgsn_pdp_ctx *pdp)
 {
-   FILE *cdr_file;
char apni[(pdp->lib ? pdp->lib->apn_use.l : 0) + 1];
char ggsn_addr[INET_ADDRSTRLEN + 1];
char sgsn_addr[INET_ADDRSTRLEN + 1];
@@ -136,9 +146,7 @@
struct timeval tv;
time_t duration;
struct timespec tp;
-
-   if (!inst->cfg.cdr.filename)
-   return;
+   int ret;
 
memset(apni, 0, sizeof(apni));
memset(ggsn_addr, 0, sizeof(ggsn_addr));
@@ -154,15 +162,6 @@
if (pdp->ggsn)
inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, 
sizeof(sgsn_addr));
 
-   cdr_file = fopen(inst->cfg.cdr.filename, "a");
-   if (!cdr_file) {
-   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
-   inst->cfg.cdr.filename);
-   return;
-   }
-
-   maybe_print_header(cdr_file);
-
clock_gettime(CLOCK_MONOTONIC, &tp);
gettimeofday(&tv, NULL);
 
@@ -172,8 +171,8 @@
/* Check the duration of the PDP context */
duration = tp.tv_sec - pdp->cdr_start.tv_sec;
 
-   fprintf(cdr_file,
-   
"%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 
",%" PRIu64 ",%u\n",
+   ret = snprintf(buf, size,
+   
"%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 
",%" PRIu64 ",%u",
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec,
(int)(tv.tv_usec / 1000),
@@ -192,6 +191,28 @@
pdp->cdr_bytes_in,
pdp->cdr_bytes_out,
pdp->cdr_charging_id);
+   return ret;
+}
+
+static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev,
+   struct sgsn_pdp_ctx *pdp)
+{
+   FILE *cdr_file;
+   char buf[1024];
+
+   if (!inst->cfg.cdr.filename)
+   return;
+
+   cdr_file = fopen(inst->cfg.cdr.filename, "a");
+   if (!cdr_file) {
+   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
+   inst->cfg.cdr.filename);
+   return;
+   }
+
+   maybe_print_header(cdr_file);
+   cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp);
+   fprintf(cdr_file, "%s\n", buf);
fclose(cdr_file);
 }
 

-- 
To view, visit https://gerrit.osmocom.o

[PATCH] osmo-sgsn[master]: Add vty cmd 'cdr trap' to send CDR through CTRL iface

2017-11-29 Thread Pau Espin Pedrol

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

Add vty cmd 'cdr trap' to send CDR through CTRL iface

Default behavior is to have them disabled, and can be explicitly
disabled too by using 'no cdr trap' cmd.

Tested with osmo_ctrl.py that messages are send successfully:
TRAP 0 cdr-v1 
20171129125950222,90170015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1

Related: OS#2360

Change-Id: I1d144d87effd934d991257a65e19cf046a938907
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/sgsn_cdr.c
M src/gprs/sgsn_main.c
M src/gprs/sgsn_vty.c
4 files changed, 70 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/5087/1

diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index 464a64f..7e0b5d4 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -52,6 +52,7 @@
 
 struct sgsn_cdr {
char *filename;
+   bool trap;
int interval;
 };
 
diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index bc051ac..55aa664 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -18,6 +18,8 @@
  *
  */
 
+#include 
+
 #include 
 #include 
 #include 
@@ -38,6 +40,7 @@
 
 /* TODO...avoid going through a global */
 extern struct sgsn_instance *sgsn;
+extern struct ctrl_handle *g_ctrlh;
 
 /**
  * The CDR module will generate an entry like:
@@ -59,6 +62,11 @@
  * CAUSE_FOR_TERM, # CAUSE_FOR_TERM
  */
 
+static void send_cdr_trap(char *value)
+{
+   if (ctrl_cmd_send_trap(g_ctrlh, "cdr-v1", value) < 0)
+   LOGP(DGPRS, LOGL_ERROR, "Failed to create and send TRAP 
cdr-v1\n");
+}
 
 static void maybe_print_header(FILE *cdr_file)
 {
@@ -97,21 +105,27 @@
FILE *cdr_file;
char buf[1024];
 
-   if (!inst->cfg.cdr.filename)
+   if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap)
return;
 
-   cdr_file = fopen(inst->cfg.cdr.filename, "a");
-   if (!cdr_file) {
-   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
-   inst->cfg.cdr.filename);
-   return;
-   }
-
-   maybe_print_header(cdr_file);
cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx);
-   fprintf(cdr_file, "%s\n", buf);
 
-   fclose(cdr_file);
+   if (inst->cfg.cdr.trap)
+   send_cdr_trap(buf);
+
+   if (inst->cfg.cdr.filename) {
+   cdr_file = fopen(inst->cfg.cdr.filename, "a");
+   if (!cdr_file) {
+   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
+   inst->cfg.cdr.filename);
+   return;
+   }
+
+   maybe_print_header(cdr_file);
+   fprintf(cdr_file, "%s\n", buf);
+
+   fclose(cdr_file);
+   }
 }
 
 static void extract_eua(struct ul66_t *eua, char *eua_addr)
@@ -200,20 +214,26 @@
FILE *cdr_file;
char buf[1024];
 
-   if (!inst->cfg.cdr.filename)
+   if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap)
return;
 
-   cdr_file = fopen(inst->cfg.cdr.filename, "a");
-   if (!cdr_file) {
-   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
-   inst->cfg.cdr.filename);
-   return;
-   }
-
-   maybe_print_header(cdr_file);
cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp);
-   fprintf(cdr_file, "%s\n", buf);
-   fclose(cdr_file);
+
+   if (inst->cfg.cdr.trap)
+   send_cdr_trap(buf);
+
+   if (inst->cfg.cdr.filename) {
+   cdr_file = fopen(inst->cfg.cdr.filename, "a");
+   if (!cdr_file) {
+   LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n",
+   inst->cfg.cdr.filename);
+   return;
+   }
+
+   maybe_print_header(cdr_file);
+   fprintf(cdr_file, "%s\n", buf);
+   fclose(cdr_file);
+   }
 }
 
 static void cdr_pdp_timeout(void *_data)
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index fe4192b..b2a028c 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -76,6 +76,7 @@
 #include 
 
 void *tall_bsc_ctx;
+struct ctrl_handle *g_ctrlh;
 
 struct gprs_ns_inst *sgsn_nsi;
 static int daemonize = 0;
@@ -367,7 +368,6 @@
 
 int main(int argc, char **argv)
 {
-   struct ctrl_handle *ctrl;
int rc;
 #if BUILD_IU
struct osmo_sccp_instance *sccp;
@@ -454,9 +454,9 @@
 
/* start control interface after reading config for
 * ctrl_vty_get_bind_addr() */
-   ctrl = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(),
+   g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(),
OSMO_CTRL_PORT_SGSN);
-   if (!ctrl) {
+   if (!g_ctrlh) {
LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n");
exit(1);
}
diff --git a/src/gprs/sgsn_vty.c b/src/gpr

[PATCH] osmo-bsc[master]: cosmetic: drop unused include

2017-11-29 Thread Max

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

cosmetic: drop unused include

Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8
---
M include/osmocom/bsc/Makefile.am
D include/osmocom/bsc/sgsn.h
2 files changed, 0 insertions(+), 192 deletions(-)


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

diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 1f7cd39..9d2ee6e 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -53,7 +53,6 @@
rrlp.h \
rs232.h \
rtp_proxy.h \
-   sgsn.h \
signal.h \
silent_call.h \
sms_queue.h \
diff --git a/include/osmocom/bsc/sgsn.h b/include/osmocom/bsc/sgsn.h
deleted file mode 100644
index f71b649..000
--- a/include/osmocom/bsc/sgsn.h
+++ /dev/null
@@ -1,191 +0,0 @@
-#ifndef _SGSN_H
-#define _SGSN_H
-
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-struct gprs_gsup_client;
-struct hostent;
-
-enum sgsn_auth_policy {
-   SGSN_AUTH_POLICY_OPEN,
-   SGSN_AUTH_POLICY_CLOSED,
-   SGSN_AUTH_POLICY_ACL_ONLY,
-   SGSN_AUTH_POLICY_REMOTE
-};
-
-
-enum sgsn_rate_ctr_keys {
-   CTR_LLC_DL_BYTES,
-   CTR_LLC_UL_BYTES,
-   CTR_LLC_DL_PACKETS,
-   CTR_LLC_UL_PACKETS,
-   CTR_GPRS_ATTACH_REQUEST,
-   CTR_GPRS_ATTACH_ACKED,
-   CTR_GPRS_ATTACH_REJECTED,
-   CTR_GPRS_DETACH_REQUEST,
-   CTR_GPRS_DETACH_ACKED,
-   CTR_GPRS_ROUTING_AREA_REQUEST,
-   CTR_GPRS_ROUTING_AREA_ACKED,
-   CTR_GPRS_ROUTING_AREA_REJECT,
-   /* PDP single packet counter / GSM 04.08 9.5.1 - 9.5.9 */
-   CTR_PDP_ACTIVATE_REQUEST,
-   CTR_PDP_ACTIVATE_REJECT,
-   CTR_PDP_ACTIVATE_ACCEPT,
-   CTR_PDP_REQUEST_ACTIVATE, /* unused */
-   CTR_PDP_REQUEST_ACTIVATE_REJ, /* unused */
-   CTR_PDP_MODIFY_REQUEST, /* unsued */
-   CTR_PDP_MODIFY_ACCEPT, /* unused */
-   CTR_PDP_DL_DEACTIVATE_REQUEST,
-   CTR_PDP_DL_DEACTIVATE_ACCEPT,
-   CTR_PDP_UL_DEACTIVATE_REQUEST,
-   CTR_PDP_UL_DEACTIVATE_ACCEPT,
-};
-
-struct sgsn_cdr {
-   char *filename;
-   int interval;
-};
-
-struct sgsn_config {
-   /* parsed from config file */
-
-   char *gtp_statedir;
-   struct sockaddr_in gtp_listenaddr;
-
-   /* misc */
-   struct gprs_ns_inst *nsi;
-
-   enum sgsn_auth_policy auth_policy;
-   enum gprs_ciph_algo cipher;
-   struct llist_head imsi_acl;
-
-   struct sockaddr_in gsup_server_addr;
-   int gsup_server_port;
-
-   int require_authentication;
-   int require_update_location;
-
-   /* CDR configuration */
-   struct sgsn_cdr cdr;
-
-   struct {
-   int T3312;
-   int T3322;
-   int T3350;
-   int T3360;
-   int T3370;
-   int T3313;
-   int T3314;
-   int T3316;
-   int T3385;
-   int T3386;
-   int T3395;
-   int T3397;
-   } timers;
-
-   int dynamic_lookup;
-
-   struct oap_client_config oap;
-
-   /* RFC1144 TCP/IP header compression */
-   struct {
-   int active;
-   int passive;
-   int s01;
-   } pcomp_rfc1144;
-
-   /* V.42vis data compression */
-   struct {
-   int active;
-   int passive;
-   int p0;
-   int p1;
-   int p2;
-   } dcomp_v42bis;
-
-   struct {
-   int rab_assign_addr_enc;
-   } iu;
-};
-
-struct sgsn_instance {
-   char *config_file;
-   struct sgsn_config cfg;
-   /* File descriptor wrappers for LibGTP */
-   struct osmo_fd gtp_fd0;
-   struct osmo_fd gtp_fd1c;
-   struct osmo_fd gtp_fd1u;
-   /* Timer for libGTP */
-   struct osmo_timer_list gtp_timer;
-   /* GSN instance for libgtp */
-   struct gsn_t *gsn;
-   /* Subscriber */
-   struct gsup_client *gsup_client;
-   /* LLME inactivity timer */
-   struct osmo_timer_list llme_timer;
-
-   /* c-ares event loop integration */
-   struct osmo_timer_list ares_timer;
-   struct llist_head ares_fds;
-   ares_channel ares_channel;
-   struct ares_addr_node *ares_servers;
-
-   struct rate_ctr_group *rate_ctrs;
-};
-
-extern struct sgsn_instance *sgsn;
-
-/* sgsn_vty.c */
-
-int sgsn_vty_init(struct sgsn_config *cfg);
-int sgsn_parse_config(const char *config_file);
-
-/* sgsn.c */
-
-/* Main input function for Gb proxy */
-int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci);
-
-
-struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
-struct sgsn_mm_ctx *mmctx,
-uint16_t nsapi,
-struct tlv_parsed *tp);
-int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx);
-void sgsn_pdp_upd_gtp_u(struct sgsn_p

[PATCH] osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex

2017-11-29 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5060

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

cosmetic: clearly mark endpoint numbers as hex

The log prints the endpoint numbers as hexadecimal numbers, but
it does not prefix them with "0x".

Add "0x" prefixes to all endpoint number outputs in the log

Change-Id: I284627de02cd140a894445375e9152ff007a71e6
---
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_msg.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_protocol.c
4 files changed, 83 insertions(+), 83 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/60/5060/2

diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index dcfc2ff..ae3f026 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -61,7 +61,7 @@
}
}
 
-   LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique 
connectionIdentifier\n",
+   LOGP(DLMGCP, LOGL_ERROR, "endpoint:0x%x, unable to generate a unique 
connectionIdentifier\n",
 ENDPOINT_NUMBER(endp));
 
return -1;
diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c
index 9803921..17b1026 100644
--- a/src/libosmo-mgcp/mgcp_msg.c
+++ b/src/libosmo-mgcp/mgcp_msg.c
@@ -82,7 +82,7 @@
 
if (!mode) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x missing connection mode\n",
+"endpoint:0x%x missing connection mode\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -101,7 +101,7 @@
conn->mode = MGCP_CONN_LOOPBACK;
else {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x unknown connection mode: '%s'\n",
+"endpoint:0x%x unknown connection mode: '%s'\n",
 ENDPOINT_NUMBER(endp), mode);
ret = -1;
}
@@ -113,16 +113,16 @@
}
 
LOGP(DLMGCP, LOGL_DEBUG,
-"endpoint:%x conn:%s\n",
+"endpoint:0x%x conn:%s\n",
 ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn));
 
LOGP(DLMGCP, LOGL_DEBUG,
-"endpoint:%x connection mode '%s' %d\n",
+"endpoint:0x%x connection mode '%s' %d\n",
 ENDPOINT_NUMBER(endp), mode, conn->mode);
 
/* Special handling für RTP connections */
if (conn->type == MGCP_CONN_TYPE_RTP) {
-   LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x output_enabled %d\n",
+   LOGP(DLMGCP, LOGL_DEBUG, "endpoint:0x%x output_enabled %d\n",
 ENDPOINT_NUMBER(endp), conn->u.rtp.end.output_enabled);
}
 
@@ -318,7 +318,7 @@
 
if (strcmp(endp->callid, callid) != 0) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x CallIDs does not match '%s' != '%s'\n",
+"endpoint:0x%x CallIDs does not match '%s' != '%s'\n",
 ENDPOINT_NUMBER(endp), endp->callid, callid);
return -1;
}
@@ -335,7 +335,7 @@
/* Check for null identifiers */
if (!conn_id) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (missing)\n",
+"endpoint:0x%x invalid ConnectionIdentifier (missing)\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -343,7 +343,7 @@
/* Check for empty connection identifiers */
if (strlen(conn_id) == 0) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (empty)\n",
+"endpoint:0x%x invalid ConnectionIdentifier (empty)\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -351,7 +351,7 @@
/* Check for over long connection identifiers */
if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (too long) 
0x%s\n",
+"endpoint:0x%x invalid ConnectionIdentifier (too long) 
0x%s\n",
 ENDPOINT_NUMBER(endp), conn_id);
return -1;
}
@@ -361,7 +361,7 @@
return 0;
 
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x no connection found under ConnectionIdentifier 
0x%s\n",
+"endpoint:0x%x no connection found under ConnectionIdentifier 
0x%s\n",
 ENDPOINT_NUMBER(endp), conn_id);
 
return -1;
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 816f16b..eb44f9b 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -73,11 +73,11 @@
rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr));
if (rc < 0)
LOGP(DRTP, LOGL_ERROR,
-"endpoint:%x CI:%s local int

[PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n...

2017-11-29 Thread dexter
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4905

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

libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA

The MGCP connection identifier is allocated by the MGW while processing
the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection
identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2.

So the MGW side must *reject* a CRCX message with 'I' parameter, and
allocate a connection identifier which is subsequently returned in the
response.

Closes: OS#2648
Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c
---
M TODO-RELEASE
M configure.ac
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/Makefile.am
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_protocol.c
M tests/mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.ok
9 files changed, 970 insertions(+), 168 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/8

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 917c995..9d0e0dc 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -23,5 +23,7 @@
 # If any interfaces have been added since the last public release, a++;
 # If any interfaces have been removed or changed since the last public 
release, a=0.
 #
-#library   whatdescription / commit summary line
-libosmo-mgcp   API/ABI change  parse and represent connection identifiers as 
hex strings
\ No newline at end of file
+#library   whatdescription / commit summary line
+libosmo-mgcp   API/ABI change  parse and represent connection 
identifiers as hex strings
+libosmo-mgcp   API/ABI change  connection identifiers are assigned by 
the server, not CA
+libosmo-mgcp-clientAPI/ABI change  parse and store connection identifier 
in response
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index f72b9e1..606f404 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@
 
 
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0)
 PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0)
 
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index 982a311..e2a423f 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -28,8 +28,7 @@
 #include 
 
 struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp,
- const char *id, enum mgcp_conn_type type,
- char *name);
+ enum mgcp_conn_type type, char *name);
 struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id);
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
const char *id);
diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index ad972de..ac86f52 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -258,6 +258,58 @@
return 0;
 }
 
+/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */
+static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line)
+{
+   if (strlen(line) < 4)
+   goto response_parse_failure;
+
+   if (memcmp("I: ", line, 3) != 0)
+   goto response_parse_failure;
+
+   osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id));
+   return 0;
+
+response_parse_failure:
+   LOGP(DLMGCP, LOGL_ERROR,
+"Failed to parse MGCP response (connectionIdentifier)\n");
+   return -EINVAL;
+}
+
+/* Parse MGCP parameters of the response */
+static int parse_head_params(struct mgcp_response *r)
+{
+   char *line;
+   int rc = 0;
+   OSMO_ASSERT(r->body);
+   char *data = r->body;
+   char *data_end = strstr(r->body, "\n\n");
+
+   /* Protect SDP body, for_each_non_empty_line() will
+* only parse until it hits \0 mark. */
+   if (data_end)
+   *data_end = '\0';
+
+   for_each_non_empty_line(line, data) {
+   switch (line[0]) {
+   case 'I':
+   rc = mgcp_parse_conn_id(r, line);
+   if (rc)
+   goto exit;
+   break;
+   default:
+   /* skip unhandled parameters */
+   break;
+   }
+   }
+exit:
+   /* Restore original state */
+   if (data_end)
+   *data_end = '\n';
+
+   return rc;
+}
+
 static struct mgcp_response_pending *mgcp_client_response_pending_get(
 struct mgcp_client *mgcp,
 struct mgcp_response *r)
@@ -288,7 +340,13 @@
 
rc = mgcp_response_parse_head

[PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings

2017-11-29 Thread dexter
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4906

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

MGCP: Connection Identifiers are hex strings

The MGCP spec in RFC3435 is quite clear: Connection Identifiers are
hexadecimal strings of up to 32 characters. We should not print and
parse them as integers on either client or server.

Change the internal uint32_t representation of connection identifiers
to a string representation in the client and also in the server.

Closes: OS#2649
Change-Id: I0531a1b670d00cec50078423a2868207135b2436
---
M TODO-RELEASE
M include/osmocom/mgcp/mgcp_common.h
M include/osmocom/mgcp/mgcp_conn.h
M include/osmocom/mgcp/mgcp_internal.h
M include/osmocom/mgcp/mgcp_msg.h
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_msg.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
M src/libosmo-mgcp/mgcp_sdp.c
M src/libosmo-mgcp/mgcp_vty.c
M tests/mgcp/mgcp_test.c
M tests/mgcp_client/mgcp_client_test.c
16 files changed, 106 insertions(+), 102 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/8

diff --git a/TODO-RELEASE b/TODO-RELEASE
index d198b97..917c995 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -24,3 +24,4 @@
 # If any interfaces have been removed or changed since the last public 
release, a=0.
 #
 #library   whatdescription / commit summary line
+libosmo-mgcp   API/ABI change  parse and represent connection identifiers as 
hex strings
\ No newline at end of file
diff --git a/include/osmocom/mgcp/mgcp_common.h 
b/include/osmocom/mgcp/mgcp_common.h
index 0eb1388..29dc458 100644
--- a/include/osmocom/mgcp/mgcp_common.h
+++ b/include/osmocom/mgcp/mgcp_common.h
@@ -68,4 +68,8 @@
return 0;
 }
 
+/* String length of Connection Identifiers
+ * (see also RFC3435 2.1.3.2 Names of Connections) */
+#define MGCP_CONN_ID_LENGTH 32+1
+
 #endif
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index e0ae021..982a311 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -28,12 +28,12 @@
 #include 
 
 struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp,
- uint32_t id, enum mgcp_conn_type type,
+ const char *id, enum mgcp_conn_type type,
  char *name);
-struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id);
+struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id);
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
-   uint32_t id);
-void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id);
+   const char *id);
+void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id);
 void mgcp_conn_free_oldest(struct mgcp_endpoint *endp);
 void mgcp_conn_free_all(struct mgcp_endpoint *endp);
 char *mgcp_conn_dump(struct mgcp_conn *conn);
diff --git a/include/osmocom/mgcp/mgcp_internal.h 
b/include/osmocom/mgcp/mgcp_internal.h
index b9c1731..c3f9ba1 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -30,8 +30,10 @@
 
 #define CI_UNUSED 0
 
-#define CONN_ID_BTS 0
-#define CONN_ID_NET 1
+/* FIXME: This this is only needed to compile the currently
+ * broken OSMUX support. Remove when fixed */
+#define CONN_ID_BTS "0"
+#define CONN_ID_NET "1"
 
 enum mgcp_trunk_type {
MGCP_TRUNK_VIRTUAL,
@@ -203,7 +205,7 @@
enum mgcp_connection_mode mode_orig;
 
/*!< connection id to identify the conntion */
-   uint32_t id;
+   char id[MGCP_CONN_ID_LENGTH];
 
/*!< human readable name (vty, logging) */
char name[256];
diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h
index b7d52bb..7732865 100644
--- a/include/osmocom/mgcp/mgcp_msg.h
+++ b/include/osmocom/mgcp/mgcp_msg.h
@@ -43,7 +43,7 @@
 
 int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid);
 
-int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci);
+int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id);
 
 char *mgcp_strline(char *str, char **saveptr);
 
@@ -54,5 +54,3 @@
 #define for_each_non_empty_line(line, save)\
for (line = strtok_r(NULL, "\r\n", &save); line;\
 line = strtok_r(NULL, "\r\n", &save))
-
-int mgcp_parse_ci(uint32_t *conn_id, const char *ci);
diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index 1a6cbce..0eed89e 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -30,6 +30,7 @@
int response_code;
mgcp_trans_id_t trans_id;
const char *comment;
+   char conn_id[MGC

[PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy

2017-11-29 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5024

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

client: use osmo_strlcpy instead of strncpy

simplify \nul termination of the ip_addr string

Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8
---
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_network.c
M tests/mgcp_client/mgcp_client_test.c
4 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/6

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index ac86f52..ee8d267 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -201,8 +201,7 @@
goto response_parse_failure;
 
/* Extract IP-Address */
-   strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip));
-   r->audio_ip[sizeof(r->audio_ip) - 1] = '\0';
+   osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip));
 
/* Check IP-Address */
if (inet_aton(r->audio_ip, &ip_test) == 0)
@@ -398,7 +397,7 @@
unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf);
unsigned int i;
 
-   strncpy(strbuf, (const char*)msg->data, l);
+   osmo_strlcpy(strbuf, (const char*)msg->data, l);
for (i = 0; i < sizeof(strbuf); i++) {
if (strbuf[i] == '\n' || strbuf[i] == '\r') {
strbuf[i] = '\0';
diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index e33596d..dcfc2ff 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -29,7 +29,8 @@
 #include 
 
 /* Allocate a new connection identifier. According to RFC3435, they must
- * be unique only within the scope of the endpoint. */
+ * be unique only within the scope of the endpoint. (Caller must provide
+ * memory for id) */
 static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id)
 {
int i;
@@ -140,7 +141,7 @@
conn->mode = MGCP_CONN_NONE;
conn->mode_orig = MGCP_CONN_NONE;
conn->u.rtp.conn = conn;
-   strcpy(conn->name, name);
+   osmo_strlcpy(conn->name, name, sizeof(conn->name));
rc = mgcp_alloc_id(endp, conn->id);
if (rc < 0) {
talloc_free(conn);
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index a02b0d1..816f16b 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -88,7 +88,7 @@
if (endp->cfg->net_ports.bind_addr) {
/* Check there is a bind IP for the RTP traffic configured,
 * if so, use that IP-Address */
-   strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN);
+   osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, 
INET_ADDRSTRLEN);
LOGP(DRTP, LOGL_DEBUG,
 "endpoint:%x CI:%s using configured rtp bind ip as local 
bind ip %s\n",
 ENDPOINT_NUMBER(endp), conn->conn->id, addr);
@@ -96,7 +96,7 @@
/* No specific bind IP is configured for the RTP traffic, so
 * assume the IP where we listen for incoming MGCP messages
 * as bind IP */
-   strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN);
+   osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN);
LOGP(DRTP, LOGL_DEBUG,
 "endpoint:%x CI:%s using mgcp bind ip as local rtp bind 
ip: %s\n",
 ENDPOINT_NUMBER(endp), conn->conn->id, addr);
diff --git a/tests/mgcp_client/mgcp_client_test.c 
b/tests/mgcp_client/mgcp_client_test.c
index 5fd59e9..37fe0b8 100644
--- a/tests/mgcp_client/mgcp_client_test.c
+++ b/tests/mgcp_client/mgcp_client_test.c
@@ -46,14 +46,14 @@
l = strlen(head);
msg->l2h = msgb_put(msg, l);
data = (char*)msgb_l2(msg);
-   strncpy(data, head, l);
+   osmo_strlcpy(data, head, l);
 
data = (char*)msgb_put(msg, 1);
*data = '\n';
 
l = strlen(params);
data = (char*)msgb_put(msg, l);
-   strncpy(data, params, l);
+   osmo_strlcpy(data, params, l);
 
return msg;
 }
@@ -66,7 +66,7 @@
char *data;
msg->l2h = msgb_put(msg, l);
data = (char*)msgb_l2(msg);
-   strncpy(data, str, l);
+   osmo_strlcpy(data, str, l);
return msg;
 }
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8
Gerrit-PatchSet: 6
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 


[PATCH] osmo-mgw[master]: cosmetic: fix sourcecode formatting

2017-11-29 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5034

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

cosmetic: fix sourcecode formatting

Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149
---
M include/osmocom/mgcp_client/mgcp_client.h
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/5034/5

diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index 0eed89e..cf5e8c4 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -27,9 +27,9 @@
 typedef unsigned int mgcp_trans_id_t;
 
 struct mgcp_response_head {
-   int response_code;
-   mgcp_trans_id_t trans_id;
-   const char *comment;
+   int response_code;
+   mgcp_trans_id_t trans_id;
+   const char *comment;
char conn_id[MGCP_CONN_ID_LENGTH];
 };
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149
Gerrit-PatchSet: 5
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static

2017-11-29 Thread Max

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

cosmetic: mark gsm_objclass2mo as static

It's only used once in the same file so there's no need to put it into
global header.

Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9
---
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon/gsm_data_shared.c
2 files changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 37f7976..1953ed4 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -858,10 +858,6 @@
 
 void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
 
-struct gsm_abis_mo *
-gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
-   const struct abis_om_obj_inst *obj_inst);
-
 struct gsm_nm_state *
 gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
 const struct abis_om_obj_inst *obj_inst);
diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c
index b001562..8480892 100644
--- a/src/libcommon/gsm_data_shared.c
+++ b/src/libcommon/gsm_data_shared.c
@@ -485,7 +485,7 @@
 }
 
 /* obtain the MO structure for a given object instance */
-struct gsm_abis_mo *
+static inline struct gsm_abis_mo *
 gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
const struct abis_om_obj_inst *obj_inst)
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config

2017-11-29 Thread Pau Espin Pedrol

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

osmo-bsc: Remove 'auth policy' cmd from config

As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command
has been dropped and is no longer recognized.

Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
---
M example/defaults.conf
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
2 files changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/example/defaults.conf b/example/defaults.conf
index 86223d1..5517212 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -13,7 +13,6 @@
 mnc: 70
 short_name: osmo-gsm-tester-msc
 long_name: osmo-gsm-tester-msc
-auth_policy: closed
 encryption: a5_0
 authentication: optional
 
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 1b21e63..c1f3cc7 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -31,7 +31,6 @@
  mobile network code ${bsc.net.mnc}
  short name ${bsc.net.short_name}
  long name ${bsc.net.long_name}
- auth policy ${bsc.net.auth_policy}
  location updating reject cause 13
  encryption ${bsc.net.encryption}
  authentication ${bsc.net.authentication}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config

2017-11-29 Thread Pau Espin Pedrol

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

osmo-bsc: Remove authentication cmd from config

authentication is firmly VLR land and must go away from bsc. That option
is a leftover from nitb. It will be removed at some point.

Change-Id: I3bb4189b33173245116018e437e113c6c1226639
---
M example/defaults.conf
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
2 files changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/example/defaults.conf b/example/defaults.conf
index 5517212..7468722 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -14,7 +14,6 @@
 short_name: osmo-gsm-tester-msc
 long_name: osmo-gsm-tester-msc
 encryption: a5_0
-authentication: optional
 
 msc:
   net:
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index c1f3cc7..18b2321 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -33,7 +33,6 @@
  long name ${bsc.net.long_name}
  location updating reject cause 13
  encryption ${bsc.net.encryption}
- authentication ${bsc.net.authentication}
  neci 1
  rrlp mode none
  mm info 1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[ABANDON] osmo-bts[master]: oml: Use new API abis_nm_admin_name

2017-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change.

Change subject: oml: Use new API abis_nm_admin_name
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I3a013a924257490d9b26376d96f8e38cdf2cd971
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config

2017-11-29 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config

2017-11-29 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config

2017-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: osmo-bsc: Remove 'auth policy' cmd from config
..


osmo-bsc: Remove 'auth policy' cmd from config

As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command
has been dropped and is no longer recognized.

Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
---
M example/defaults.conf
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
2 files changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/example/defaults.conf b/example/defaults.conf
index 86223d1..5517212 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -13,7 +13,6 @@
 mnc: 70
 short_name: osmo-gsm-tester-msc
 long_name: osmo-gsm-tester-msc
-auth_policy: closed
 encryption: a5_0
 authentication: optional
 
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 1b21e63..c1f3cc7 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -31,7 +31,6 @@
  mobile network code ${bsc.net.mnc}
  short name ${bsc.net.short_name}
  long name ${bsc.net.long_name}
- auth policy ${bsc.net.auth_policy}
  location updating reject cause 13
  encryption ${bsc.net.encryption}
  authentication ${bsc.net.authentication}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config

2017-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: osmo-bsc: Remove authentication cmd from config
..


osmo-bsc: Remove authentication cmd from config

authentication is firmly VLR land and must go away from bsc. That option
is a leftover from nitb. It will be removed at some point.

Change-Id: I3bb4189b33173245116018e437e113c6c1226639
---
M example/defaults.conf
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
2 files changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/example/defaults.conf b/example/defaults.conf
index 5517212..7468722 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -14,7 +14,6 @@
 short_name: osmo-gsm-tester-msc
 long_name: osmo-gsm-tester-msc
 encryption: a5_0
-authentication: optional
 
 msc:
   net:
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index c1f3cc7..18b2321 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -33,7 +33,6 @@
  long name ${bsc.net.long_name}
  location updating reject cause 13
  encryption ${bsc.net.encryption}
- authentication ${bsc.net.authentication}
  neci 1
  rrlp mode none
  mm info 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-bsc[master]: OML: check GPRS state when reporting status

2017-11-29 Thread Max

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

OML: check GPRS state when reporting status

If GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked
than report it as degraded.

Related: OS#2486
Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc
---
M src/libbsc/abis_nm.c
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index c9f03e1..ec235a8 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -691,6 +691,18 @@
if (bts->mo.nm_state.administrative == NM_STATE_LOCKED)
return false;
 
+   if (bts->gprs.mode != BTS_GPRS_NONE) {
+   if (bts->gprs.cell.mo.nm_state.administrative == 
NM_STATE_LOCKED)
+   return false;
+
+   if (bts->gprs.nse.mo.nm_state.administrative == NM_STATE_LOCKED)
+   return false;
+
+   if (bts->gprs.nsvc[0].mo.nm_state.administrative == 
NM_STATE_LOCKED &&
+   bts->gprs.nsvc[1].mo.nm_state.administrative == 
NM_STATE_LOCKED)
+   return false;
+   }
+
llist_for_each_entry(trx, &bts->trx_list, list) {
if (!trx->rsl_link)
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams

2017-11-29 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/4980

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

mgcp: use osmo-mgw to switch rtp streams

in the current implementation we still use osmo-bsc_mgcp, which
has many problems and is also obsoleted by osmo-mgw.

integrate osmo-mgw and re-implement the current switching using
an osmo fsm.

Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c
Closes: OS#2605
Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
A include/osmocom/msc/msc_mgcp.h
M src/libmsc/Makefile.am
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/iucs.c
M src/libmsc/msc_ifaces.c
A src/libmsc/msc_mgcp.c
12 files changed, 1,087 insertions(+), 309 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/6

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 1419e8e..052d830 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -39,6 +39,7 @@
mncc.h \
mncc_int.h \
msc_ifaces.h \
+   msc_mgcp.h \
network_listen.h \
oap_client.h \
openbscdefines.h \
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 696cef1..9106421 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -196,9 +196,17 @@
struct gsm_encr encr;
 
struct {
+   struct mgcp_ctx *mgcp_ctx;
unsigned int mgcp_rtp_endpoint;
-   uint16_t port_subscr;
-   uint16_t port_cn;
+
+   uint16_t local_port_ran;
+   char local_addr_ran[INET_ADDRSTRLEN];
+   uint16_t remote_port_ran;
+   char remote_addr_ran[INET_ADDRSTRLEN];
+   uint16_t local_port_cn;
+   char local_addr_cn[INET_ADDRSTRLEN];
+   uint16_t remote_port_cn;
+   char remote_addr_cn[INET_ADDRSTRLEN];
} rtp;
 
/* which Iu-CS connection, if any. */
diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h
index b7d6064..9c6c858 100644
--- a/include/osmocom/msc/iucs.h
+++ b/include/osmocom/msc/iucs.h
@@ -5,3 +5,5 @@
 
 struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network 
*network,
struct 
ranap_ue_conn_ctx *ue);
+
+int iu_rab_act_cs(struct gsm_trans *trans);
diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h
index 0592c07..ca25e9d 100644
--- a/include/osmocom/msc/msc_ifaces.h
+++ b/include/osmocom/msc/msc_ifaces.h
@@ -37,7 +37,3 @@
 enum gsm48_reject_value value);
 
 int msc_tx_common_id(struct gsm_subscriber_connection *conn);
-int msc_call_assignment(struct gsm_trans *trans);
-int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2);
-void msc_call_release(struct gsm_trans *trans);
-int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip);
diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h
new file mode 100644
index 000..907e303
--- /dev/null
+++ b/include/osmocom/msc/msc_mgcp.h
@@ -0,0 +1,47 @@
+/* (C) 2017 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ *
+ * Author: Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+#pragma once
+
+/* MGCP state handler context (fsm etc..) */
+struct mgcp_ctx {
+   /* FSM instance, which handles the connection switching procedure */
+   struct osmo_fsm_inst *fsm;
+
+   /* RTP endpoint number */
+   uint16_t rtp_endpoint;
+
+   /* Set to true, when the context information is no longer
+* needed */
+   bool free_ctx;
+
+   /* RTP connection identifiers */
+   char conn_id_ran[MGCP_CONN_ID_LENGTH];
+   char conn_id_cn[MGCP_CONN_ID_LENGTH];
+
+   /* Copy of the pointer and the data with context information
+* needed to process the AoIP and MGCP requests (system data) */
+   struct mgcp_client *mgcp;
+   struct gsm_trans *trans;
+};
+
+int msc_mgcp_call_assignment(struct gsm_trans *trans);
+int msc_mgcp_call_complete

[PATCH] osmo-msc[master]: Add basic CTRL test

2017-11-29 Thread Max

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

Add basic CTRL test

All the CTRL tests were skipped automatically because they were
inherited from before repo split time. This means that MSC CTRL
interface was not tested at all. Add trivial test which uses generic
rate counter introspection so we at least check that MSC's CTRL
interface is not completely broken.

Change-Id: I784feece666b00752a81f2c126e6f255505445be
---
M tests/ctrl_test_runner.py
1 file changed, 8 insertions(+), 387 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/5093/1

diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 2e59e13..9a976a5 100644
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -148,395 +148,18 @@
 return responses
 
 
-class TestCtrlBSC(TestCtrlBase):
-
-def tearDown(self):
-TestCtrlBase.tearDown(self)
-os.unlink("tmp_dummy_sock")
-
+class TestCtrlMSC(TestCtrlBase):
 def ctrl_command(self):
-return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c",
-"doc/examples/osmo-bsc/osmo-bsc.cfg"]
+return ["./src/osmo-msc/osmo-msc", "-c",
+"doc/examples/osmo-msc/osmo-msc.cfg"]
 
 def ctrl_app(self):
-return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc")
+return (4255, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc")
 
-def testCtrlErrs(self):
-r = self.do_get('invalid')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Command not found')
+def testRateCounters(self):
+r = self.do_get('rate_ctr.*')
 
-r = self.do_set('rf_locked', '999')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Value failed verification.')
-
-r = self.do_get('bts')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Error while parsing the index.')
-
-r = self.do_get('bts.999')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Error while resolving object')
-
-def testBtsLac(self):
-r = self.do_get('bts.0.location-area-code')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '1')
-
-r = self.do_set('bts.0.location-area-code', '23')
-self.assertEquals(r['mtype'], 'SET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '23')
-
-r = self.do_get('bts.0.location-area-code')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '23')
-
-r = self.do_set('bts.0.location-area-code', '-1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Input not within the range')
-
-def testBtsCi(self):
-r = self.do_get('bts.0.cell-identity')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '0')
-
-r = self.do_set('bts.0.cell-identity', '23')
-self.assertEquals(r['mtype'], 'SET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '23')
-
-r = self.do_get('bts.0.cell-identity')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '23')
-
-r = self.do_set('bts.0.cell-identity', '-1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Input not within the range')
-
-def testBtsGenerateSystemInformation(self):
-r = self.do_get('bts.0.send-new-system-informations')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Write Only attribute')
-
-# No RSL links so it will fail
-r = self.do_set('bts.0.send-new-system-informations', '1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Failed to generate SI')
-
-def testBtsChannelLoad(self):
-r = self.do_set('bts.0.channel-load', '1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Read Only attribute')
-
-# No RSL link so everything is 0
-r = self.do_get('bts.0.channel-load')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['value'],
-   'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0'
-   + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0'
-   + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0')
-
-def testBtsOmlConnectionState(self):
-"""Check OML state. It will not be connected"""
-r = self.do_set('bts.0.oml-connection-state', '1')
-self.assertEquals(r['mty

osmo-bsc[master]: cosmetic: tighten function type signatures

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: Fix tests linking

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+1

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

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


osmo-bsc[master]: OML: check TRX usability when reporting

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: OML: check GPRS state when reporting status

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: cosmetic: tighten function type signatures

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: cosmetic: tighten function type signatures
..


cosmetic: tighten function type signatures

* change return type to bool
* constify parameters

The nm_is_running(), trx_is_usable() and ts_is_usable() always return
boolean value and are always used as such anyway. The also do not change
their parameters.

Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
---
M include/osmocom/bsc/abis_nm.h
M include/osmocom/bsc/chan_alloc.h
M src/libbsc/abis_nm.c
M src/libbsc/chan_alloc.c
4 files changed, 11 insertions(+), 11 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 b0cb166..18f87cd 100644
--- a/include/osmocom/bsc/abis_nm.h
+++ b/include/osmocom/bsc/abis_nm.h
@@ -163,7 +163,7 @@
 
 /* Functions calling into other code parts */
 bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts);
-int nm_is_running(struct gsm_nm_state *s);
+bool nm_is_running(const struct gsm_nm_state *s);
 
 int abis_nm_vty_init(void);
 
diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h
index 7388e14..320fa94 100644
--- a/include/osmocom/bsc/chan_alloc.h
+++ b/include/osmocom/bsc/chan_alloc.h
@@ -49,6 +49,6 @@
 void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts);
 void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
 
-int trx_is_usable(struct gsm_bts_trx *trx);
+bool trx_is_usable(const struct gsm_bts_trx *trx);
 
 #endif /* _CHAN_ALLOC_H */
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index 295cefd..f1a56a6 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -159,7 +159,7 @@
 
 static int abis_nm_rcvmsg_sw(struct msgb *mb);
 
-int nm_is_running(struct gsm_nm_state *s) {
+bool nm_is_running(const struct gsm_nm_state *s) {
return (s->operational == NM_OPSTATE_ENABLED) && (
(s->availability == NM_AVSTATE_OK) ||
(s->availability == 0xff)
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index f0275bc..4b2531e 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -36,41 +36,41 @@
 
 #include 
 
-static int ts_is_usable(struct gsm_bts_trx_ts *ts)
+static bool ts_is_usable(const struct gsm_bts_trx_ts *ts)
 {
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(ts->trx->bts)) {
if (!nm_is_running(&ts->mo.nm_state))
-   return 0;
+   return false;
}
 
/* If a TCH/F_PDCH TS is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
if (ts->flags & TS_F_PDCH_PENDING_MASK)
-   return 0;
+   return false;
}
 
/* If a dynamic channel is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
if (ts->dyn.pchan_is != ts->dyn.pchan_want)
-   return 0;
+   return false;
}
 
-   return 1;
+   return true;
 }
 
-int trx_is_usable(struct gsm_bts_trx *trx)
+bool trx_is_usable(const struct gsm_bts_trx *trx)
 {
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(trx->bts)) {
if (!nm_is_running(&trx->mo.nm_state) ||
!nm_is_running(&trx->bb_transc.mo.nm_state))
-   return 0;
+   return false;
}
 
-   return 1;
+   return true;
 }
 
 static struct gsm_lchan *

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

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


osmo-msc[master]: Add basic CTRL test

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-msc[master]: Remove obsolete ./configure option

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-msc[master]: Add basic CTRL test

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: Add basic CTRL test
..


Add basic CTRL test

All the CTRL tests were skipped automatically because they were
inherited from before repo split time. This means that MSC CTRL
interface was not tested at all. Add trivial test which uses generic
rate counter introspection so we at least check that MSC's CTRL
interface is not completely broken.

Change-Id: I784feece666b00752a81f2c126e6f255505445be
---
M tests/ctrl_test_runner.py
1 file changed, 8 insertions(+), 387 deletions(-)

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



diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 2e59e13..9a976a5 100644
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -148,395 +148,18 @@
 return responses
 
 
-class TestCtrlBSC(TestCtrlBase):
-
-def tearDown(self):
-TestCtrlBase.tearDown(self)
-os.unlink("tmp_dummy_sock")
-
+class TestCtrlMSC(TestCtrlBase):
 def ctrl_command(self):
-return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c",
-"doc/examples/osmo-bsc/osmo-bsc.cfg"]
+return ["./src/osmo-msc/osmo-msc", "-c",
+"doc/examples/osmo-msc/osmo-msc.cfg"]
 
 def ctrl_app(self):
-return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc")
+return (4255, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc")
 
-def testCtrlErrs(self):
-r = self.do_get('invalid')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Command not found')
+def testRateCounters(self):
+r = self.do_get('rate_ctr.*')
 
-r = self.do_set('rf_locked', '999')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Value failed verification.')
-
-r = self.do_get('bts')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Error while parsing the index.')
-
-r = self.do_get('bts.999')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Error while resolving object')
-
-def testBtsLac(self):
-r = self.do_get('bts.0.location-area-code')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '1')
-
-r = self.do_set('bts.0.location-area-code', '23')
-self.assertEquals(r['mtype'], 'SET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '23')
-
-r = self.do_get('bts.0.location-area-code')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.location-area-code')
-self.assertEquals(r['value'], '23')
-
-r = self.do_set('bts.0.location-area-code', '-1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Input not within the range')
-
-def testBtsCi(self):
-r = self.do_get('bts.0.cell-identity')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '0')
-
-r = self.do_set('bts.0.cell-identity', '23')
-self.assertEquals(r['mtype'], 'SET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '23')
-
-r = self.do_get('bts.0.cell-identity')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['var'], 'bts.0.cell-identity')
-self.assertEquals(r['value'], '23')
-
-r = self.do_set('bts.0.cell-identity', '-1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Input not within the range')
-
-def testBtsGenerateSystemInformation(self):
-r = self.do_get('bts.0.send-new-system-informations')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Write Only attribute')
-
-# No RSL links so it will fail
-r = self.do_set('bts.0.send-new-system-informations', '1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Failed to generate SI')
-
-def testBtsChannelLoad(self):
-r = self.do_set('bts.0.channel-load', '1')
-self.assertEquals(r['mtype'], 'ERROR')
-self.assertEquals(r['error'], 'Read Only attribute')
-
-# No RSL link so everything is 0
-r = self.do_get('bts.0.channel-load')
-self.assertEquals(r['mtype'], 'GET_REPLY')
-self.assertEquals(r['value'],
-   'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0'
-   + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0'
-   + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0')
-
-def testBtsOmlConnectionState(self):
-"""Check OML state

osmo-msc[master]: Remove unneeded .py scripts

2017-11-29 Thread Harald Welte

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4991/1//COMMIT_MSG
Commit Message:

Line 11: are not MSC-specific: leftover from repository split.
they are not MSC-specific, ok.  But where have they been moved now? Needs to be 
stated here.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


[MERGED] osmo-msc[master]: Remove obsolete ./configure option

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: Remove obsolete ./configure option
..


Remove obsolete ./configure option

The '--enable-vty-tests' is just alias to '--enable-external-tests'
anyway.

Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47
---
M README.vty-tests
M configure.ac
M contrib/jenkins.sh
3 files changed, 3 insertions(+), 8 deletions(-)

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



diff --git a/README.vty-tests b/README.vty-tests
index ba1b87c..0669ea8 100644
--- a/README.vty-tests
+++ b/README.vty-tests
@@ -4,7 +4,7 @@
 
 and pass the following configure options here:
 
-  ./configure --enable-vty-tests --enable-external-tests
+  ./configure --enable-external-tests
 
 The VTY tests are then included in the standard check target:
 
diff --git a/configure.ac b/configure.ac
index f965240..5766fd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,11 +160,6 @@
 
 CHECK_TM_INCLUDES_TM_GMTOFF
 
-AC_ARG_ENABLE([vty_tests],
-   AC_HELP_STRING([--enable-vty-tests],
-   [Include the VTY/CTRL tests in make check 
(deprecated)
-   [default=no]]),
-   [enable_ext_tests="$enableval"],[enable_ext_tests="no"])
 AC_ARG_ENABLE([external_tests],
AC_HELP_STRING([--enable-external-tests],
[Include the VTY/CTRL tests in make check 
[default=no]]),
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index d8853d1..b0dde06 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -48,12 +48,12 @@
 
 cd "$base"
 autoreconf --install --force
-./configure --enable-smpp $IU --enable-vty-tests --enable-external-tests
+./configure --enable-smpp $IU --enable-external-tests
 $MAKE $PARALLEL_MAKE
 LD_LIBRARY_PATH="$inst/lib" $MAKE check \
   || cat-testlogs.sh
 LD_LIBRARY_PATH="$inst/lib" \
-  DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-vty-tests 
--enable-external-tests" \
+  DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-external-tests" \
   $MAKE distcheck \
   || cat-testlogs.sh
 

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

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


osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: cosmetic: drop unused include

2017-11-29 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: cosmetic: drop unused include

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: cosmetic: drop unused include
..


cosmetic: drop unused include

Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8
---
M include/osmocom/bsc/Makefile.am
D include/osmocom/bsc/sgsn.h
2 files changed, 0 insertions(+), 192 deletions(-)

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



diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 1f7cd39..9d2ee6e 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -53,7 +53,6 @@
rrlp.h \
rs232.h \
rtp_proxy.h \
-   sgsn.h \
signal.h \
silent_call.h \
sms_queue.h \
diff --git a/include/osmocom/bsc/sgsn.h b/include/osmocom/bsc/sgsn.h
deleted file mode 100644
index f71b649..000
--- a/include/osmocom/bsc/sgsn.h
+++ /dev/null
@@ -1,191 +0,0 @@
-#ifndef _SGSN_H
-#define _SGSN_H
-
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-struct gprs_gsup_client;
-struct hostent;
-
-enum sgsn_auth_policy {
-   SGSN_AUTH_POLICY_OPEN,
-   SGSN_AUTH_POLICY_CLOSED,
-   SGSN_AUTH_POLICY_ACL_ONLY,
-   SGSN_AUTH_POLICY_REMOTE
-};
-
-
-enum sgsn_rate_ctr_keys {
-   CTR_LLC_DL_BYTES,
-   CTR_LLC_UL_BYTES,
-   CTR_LLC_DL_PACKETS,
-   CTR_LLC_UL_PACKETS,
-   CTR_GPRS_ATTACH_REQUEST,
-   CTR_GPRS_ATTACH_ACKED,
-   CTR_GPRS_ATTACH_REJECTED,
-   CTR_GPRS_DETACH_REQUEST,
-   CTR_GPRS_DETACH_ACKED,
-   CTR_GPRS_ROUTING_AREA_REQUEST,
-   CTR_GPRS_ROUTING_AREA_ACKED,
-   CTR_GPRS_ROUTING_AREA_REJECT,
-   /* PDP single packet counter / GSM 04.08 9.5.1 - 9.5.9 */
-   CTR_PDP_ACTIVATE_REQUEST,
-   CTR_PDP_ACTIVATE_REJECT,
-   CTR_PDP_ACTIVATE_ACCEPT,
-   CTR_PDP_REQUEST_ACTIVATE, /* unused */
-   CTR_PDP_REQUEST_ACTIVATE_REJ, /* unused */
-   CTR_PDP_MODIFY_REQUEST, /* unsued */
-   CTR_PDP_MODIFY_ACCEPT, /* unused */
-   CTR_PDP_DL_DEACTIVATE_REQUEST,
-   CTR_PDP_DL_DEACTIVATE_ACCEPT,
-   CTR_PDP_UL_DEACTIVATE_REQUEST,
-   CTR_PDP_UL_DEACTIVATE_ACCEPT,
-};
-
-struct sgsn_cdr {
-   char *filename;
-   int interval;
-};
-
-struct sgsn_config {
-   /* parsed from config file */
-
-   char *gtp_statedir;
-   struct sockaddr_in gtp_listenaddr;
-
-   /* misc */
-   struct gprs_ns_inst *nsi;
-
-   enum sgsn_auth_policy auth_policy;
-   enum gprs_ciph_algo cipher;
-   struct llist_head imsi_acl;
-
-   struct sockaddr_in gsup_server_addr;
-   int gsup_server_port;
-
-   int require_authentication;
-   int require_update_location;
-
-   /* CDR configuration */
-   struct sgsn_cdr cdr;
-
-   struct {
-   int T3312;
-   int T3322;
-   int T3350;
-   int T3360;
-   int T3370;
-   int T3313;
-   int T3314;
-   int T3316;
-   int T3385;
-   int T3386;
-   int T3395;
-   int T3397;
-   } timers;
-
-   int dynamic_lookup;
-
-   struct oap_client_config oap;
-
-   /* RFC1144 TCP/IP header compression */
-   struct {
-   int active;
-   int passive;
-   int s01;
-   } pcomp_rfc1144;
-
-   /* V.42vis data compression */
-   struct {
-   int active;
-   int passive;
-   int p0;
-   int p1;
-   int p2;
-   } dcomp_v42bis;
-
-   struct {
-   int rab_assign_addr_enc;
-   } iu;
-};
-
-struct sgsn_instance {
-   char *config_file;
-   struct sgsn_config cfg;
-   /* File descriptor wrappers for LibGTP */
-   struct osmo_fd gtp_fd0;
-   struct osmo_fd gtp_fd1c;
-   struct osmo_fd gtp_fd1u;
-   /* Timer for libGTP */
-   struct osmo_timer_list gtp_timer;
-   /* GSN instance for libgtp */
-   struct gsn_t *gsn;
-   /* Subscriber */
-   struct gsup_client *gsup_client;
-   /* LLME inactivity timer */
-   struct osmo_timer_list llme_timer;
-
-   /* c-ares event loop integration */
-   struct osmo_timer_list ares_timer;
-   struct llist_head ares_fds;
-   ares_channel ares_channel;
-   struct ares_addr_node *ares_servers;
-
-   struct rate_ctr_group *rate_ctrs;
-};
-
-extern struct sgsn_instance *sgsn;
-
-/* sgsn_vty.c */
-
-int sgsn_vty_init(struct sgsn_config *cfg);
-int sgsn_parse_config(const char *config_file);
-
-/* sgsn.c */
-
-/* Main input function for Gb proxy */
-int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci);
-
-
-struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
-struct sgsn_mm_ctx *mmctx,
-uint16_t nsapi,
-  

[MERGED] osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static

2017-11-29 Thread Max
Max has submitted this change and it was merged.

Change subject: cosmetic: mark gsm_objclass2mo as static
..


cosmetic: mark gsm_objclass2mo as static

It's only used once in the same file so there's no need to put it into
global header.

Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9
---
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon/gsm_data_shared.c
2 files changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 37f7976..1953ed4 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -858,10 +858,6 @@
 
 void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
 
-struct gsm_abis_mo *
-gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
-   const struct abis_om_obj_inst *obj_inst);
-
 struct gsm_nm_state *
 gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
 const struct abis_om_obj_inst *obj_inst);
diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c
index b001562..8480892 100644
--- a/src/libcommon/gsm_data_shared.c
+++ b/src/libcommon/gsm_data_shared.c
@@ -485,7 +485,7 @@
 }
 
 /* obtain the MO structure for a given object instance */
-struct gsm_abis_mo *
+static inline struct gsm_abis_mo *
 gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
const struct abis_om_obj_inst *obj_inst)
 {

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

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


osmo-mgw[master]: MGCP: Connection Identifiers are hex strings

2017-11-29 Thread Harald Welte

Patch Set 8:

(1 comment)

https://gerrit.osmocom.org/#/c/4906/8/src/libosmo-mgcp/mgcp_conn.c
File src/libosmo-mgcp/mgcp_conn.c:

Line 140:   OSMO_ASSERT(id);
are we sure about all o those OSMO_ASSERT?  Are we sure they are never called 
from a code path that receives MGCP messages and parses them?  Basically it 
should not be possible to reach any of the OSMO_ASSERT from a hand-crafted 
invalid MGCP packet received.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436
Gerrit-PatchSet: 8
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: Yes


[PATCH] osmo-bsc[master]: sccp-lite: remove obsolete VTY commands

2017-11-29 Thread dexter

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

sccp-lite: remove obsolete VTY commands

remove obsolete vty commands:

- token
- auth-key
- no auth-key

Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/osmo_bsc_vty.c
2 files changed, 0 insertions(+), 47 deletions(-)


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

diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 4a283d1..a3e0106 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -72,10 +72,6 @@
 
 
/* Connection data */
-   char *bsc_token;
-   uint8_t bsc_key[16];
-   uint8_t bsc_key_present;
-
int ping_timeout;
int pong_timeout;
struct osmo_timer_list ping_timer;
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 0003cfa..a87b20f 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -108,11 +108,6 @@
struct bsc_msc_dest *dest;
 
vty_out(vty, "msc %d%s", msc->nr, VTY_NEWLINE);
-   if (msc->bsc_token)
-   vty_out(vty, " token %s%s", msc->bsc_token, VTY_NEWLINE);
-   if (msc->bsc_key_present)
-   vty_out(vty, " auth-key %s%s",
-   osmo_hexdump(msc->bsc_key, sizeof(msc->bsc_key)), 
VTY_NEWLINE);
if (msc->core_mnc != -1)
vty_out(vty, " core-mobile-network-code %d%s",
msc->core_mnc, VTY_NEWLINE);
@@ -233,41 +228,6 @@
if (bsc->acc_lst_name)
vty_out(vty, " access-list-name %s%s", bsc->acc_lst_name, 
VTY_NEWLINE);
 
-   return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_bsc_token,
-  cfg_net_bsc_token_cmd,
-  "token TOKEN",
-  "A token for the BSC to be sent to the MSC\n" "A token\n")
-{
-   struct bsc_msc_data *data = bsc_msc_data(vty);
-
-   osmo_talloc_replace_string(osmo_bsc_data(vty), &data->bsc_token, 
argv[0]);
-   return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_bsc_key,
-  cfg_net_bsc_key_cmd,
-  "auth-key KEY",
-  "Authentication (secret) key configuration\n"
-  "Security key\n")
-{
-   struct bsc_msc_data *data = bsc_msc_data(vty);
-
-   osmo_hexparse(argv[0], data->bsc_key, sizeof(data->bsc_key));
-   data->bsc_key_present = 1;
-   return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_no_bsc_key, cfg_net_bsc_no_key_cmd,
-  "no auth-key",
-  NO_STR "Authentication (secret) key configuration\n")
-{
-   struct bsc_msc_data *data = bsc_msc_data(vty);
-
-   memset(data->bsc_key, 0, sizeof(data->bsc_key));
-   data->bsc_key_present = 0;
return CMD_SUCCESS;
 }
 
@@ -989,9 +949,6 @@
install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd);
 
install_node(&msc_node, config_write_msc);
-   install_element(MSC_NODE, &cfg_net_bsc_token_cmd);
-   install_element(MSC_NODE, &cfg_net_bsc_key_cmd);
-   install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd);
install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd);
install_element(MSC_NODE, &cfg_net_bsc_mcc_cmd);
install_element(MSC_NODE, &cfg_net_bsc_lac_cmd);

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

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


[PATCH] osmo-bsc[master]: auth: remove unused structs

2017-11-29 Thread dexter

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

auth: remove unused structs

The following structs are no longer used/needed:

- gsm_auth_algo
- gsm_auth_info
- gsm_auth_tuple
- gsm_security_operation

Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 0 insertions(+), 29 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 857dd4f..865340d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -55,35 +55,6 @@
 struct msgb *msg,
 void *data, void *param);
 
-/* Real authentication information containing Ki */
-enum gsm_auth_algo {
-   AUTH_ALGO_NONE,
-   AUTH_ALGO_XOR,
-   AUTH_ALGO_COMP128v1,
-};
-
-struct gsm_auth_info {
-   enum gsm_auth_algo auth_algo;
-   unsigned int a3a8_ki_len;
-   uint8_t a3a8_ki[16];
-};
-
-struct gsm_auth_tuple {
-   int use_count;
-   int key_seq;
-   struct osmo_auth_vector vec;
-};
-#define GSM_KEY_SEQ_INVAL  7   /* GSM 04.08 - 10.5.1.2 */
-
-/*
- * AUTHENTICATION/CIPHERING state
- */
-struct gsm_security_operation {
-   struct gsm_auth_tuple atuple;
-   gsm_cbfn *cb;
-   void *cb_data;
-};
-
 /*
  * A dummy to keep a connection up for at least
  * a couple of seconds to work around MSC issues.

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

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


[PATCH] osmo-bsc[master]: auth: remove obsolete VTY commands

2017-11-29 Thread dexter

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

auth: remove obsolete VTY commands

authentication (optional|required) is no longer needed, the
related decisions are now made in the HLR.

Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
4 files changed, 0 insertions(+), 20 deletions(-)


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

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 60338d2..64c3abd 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -10,7 +10,6 @@
  long name OsmoBSC
  location updating reject cause 13
  encryption a5 0
- authentication optional
  neci 0
  paging any use tch 0
  rrlp mode none
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index f9f5ba6..7697481 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -9,7 +9,6 @@
  long name OsmoBSC
  location updating reject cause 13
  encryption a5 0
- authentication optional
  neci 0
  paging any use tch 0
  rrlp mode none
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index c5dedb3..3f3935c 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -802,9 +802,6 @@
vty_out(vty, " location updating reject cause %u%s",
gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
-   vty_out(vty, " authentication %s%s",
-   gsmnet->authentication_required ?  "required" : "optional",
-   VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 51f16c4..74b1a93 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -134,20 +134,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_authentication,
-  cfg_net_authentication_cmd,
-  "authentication (optional|required)",
-   "Whether to enforce MS authentication in 2G\n"
-   "Allow MS to attach via 2G BSC without authentication\n"
-   "Always do authentication\n")
-{
-   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-   gsmnet->authentication_required = (argv[0][0] == 'r') ? true : false;
-
-   return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd,
   "rrlp mode (none|ms-based|ms-preferred|ass-preferred)",
"Radio Resource Location Protocol\n"
@@ -297,7 +283,6 @@
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
-   install_element(GSMNET_NODE, &cfg_net_authentication_cmd);
install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd);
install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
install_element(GSMNET_NODE, &cfg_net_timezone_cmd);

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

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


Build failure of network:osmocom:nightly/limesuite in Debian_9.0/x86_64

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/x86_64

Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[  101s] [323/326] installing dh-autoreconf-14
[  101s] Processing triggers for man-db (2.7.6.1-2) ...
[  101s] [324/326] installing libgtk2.0-0-2.24.31-2
[  101s] Processing triggers for libc-bin (2.24-11+deb9u1) ...
[  101s] [325/326] installing libwxgtk3.0-0v5-3.0.2+dfsg-4
[  102s] Processing triggers for libc-bin (2.24-11+deb9u1) ...
[  102s] [326/326] installing libwxgtk3.0-dev-3.0.2+dfsg-4
[  102s] update-alternatives: using 
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[  102s] configuring all installed packages...
[  102s] removing nis flags from //etc/nsswitch.conf...
[  102s] now finalizing build dir...
[  102s] SIOCSIFADDR: File exists
[  102s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc)
[  102s] dpkg-source: error: cannot fstat file 
/usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or 
directory
[  102s] -
[  102s] - building limesuite_17.06.0-1.dsc (user abuild)
[  102s] -
[  102s] -
[  103s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory
[  103s] ln: failed to access 
'///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or 
directory
[  103s] 
[  103s] lamb19 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:48 
UTC 2017.
[  103s] 
[  103s] ### VM INTERACTION START ###
[  106s] [   96.458407] reboot: Power down
[  106s] ### VM INTERACTION END ###
[  106s] 
[  106s] lamb19 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:51 
UTC 2017.
[  106s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.10/x86_64

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/limesuite failed to build in 
xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[   43s]  libgtk2.0-0:amd64 depends on adwaita-icon-theme | gnome-icon-theme; 
however:
[   43s]   Package adwaita-icon-theme is not installed.
[   43s]   Package gnome-icon-theme is not installed.
[   43s] Processing triggers for libc-bin (2.26-0ubuntu2) ...
[   43s] [350/351] installing libwxgtk3.0-0v5-3.0.3.1+dfsg2-1
[   43s] Processing triggers for libc-bin (2.26-0ubuntu2) ...
[   43s] [351/351] installing libwxgtk3.0-dev-3.0.3.1+dfsg2-1
[   43s] update-alternatives: using 
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[   43s] configuring all installed packages...
[   43s] removing nis flags from //etc/nsswitch.conf...
[   43s] now finalizing build dir...
[   43s] SIOCSIFADDR: File exists
[   43s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc)
[   43s] dpkg-source: error: cannot fstat file 
/usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or 
directory
[   43s] -
[   43s] - building limesuite_17.06.0-1.dsc (user abuild)
[   43s] -
[   43s] -
[   43s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory
[   43s] ln: failed to access 
'///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or 
directory
[   43s] 
[   43s] build83 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:02:46 
UTC 2017.
[   43s] 
[   43s] ### VM INTERACTION START ###
[   47s] [   41.495950] reboot: Power down
[   47s] ### VM INTERACTION END ###
[   47s] 
[   47s] build83 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:02:50 
UTC 2017.
[   47s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/x86_64

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/limesuite failed to build in 
xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[  101s] [347/350] installing libwxgtk3.0-0v5-3.0.2+dfsg-4
[  102s] Processing triggers for libc-bin (2.24-9ubuntu2) ...
[  102s] [348/350] installing dh-strip-nondeterminism-0.032-1
[  102s] Processing triggers for man-db (2.7.6.1-2) ...
[  103s] [349/350] installing dh-autoreconf-13
[  103s] Processing triggers for man-db (2.7.6.1-2) ...
[  103s] [350/350] installing libwxgtk3.0-dev-3.0.2+dfsg-4
[  103s] update-alternatives: using 
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[  103s] configuring all installed packages...
[  103s] removing nis flags from //etc/nsswitch.conf...
[  103s] now finalizing build dir...
[  103s] SIOCSIFADDR: File exists
[  104s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc)
[  104s] dpkg-source: error: cannot fstat file 
/usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or 
directory
[  104s] -
[  104s] - building limesuite_17.06.0-1.dsc (user abuild)
[  104s] -
[  104s] -
[  104s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory
[  104s] ln: failed to access 
'///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or 
directory
[  104s] 
[  104s] lamb55 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:48 
UTC 2017.
[  104s] 
[  104s] ### VM INTERACTION START ###
[  107s] [   98.895275] reboot: Power down
[  107s] ### VM INTERACTION END ###
[  107s] 
[  107s] lamb55 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:51 
UTC 2017.
[  107s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/i586

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/i586

Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:


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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/i586

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/i586

Package network:osmocom:nightly/limesuite failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[   80s] [339/342] installing libwxgtk3.0-0v5-3.0.2+dfsg-2
[   80s] Processing triggers for libc-bin (2.24-3ubuntu1) ...
[   80s] [340/342] installing dh-strip-nondeterminism-0.028-1
[   80s] Processing triggers for man-db (2.7.5-1) ...
[   81s] [341/342] installing dh-autoreconf-12
[   81s] Processing triggers for man-db (2.7.5-1) ...
[   81s] [342/342] installing libwxgtk3.0-dev-3.0.2+dfsg-2
[   81s] update-alternatives: using 
/usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[   81s] configuring all installed packages...
[   81s] removing nis flags from //etc/nsswitch.conf...
[   81s] now finalizing build dir...
[   81s] SIOCSIFADDR: File exists
[   81s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc)
[   81s] dpkg-source: error: cannot fstat file 
/usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or 
directory
[   81s] -
[   81s] - building limesuite_17.06.0-1.dsc (user abuild)
[   81s] -
[   81s] -
[   81s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory
[   81s] ln: failed to access 
'///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or 
directory
[   81s] 
[   81s] lamb14 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:00 
UTC 2017.
[   81s] 
[   81s] ### VM INTERACTION START ###
[   84s] [   75.935473] reboot: Power down
[   84s] ### VM INTERACTION END ###
[   84s] 
[   84s] lamb14 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:03 
UTC 2017.
[   84s] 

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


osmo-bsc[master]: auth: remove obsolete VTY commands

2017-11-29 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

let's also remove the authentication_required field from gsm_network 
(gsm_data_shared.h)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-bsc[master]: auth: remove obsolete VTY commands

2017-11-29 Thread Neels Hofmeyr

Patch Set 1:

> let's also remove the authentication_required field from
 > gsm_network (gsm_data_shared.h)

actually gsm_data.h

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-bsc[master]: auth: remove unused structs

2017-11-29 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/5095/1/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

Line 161
-1: also drop this


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-bsc[master]: sccp-lite: remove obsolete VTY commands

2017-11-29 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

it appears that all three of the struct members removed in bsc_msc_data.h are 
still being used in osmo_bsc_msc.c ... wondering how that can pass the build, 
but it certainly does somehow. Could you clarify this?

osmo-bsc_nat also appears to have related code.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/i586

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/i586

Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[   80s] [348/348] installing libwxgtk3.0-dev-3.0.2+dfsg-4
[   80s] update-alternatives: using 
/usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[   80s] configuring all installed packages...
[   80s] removing nis flags from //etc/nsswitch.conf...
[   80s] now finalizing build dir...
[   80s] SIOCSIFADDR: File exists
[   81s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc)
[   81s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD
[   81s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz
[   81s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz
[   81s] -
[   81s] - building limesuite_17.09.1-1.dsc (user abuild)
[   81s] -
[   81s] -
[   81s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted 
trailer line
[   81s] LINE:  -- Lime Microsystems   Fri Sep 1 15:43:31 
2017 +0300
[   81s] dpkg-buildpackage: warning: debian/changelog(l7): found start of 
entry where expected more change data or trailer
[   81s] LINE: limesuite (17.09.0-1) unstable; urgency=low
[   81s] dpkg-buildpackage: warning: debian/changelog(l7): found end of 
file where expected more change data or trailer
[   81s] Can't call method "epoch" on an undefined value at 
/usr/share/perl5/Dpkg/Changelog.pm line 498.
[   81s] 
[   81s] lamb75 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:08 
UTC 2017.
[   81s] 
[   81s] ### VM INTERACTION START ###
[   85s] [   75.137972] reboot: Power down
[   85s] ### VM INTERACTION END ###
[   85s] 
[   85s] lamb75 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:13 
UTC 2017.
[   85s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/x86_64

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/limesuite failed to build in 
xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[   87s] [350/350] installing libwxgtk3.0-dev-3.0.2+dfsg-4
[   87s] update-alternatives: using 
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[   87s] configuring all installed packages...
[   87s] removing nis flags from //etc/nsswitch.conf...
[   87s] now finalizing build dir...
[   87s] SIOCSIFADDR: File exists
[   87s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc)
[   88s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD
[   88s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz
[   88s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz
[   88s] -
[   88s] - building limesuite_17.09.1-1.dsc (user abuild)
[   88s] -
[   88s] -
[   88s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted 
trailer line
[   88s] LINE:  -- Lime Microsystems   Fri Sep 1 15:43:31 
2017 +0300
[   88s] dpkg-buildpackage: warning: debian/changelog(l7): found start of 
entry where expected more change data or trailer
[   88s] LINE: limesuite (17.09.0-1) unstable; urgency=low
[   88s] dpkg-buildpackage: warning: debian/changelog(l7): found end of 
file where expected more change data or trailer
[   88s] Can't call method "epoch" on an undefined value at 
/usr/share/perl5/Dpkg/Changelog.pm line 498.
[   88s] 
[   88s] lamb55 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:33 
UTC 2017.
[   88s] 
[   88s] ### VM INTERACTION START ###
[   92s] [   82.402653] reboot: Power down
[   92s] ### VM INTERACTION END ###
[   92s] 
[   92s] lamb55 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:37 
UTC 2017.
[   92s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/x86_64

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/limesuite failed to build in 
xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[   87s] [344/344] installing libwxgtk3.0-dev-3.0.2+dfsg-2
[   87s] update-alternatives: using 
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[   87s] configuring all installed packages...
[   87s] removing nis flags from //etc/nsswitch.conf...
[   87s] now finalizing build dir...
[   87s] SIOCSIFADDR: File exists
[   87s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc)
[   88s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD
[   88s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz
[   88s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz
[   88s] -
[   88s] - building limesuite_17.09.1-1.dsc (user abuild)
[   88s] -
[   88s] -
[   88s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted 
trailer line
[   88s] LINE:  -- Lime Microsystems   Fri Sep 1 15:43:31 
2017 +0300
[   88s] dpkg-buildpackage: warning: debian/changelog(l7): found start of 
entry where expected more change data or trailer
[   88s] LINE: limesuite (17.09.0-1) unstable; urgency=low
[   88s] dpkg-buildpackage: warning: debian/changelog(l7): found end of 
file where expected more change data or trailer
[   88s] Can't call method "epoch" on an undefined value at 
/usr/share/perl5/Dpkg/Changelog.pm line 498.
[   88s] 
[   88s] lamb18 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:36 
UTC 2017.
[   88s] 
[   88s] ### VM INTERACTION START ###
[   92s] [   83.466399] reboot: Power down
[   92s] ### VM INTERACTION END ###
[   92s] 
[   92s] lamb18 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:41 
UTC 2017.
[   92s] 

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


Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/i586

2017-11-29 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/i586

Package network:osmocom:nightly/limesuite failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly limesuite

Last lines of build log:
[  108s] [342/342] installing libwxgtk3.0-dev-3.0.2+dfsg-2
[  108s] update-alternatives: using 
/usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide 
/usr/bin/wx-config (wx-config) in auto mode
[  108s] configuring all installed packages...
[  108s] removing nis flags from //etc/nsswitch.conf...
[  108s] now finalizing build dir...
[  108s] SIOCSIFADDR: File exists
[  109s] dpkg-source: warning: extracting unsigned source package 
(/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc)
[  109s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD
[  109s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz
[  109s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz
[  109s] -
[  109s] - building limesuite_17.09.1-1.dsc (user abuild)
[  109s] -
[  109s] -
[  110s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted 
trailer line
[  110s] LINE:  -- Lime Microsystems   Fri Sep 1 15:43:31 
2017 +0300
[  110s] dpkg-buildpackage: warning: debian/changelog(l7): found start of 
entry where expected more change data or trailer
[  110s] LINE: limesuite (17.09.0-1) unstable; urgency=low
[  110s] dpkg-buildpackage: warning: debian/changelog(l7): found end of 
file where expected more change data or trailer
[  110s] Can't call method "epoch" on an undefined value at 
/usr/share/perl5/Dpkg/Changelog.pm line 498.
[  110s] 
[  110s] cloud104 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:38 
UTC 2017.
[  110s] 
[  110s] ### VM INTERACTION START ###
[  113s] [   96.202281] reboot: Power down
[  116s] ### VM INTERACTION END ###
[  116s] 
[  116s] cloud104 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:46 
UTC 2017.
[  116s] 

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


  1   2   >