Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 )

Change subject: Improve logging in gprs_llc.c code
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b
Gerrit-Change-Number: 16147
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:59:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 )

Change subject: msc: overhaul voice call testing
..

msc: overhaul voice call testing

* Semantic:

We don't really know which side the MSC first creates a CRCX for. Instead of
assuming that the RAN side is always CRCX'd first, simply handle a "first" and
a "second" CRCX, not making any assumptions which is for which side.
Notably, there still are quite a few places assuming which CRCX corresponds to
the RAN/CN side, but the changes are sufficient to still pass the tests when
osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for
example because it doesn't matter that the wrong port number is returned during
a subsequent MDCX... Cleaning up the rest is still todo for later.

Remove code dup from call establishing code, particularly for MGCP.

Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of
the call establishing tests handle upcoming changes in osmo-msc's order of
messages, without re-implementing the changes for each test individually.

The X-Osmux parameter was so far expected to appear in the first CRCX received,
assuming that this first CRCX is for the RAN.  Instead, detect whether X-Osmux
is contained in a CRCX, and reply with an Osmux CID if so, regardless of it
being the first or second CRCX.  Count the number of X-Osmux parameters
received in CRCX messages, and compare after call setup to verify X-Osmux
presence.

Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that
worked with the older code dup will break by this patch. This is fixed by a
subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec.

* Details, per patch chunk:

Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a
wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX
first, the RAN port number can be one or the other).

In CallParameters, move MGCP handling instructions into a separate record
"CrcxResponse", and have two of them for handling the first and the second
CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}.

In CallParameters, add some flags for early-exiting call establishment with a
particular desired behavior, for specialized tests.

In CallParameters, use common default values and don't repeat them in each and
every call establishing test.

Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish()
are invoked.

Remove CRCX comments implying RAN or CN side, instead just talk of the "first"
and the "second" CRCX.

Implement one common f_handle_crcx() function, which is used by
f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and
implicitly uses the first/second CRCX handling.

For Assigment, use a wildcard RTP port so that we don't have to assume which
CRCX was for the RAN side.

In f_mo_call_establish(), insert special case conditions to make it enact
errors at specific times, for individual tests. That saves re-implementing the
entire call establishment (code dup).

For error cases, add expectation of a CC Release message in the call
establishment. This should not apply for normal successful operation, but
because interleave does not support conditionals, add flags
got_mncc_setup_compl_ind and got_cc_connect to break the interleave when
establishing is complete, so that the CC Release is skipped.
A CC Release always breaks the interleave, at whatever time it arrives.

Tests adopting f_{mo,mt}_call instead of code dup:
  f_tc_mo_setup_and_nothing()
  f_tc_mo_crcx_ran_timeout()
  f_tc_mo_crcx_ran_reject()
  f_tc_mo_release_timeout()
  f_tc_mo_cc_bssmap_clear()

Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
---
M library/BSSMAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
3 files changed, 292 insertions(+), 335 deletions(-)

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



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 41755db..406dfc5 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -420,6 +420,19 @@
 template (value) BSSMAP_IE_AoIP_TransportLayerAddress 
ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) :=

ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18);

+template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA(template 
BSSMAP_FIELD_IPAddress addr,
+   template 
uint16_t udp_port,
+   template 
integer len := ?) := {
+   elementIdentifier := '7C'O,
+   lengthIndicator := len,
+   ipAddress := addr,
+   uDPPortValue := udp_port
+}
+template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_I

Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/15957 )

Change subject: utils.h: add OSMO_NAME_C_IMPL() macro
..

utils.h: add OSMO_NAME_C_IMPL() macro

Provide a common implementation for foo_name_c() functions that base on
foo_name_buf() functions.

  char *foo_name_c(void *ctx, example_t arg)
  {
  OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg)
  }

Rationale: the most efficient way of composing strings that have optional parts
or require loops for composition is by writing to a ready char[], and this in
turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string
implementation which typically returns a length, I often want a more convenient
version that returns a char*, which can just be inlined in a "%s" string format
-- crucially: skipping string composition when inlined in a LOGP(). This common
implementation allows saving code dup, only the function signature is needed.

Why not include the function signature in the macro? The two sets of varargs
(1: signature args, 2: function call args) are hard to do. Also, having an
explicit signature is good for readability and code grepping / ctags.

Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation
(osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation
implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...).
I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore)
If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc)

Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322
---
M include/osmocom/core/utils.h
M tests/utils/utils_test.c
M tests/utils/utils_test.ok
3 files changed, 154 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index c4e6f5f..86d45bc 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -3,6 +3,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -271,4 +272,59 @@

 bool osmo_str_startswith(const char *str, const char *startswith_str);

+/*! Translate a buffer function to a talloc context function.
+ * This is the full function body of a char *foo_name_c(void *ctx, val...) 
function, implemented by an
+ * int foo_name_buf(buf, buflen, val...) function:
+ *
+ *char *foo_name_c(void *ctx, example_t arg)
+ *{
+ *OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg)
+ *}
+ *
+ * Return a talloc'd string containing the result of the given foo_name_buf() 
function, or ON_ERROR on error in the called
+ * foo_name_buf() function.
+ *
+ * If ON_ERROR is NULL, the function returns NULL on error rc from FUNC_BUF. 
Take care: returning NULL in printf() like
+ * formats (LOGP()) makes the program crash. If ON_ERROR is non-NULL, it must 
be a string constant, which is not
+ * returned directly, but written to an allocated string buffer first.
+ *
+ * \param[in] INITIAL_BUFSIZE  Which size to first talloc from ctx -- a larger 
size makes a reallocation less likely, a
+ * smaller size allocates less unused bytes, zero allocates once but still 
runs the string composition twice.
+ * \param[in] ON_ERROR  String constant to copy on error rc returned by 
FUNC_BUF, or NULL to return NULL.
+ * \param[in] FUNC_BUF  Name of a function with signature foo_buf(char *buf, 
size_t buflen, ...).
+ * \param[in] FUNC_BUF_ARGS  Additional arguments to pass to FUNC_BUF after 
the buf and buflen.
+ */
+#define OSMO_NAME_C_IMPL(CTX, INITIAL_BUFSIZE, ON_ERROR, FUNC_BUF, 
FUNC_BUF_ARGS...) \
+   size_t _len = INITIAL_BUFSIZE; \
+   int _needed; \
+   char *_str = NULL; \
+   if ((INITIAL_BUFSIZE) > 0) { \
+   _str = (char*)talloc_named_const(CTX, _len, __func__); \
+   OSMO_ASSERT(_str); \
+   } \
+   _needed = FUNC_BUF(_str, _len, ## FUNC_BUF_ARGS); \
+   if (_needed < 0) \
+   goto OSMO_NAME_C_on_error; \
+   if (_needed < _len) \
+   return _str; \
+   _len = _needed + 1; \
+   if (_str) \
+   talloc_free(_str); \
+   _str = (char*)talloc_named_const(CTX, _len, __func__); \
+   OSMO_ASSERT(_str); \
+   _needed = FUNC_BUF(_str, _len, ## FUNC_BUF_ARGS); \
+   if (_needed < 0) \
+   goto OSMO_NAME_C_on_error; \
+   return _str; \
+OSMO_NAME_C_on_error: \
+   /* Re-using and re-sizing above allocated buf ends up in very complex 
code. Just free and strdup. */ \
+   if (_str) \
+   talloc_free(_str); \
+   if (!(ON_ERROR)) \
+   return NULL; \
+   _str = talloc_strdup(CTX, ON_ERROR); \
+   OSMO_ASSERT(_str); \
+   talloc_set_name_const(_str, __func__); \
+   return _str;
+
 /*! @} */
diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c
index 70d017f..55c9e7f 100644
--- a/t

Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16158 )

Change subject: cosmetic: logging.h: fix comment s/levels/subsystems
..

cosmetic: logging.h: fix comment s/levels/subsystems

Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d
---
M include/osmocom/core/logging.h
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 75650ba..79eec10 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -105,7 +105,7 @@
 #define LOGL_ERROR 7   /*!< error condition, requires user action */
 #define LOGL_FATAL 8   /*!< fatal, program aborted */

-/* logging levels defined by the library itself */
+/* logging subsystems defined by the library itself */
 #define DLGLOBAL   -1  /*!< global logging */
 #define DLLAPD -2  /*!< LAPD implementation */
 #define DLINP  -3  /*!< (A-bis) Input sub-system */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d
Gerrit-Change-Number: 16158
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: msc: log tweaks for call / call hangup

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 )

Change subject: msc: log tweaks for call / call hangup
..

msc: log tweaks for call / call hangup

Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 11f0a5f..a1c8bd3 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1389,6 +1389,7 @@
t_clear := tr_BSSMAP_ClearCommandCSFB;
}

+   log("f_call_hangup 0: tx MNCC_DISC_REQ");
MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, 
valueof(ts_MNCC_cause(23;
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id)));

@@ -1449,9 +1450,10 @@

f_mt_call_establish(cpars);

-   /* Hold the call for some time */
+   log("Hold the call for some time");
f_sleep(3.0);

+   log("Hangup");
f_call_hangup(cpars, true);

setverdict(pass);
@@ -1462,9 +1464,10 @@

f_mo_call_establish(cpars);

-   /* Hold the call for some time */
+   log("Hold the call for some time");
f_sleep(3.0);

+   log("Hangup");
f_call_hangup(cpars, false);

setverdict(pass);

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6
Gerrit-Change-Number: 15941
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 )

Change subject: re-implement compare-results.sh as compare-results.py
..

re-implement compare-results.sh as compare-results.py

The compare-results.sh is annoyingly slow. Since our ttcn3 tests containers
support Python 2, re-implement in Python for much quicker evaluation.

Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6
---
A compare-results.py
D compare-results.sh
M start-testsuite.sh
3 files changed, 138 insertions(+), 214 deletions(-)

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



diff --git a/compare-results.py b/compare-results.py
new file mode 100755
index 000..d1adb20
--- /dev/null
+++ b/compare-results.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# Copyright 2018 sysmocom - s.f.m.c. GmbH
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import argparse
+import re
+
+doc = "Compare TTCN3 test run results with expected results by junit logs."
+
+# The nicest would be to use an XML library, but I don't want to introduce 
dependencies on the build slaves.
+re_testcase = re.compile(r'')
+re_testcase_end = re.compile(r'''(|]*/>)''')
+re_failure = re.compile(r'''(http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-usage() {
-  echo "
-Usage:
-
-  $(basename "$0") expected_results.junit-log current_results.junit-log 
[--allow-* [...]]
-
-Return 0 if the expected results match the current results exactly.
-
-  --allow-skip   Allow runnning less tests than are listed in the expected 
file.
- Default is to return failure on any skipped tests.
-  --allow-newAllow more test results than found in the expected file.
- Default is to return failure on any unknown tests.
-  --allow-xpass  If a test was expected to fail but passed, return success.
- Default is to return failure on any mismatch.
-"
-}
-
-if [ ! -f "$expected_file" ]; then
-  usage
-  echo "Expected file not found: '$expected_file'"
-  exit 1
-fi
-
-if [ ! -f "$results_file" ]; then
-  usage
-  echo "Current results file not found: '$results_file'"
-  exit 1
-fi
-
-shift
-shift
-
-allow_xpass=0
-allow_skip=0
-allow_new=0
-
-while test -n "$1"; do
-  arg="$1"
-  if [ "x$arg" = "x--allow-xpass" ]; then
-allow_xpass=1
-  elif [ "x$arg" = "x--allow-skip" ]; then
-allow_skip=1
-  elif [ "x$arg" = "x--allow-new" ]; then
-allow_new=1
-  else
-usage
-echo "Unknown argument: '$arg'"
-exit 1
-  fi
-  shift
-done
-
-echo "Comparing expected results $expected_file against results in 
$results_file
-"
-
-parse_testcase() {
-  line="$1"
-  suite_name="$(echo "$line" | sed 
's,.*classname='"'"'\([^'"'"']*\)'"'"'.*,\1,')"
-  test_name="$(echo "$line" | sed 's,.*\$')" ]; then
-test_result="pass"
-  else
-test_result="FAIL"
-  fi
-}
-
-pass=0
-xfail=0
-more_failures=0
-more_successes=0
-skipped=0
-new=0
-
-while read line; do
-  parse_testcase "$line"
-  exp_suite_name="$suite_name"
-  exp_test_name="$test_name"
-  exp_test_result="$test_result"
-  matched="0"
-
-  while read line; do
-parse_testcase "$line"
-if [ "x$exp_suite_name" != "x$suite_name" ]; then
-  continue
-fi
-if [ "x$exp_test_name" != "x$test_name" ]; then
-  continue
-fi
-
-if [ "x$exp_test_result" = "x$test_result" ]; then
-  if [ "x$exp_test_result" = "xFAIL" ]; then
-exp_test_result="xfail"
-   (( xfail += 1 ))
-  else
-(( pass += 1 ))
-  fi
-  echo "$exp_test_result $suite_name.$test_name"
-else
-  if [ "x$exp_test_result" = "xFAIL" ]; then
-exp_test_result="xfail"
-  fi
-  echo "$exp_test_result->$test_result $suite_name.$test_name"
-  if [ "x$test_result" = "xFAIL" ]; then
-(( more_failures += 1 ))
-  else
-   (( more_successes += 1 ))
-  fi
-fi
-matched="1"
-break
-  done <<< "$(grep "https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943
To unsubscribe, or for help writing mail filters, visit 

Change in osmo-ttcn3-hacks[master]: msc: add f_tc_invalid_mgcp_crash

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 )

Change subject: msc: add f_tc_invalid_mgcp_crash
..

msc: add f_tc_invalid_mgcp_crash

Make sure that osmo-msc doesn't crash if a successful CRCX response contains an
invalid IP address.

Originally/recently, osmo-msc did not validate the IP addresses at all. In an
intermediate patch I added error handling, releasing the call. That uncovered a
use-after-free problem in libosmo-mgcp-client. This problem is fixed by
osmo_fsm_set_dealloc_ctx() and an osmo-mgw fix (see
I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 in osmo-mgw).

Add this test to make sure the crash is not re-introduced.

Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 40 insertions(+), 0 deletions(-)

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



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index a1c8bd3..0846c04 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -711,6 +711,7 @@
   (f_mt_call and 
f_mt_call) */
boolean stop_after_cc_setup,/* Special case: stop 
call establish after CC Setup */
boolean ran_clear_when_alerting,/* Special case: send 
Clear upon CC Alerting */
+   boolean expect_release, /* Special case: expect 
call establish to cause direct CC Rel */

MgcpCallId mgcp_call_id optional,   /* MGCP Call ID; 
CallAgent allocated */
MgcpEndpoint mgcp_ep optional   /* MGCP Endpoint, 
CallAgent or MGW allocated */,
@@ -749,6 +750,7 @@
mgw_drop_dlcx := false,
stop_after_cc_setup := false,
ran_clear_when_alerting := false,
+   expect_release := false,
mgcp_call_id := omit,
mgcp_ep := "rtpbridge/1@mgw",
use_osmux := false,
@@ -1210,6 +1212,8 @@

tr_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?);

var default mdcx := 
activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, 
cpars.mgw_conn_2.mgw_rtp_port));
+   var boolean got_mncc_setup_compl_ind := false;
+   var boolean got_cc_connect := false;

interleave {
[] MNCC.receive(tr_MNCC_SETUP_ind(?, 
tr_MNCC_number(hex2str(cpars.called_party -> value mncc {
@@ -1347,15 +1351,27 @@

[] MNCC.receive(tr_MNCC_SETUP_COMPL_ind(?)) -> value mncc {
log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind");
+   got_mncc_setup_compl_ind := true;
+   if (not cpars.expect_release and got_cc_connect) {
+   break;
+   }
}

[] 
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) {
log("f_mo_call_establish 10: rx CC CONNECT");

BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id)));
+   got_cc_connect := true;
+   if (not cpars.expect_release and got_mncc_setup_compl_ind) {
+   break;
+   }
}

[] 
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) {
log("f_mo_call_establish 11: rx CC RELEASE");
+   if (not cpars.expect_release) {
+   setverdict(fail, "Got unexpected CC Release");
+   mtc.stop;
+   }
f_expect_clear();
break;
}
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 4ef592f..480ec96 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -5662,6 +5662,29 @@
vc_conn.done;
 }

+friend function f_tc_invalid_mgcp_crash(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   f_init_handler(pars);
+   var CallParameters cpars := valueof(t_CallParams('12345'H, 0));
+
+   /* Set invalid IP address so that osmo-msc discards the rtp_stream and 
MGCP endpoint FSM instances in the middle
+* of successful MGCP response dispatch. If things aren't safeguarded, 
the on_success() in osmo_mgcpc_ep_fsm
+* will cause a use-after-free after that event dispatch. */
+   cpars.mgw_conn_1.mgw_rtp_ip := "0.0.0.0";
+   cpars.mgw_conn_2.mgw_rtp_ip := "0.0.0.0";
+   cpars.rtp_sdp_format := "FOO/8000";
+   cpars.expect_release := true;
+
+   f_perform_lu();
+   f_mo_call_establish(cpars);
+}
+testcase TC_invalid_mgcp_crash() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_invalid_mgcp_crash), 7);
+   vc_conn.done;
+}
+
 control {
execute( TC_cr_before_reset() );
execute(

Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c()

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16159 )

Change subject: fix osmo_escape_str_c() and osmo_quote_str_c()
..

fix osmo_escape_str_c() and osmo_quote_str_c()

The osmo_escape_str_c() and osmo_quote_str_c() functions return truncated
results when characters need escaping. For example:

  osmo_quote_str_c(NULL, "foo"); --> "foo"
  osmo_quote_str_c(NULL, "foo\n"); --> "foo\n
  osmo_quote_str_c(NULL, "foo\tbar\t\n"); --> "foo\tbar\t

Implement these _c variants using OSMO_NAME_C_IMPL() to always allocate
sufficient memory.

However, current osmo_escape_str_buf2() and osmo_quote_str_buf2() fail to
return the required buffer size (even though that information is readily
avaiable), so these don't qualify for accurate use of OSMO_NAME_C_IMPL().

Hence, move the implementations of osmo_escape_str and osmo_quote_str to an
internal static function that returns the characters needed, so that all
dynamically allocating implementations can return un-truncated results.

Of course, external callers would also benefit from escape/quote API that
accurately returns the amount of characters needed, but I am not changing
public API in this patch, on purpose, ... yet.

Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8
---
M src/utils.c
1 file changed, 49 insertions(+), 31 deletions(-)

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



diff --git a/src/utils.c b/src/utils.c
index 6fc2ee6..904f6e4 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -668,13 +668,15 @@
 }

 /*! Return the string with all non-printable characters escaped.
+ * This internal function is the implementation for all osmo_escape_str* and 
osmo_quote_str* API versions.
+ * It provides a return value of characters-needed, to allow producing 
un-truncated strings in all cases.
  * \param[out] buf  string buffer to write escaped characters to.
  * \param[in] bufsize  sizeof(buf).
  * \param[in] str  A string that may contain any characters.
  * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length (also past nul chars).
- * \return The output buffer (buf).
+ * \return Number of characters that would be written if bufsize were large 
enough excluding '\0' (like snprintf()).
  */
-char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int 
in_len)
+static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, 
int in_len)
 {
struct osmo_strbuf sb = { .buf = buf, .len = bufsize };
int in_pos = 0;
@@ -729,6 +731,19 @@
}

 done:
+   return sb.chars_needed;
+}
+
+/*! Return the string with all non-printable characters escaped.
+ * \param[out] buf  string buffer to write escaped characters to.
+ * \param[in] bufsize  sizeof(buf).
+ * \param[in] str  A string that may contain any characters.
+ * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length (also past nul chars).
+ * \return The output buffer (buf).
+ */
+char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int 
in_len)
+{
+   _osmo_escape_str_buf(buf, bufsize, str, in_len);
return buf;
 }

@@ -750,10 +765,31 @@
  */
 char *osmo_escape_str_c(const void *ctx, const char *str, int in_len)
 {
-   char *buf = talloc_size(ctx, in_len+1);
-   if (!buf)
-   return NULL;
-   return osmo_escape_str_buf2(buf, in_len+1, str, in_len);
+   /* The string will be at least as long as in_len, but some characters 
might need escaping.
+* These extra bytes should catch most usual escaping situations, 
avoiding a second run in OSMO_NAME_C_IMPL. */
+   OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, 
in_len);
+}
+
+/*! Return a quoted and escaped representation of the string.
+ * This internal function is the implementation for all osmo_quote_str* API 
versions.
+ * It provides a return value of characters-needed, to allow producing 
un-truncated strings in all cases.
+ * \param[out] buf  string buffer to write escaped characters to.
+ * \param[in] bufsize  sizeof(buf).
+ * \param[in] str  A string that may contain any characters.
+ * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length (also past nul chars).
+ * \return Number of characters that would be written if bufsize were large 
enough excluding '\0' (like snprintf()).
+ */
+static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, 
int in_len)
+{
+   struct osmo_strbuf sb = { .buf = buf, .len = bufsize };
+   if (!str)
+   OSMO_STRBUF_PRINTF(sb, "NULL");
+   else {
+   OSMO_STRBUF_PRINTF(sb, "\"");
+   OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len);
+   OSMO_STRBUF_PRINTF(sb, "\"");
+   }
+   return sb.chars_needed;
 }

 /*! Like osmo_escape_str_buf2(), 

Change in osmo-ttcn3-hacks[master]: msc: add and fix Iu mt call

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 )

Change subject: msc: add and fix Iu mt call
..

msc: add and fix Iu mt call

Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
M msc/MSC_Tests_Iu.ttcn
3 files changed, 88 insertions(+), 11 deletions(-)

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



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 7bbae34..11f0a5f 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -905,21 +905,89 @@

}
} else {
-   var template TransportLayerAddress rab_tla := ? /* FIXME: 
encode the mgw_rtp_ip/mgw_rtp_port */
-   var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id 
:= ?, tla := rab_tla, binding_id := ?);
-
interleave {
[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
-   var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars));
-   MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, 
cpars.mgw_conn_2.mgcp_connection_id, sdp));
-   /* MSC acknowledges the MNCC_CREATE to the MNCC handler 
*/
-   MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref));
+   log("f_mt_call_complete 4.iu");
+   if (not f_handle_crcx(cpars, mgcp_cmd)) {
+   break;
}
-   [] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) {
-   //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME
}

-   /* FIXME: same MNCC and MGCP as in 2G above */
+   /* MSC acknowledges the MNCC_CREATE to the MNCC handler */
+   [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) {
+   log("f_mt_call_complete 5.iu");
+   }
+
+   [] BSSAP.receive(tr_RANAP_RabAssReq(?)) {
+   log("f_mt_call_complete 6.iu");
+   var RAB_SetupOrModifiedList l := {
+   {
+   {
+   id := 
id_RAB_SetupOrModifiedItem,
+   criticality := ignore,
+   value_ := {
+ rAB_SetupOrModifiedItem := {
+   rAB_ID := int2bit(23, 
8),
+   transportLayerAddress 
:= hex2bit( '350001c0a8021500'H),
+   iuTransportAssociation 
:= {
+   bindingID := 
'040c'O
+   },
+   dl_dataVolumes := omit,
+   iE_Extensions := omit
+   }
+   }
+   }
+   }
+   };
+   BSSAP.send(ts_RANAP_RabAssResp(l));
+
+   
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id)));
+   }
+
+   [] MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref)) {
+   log("f_mt_call_complete 7.iu");
+   MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref,
+ /* ip 42.23.11.5 */ 
hex2int('42231105'H),
+ /* port 423 */ 423,
+ /* payload type 3 = GSM 
FR */ 3));
+   }
+
+   /* MDCX setting up the RAN side remote RTP address received 
from Assignment Complete */
+   [] MGCP.receive(tr_MDCX) -> value mgcp_cmd {
+   log("f_mt_call_complete 8.iu");
+   var SDP_Message sdp := 
valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip,
+   
hex2str(cpars.mgcp_call_id), "42",
+   
cpars.mgw_conn_2.mgw_rtp_port,
+   { 
int2str(cpars.rtp_payload_type) },
+   { 
valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
+   

Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..

osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order

Of course both v4 and v6 addresses are kept in network byte order when
represented in bytes, but when writing, I somehow must have assumed that
inet_pton() returns host byte order. Fix that mixup in the API docs:

osmo_sockaddr_str_from_32() and osmo_sockaddr_str_to_32() actually use network
byte order.

osmo_sockaddr_str_from_32n() and osmo_sockaddr_str_to_32n() actually use host
byte order, though reflecting 'n' in their name.

sockaddr_str_test: use hexdump instead of %x to show the
osmo_sockaddr_str_to_32*() conversions so that the error becomes obvious.
(Printing %x reverses the bytes again and made it look correct.)

Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
---
M src/sockaddr_str.c
M tests/sockaddr_str/sockaddr_str_test.c
M tests/sockaddr_str/sockaddr_str_test.ok
3 files changed, 58 insertions(+), 54 deletions(-)

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



diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c
index 5c548b4..304363d 100644
--- a/src/sockaddr_str.c
+++ b/src/sockaddr_str.c
@@ -255,7 +255,7 @@
return 0;
 }

-/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and 
set port.
+/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, 
and set port.
  * \param[out] sockaddr_str  The instance to copy to.
  * \param[in] addr  32bit IPv4 address data.
  * \param[in] port  Port number.
@@ -270,7 +270,8 @@
return osmo_sockaddr_str_from_in_addr(sockaddr_str, &addr, port);
 }

-/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, 
and set port.
+/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and 
set port.
+ * For legacy reasons, this function has a misleading 'n' in its name.
  * \param[out] sockaddr_str  The instance to copy to.
  * \param[in] addr  32bit IPv4 address data.
  * \param[in] port  Port number.
@@ -376,9 +377,9 @@
return 0;
 }

-/*! Convert osmo_sockaddr_str address string to IPv4 address data in 
host-byte-order.
+/*! Convert osmo_sockaddr_str address string to IPv4 address data in 
network-byte-order.
  * \param[in] sockaddr_str  The instance to convert the IP of.
- * \param[out] dst  IPv4 address data in 32bit host-byte-order format to write 
to.
+ * \param[out] dst  IPv4 address data in 32bit network-byte-order format to 
write to.
  * \return 0 on success, negative on error (e.g. invalid IPv4 address string).
  */
 int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, 
uint32_t *ip)
@@ -396,9 +397,10 @@
return 0;
 }

-/*! Convert osmo_sockaddr_str address string to IPv4 address data in 
network-byte-order.
+/*! Convert osmo_sockaddr_str address string to IPv4 address data in 
host-byte-order.
+ * For legacy reasons, this function has a misleading 'n' in its name.
  * \param[in] sockaddr_str  The instance to convert the IP of.
- * \param[out] dst  IPv4 address data in 32bit network-byte-order format to 
write to.
+ * \param[out] dst  IPv4 address data in 32bit host-byte-order format to write 
to.
  * \return 0 on success, negative on error (e.g. invalid IPv4 address string).
  */
 int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, 
uint32_t *ip)
diff --git a/tests/sockaddr_str/sockaddr_str_test.c 
b/tests/sockaddr_str/sockaddr_str_test.c
index 7d8fe4f..7e015ce 100644
--- a/tests/sockaddr_str/sockaddr_str_test.c
+++ b/tests/sockaddr_str/sockaddr_str_test.c
@@ -149,7 +149,8 @@
uint32_t a = 0;

rc = osmo_sockaddr_str_to_32(x, &a);
-   printf("  osmo_sockaddr_str_to_32() %s 
uint32_t=0x%x\n", rc_name(rc), a);
+   printf("  osmo_sockaddr_str_to_32() %s uint8_t[4]=[ 
%s]\n", rc_name(rc),
+  osmo_hexdump((void*)&a, sizeof(a)));

if (rc == 0) {
struct osmo_sockaddr_str back;
@@ -165,7 +166,8 @@
uint32_t a = 0;

rc = osmo_sockaddr_str_to_32n(x, &a);
-   printf("  osmo_sockaddr_str_to_32n() %s 
uint32_t=0x%x\n", rc_name(rc), a);
+   printf("  osmo_sockaddr_str_to_32n() %s uint8_t[4]=[ 
%s]\n", rc_name(rc),
+  osmo_hexdump((void*)&a, sizeof(a)));

if (rc == 0) {
struct osmo_sockaddr_str back;
diff --git a/tests/sockaddr_str/sockaddr_str_test.ok 
b/tests/sockaddr_str/sockaddr_str_test.ok
index 31f630f..33d9d7e 100644
--- a/tests/sockaddr_str/sockaddr_str_tes

Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16157 )

Change subject: fix DLSMS logging category color: '[1:38m' isn't actually 
defined
..

fix DLSMS logging category color: '[1:38m' isn't actually defined

Instead it apparently renders as bright white, so just use that constant
instead.

Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2
---
M src/logging.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/logging.c b/src/logging.c
index 7baa777..4d6224d 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -163,7 +163,7 @@
.name = "DLSMS",
.description = "Layer3 Short Message Service (SMS)",
.enabled = 1, .loglevel = LOGL_NOTICE,
-   .color = "\033[1;38m",
+   .color = OSMO_LOGCOLOR_BRIGHTWHITE,
},
[INT2IDX(DLCTRL)] = {
.name = "DLCTRL",

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2
Gerrit-Change-Number: 16157
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: logging.h: define ansi color constants

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16156 )

Change subject: logging.h: define ansi color constants
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
Gerrit-Change-Number: 16156
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16157 )

Change subject: fix DLSMS logging category color: '[1:38m' isn't actually 
defined
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2
Gerrit-Change-Number: 16157
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: logging.h: define ansi color constants

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16156 )

Change subject: logging.h: define ansi color constants
..

logging.h: define ansi color constants

It's hard to figure out what color logging categories have with those ANSI
color code strings. Instead, define these OSMO_LOGCOLOR_* constants.

Naming: commonly, the logging.h header has the "LOG" prefix in the name, but it
seems saner to include the OSMO_ prefix: it seems too likely that some
libosmocore user somewhere already has defined "LOGCOLOR_RED" somewhere.

Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
---
M include/osmocom/core/logging.h
M src/logging.c
M tests/logging/logging_test.c
M tests/loggingrb/loggingrb_test.c
4 files changed, 33 insertions(+), 14 deletions(-)

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



diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 139d291..75650ba 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -127,6 +127,25 @@
 #define DLRSPRO-19 /*!< Osmocom Remote SIM Protocol */
 #define OSMO_NUM_DLIB  19  /*!< Number of logging sub-systems in libraries 
*/

+/* Colors that can be used in log_info_cat.color */
+#define OSMO_LOGCOLOR_NORMAL NULL
+#define OSMO_LOGCOLOR_RED "\033[1;31m"
+#define OSMO_LOGCOLOR_GREEN "\033[1;32m"
+#define OSMO_LOGCOLOR_YELLOW "\033[1;33m"
+#define OSMO_LOGCOLOR_BLUE "\033[1;34m"
+#define OSMO_LOGCOLOR_PURPLE "\033[1;35m"
+#define OSMO_LOGCOLOR_CYAN "\033[1;36m"
+#define OSMO_LOGCOLOR_DARKRED "\033[31m"
+#define OSMO_LOGCOLOR_DARKGREEN "\033[32m"
+#define OSMO_LOGCOLOR_DARKYELLOW "\033[33m"
+#define OSMO_LOGCOLOR_DARKBLUE "\033[34m"
+#define OSMO_LOGCOLOR_DARKPURPLE "\033[35m"
+#define OSMO_LOGCOLOR_DARKCYAN "\033[36m"
+#define OSMO_LOGCOLOR_DARKGREY "\033[1;30m"
+#define OSMO_LOGCOLOR_GREY "\033[37m"
+#define OSMO_LOGCOLOR_BRIGHTWHITE "\033[1;37m"
+#define OSMO_LOGCOLOR_END "\033[0;m"
+
 /*! Configuration of single log category / sub-system */
 struct log_category {
uint8_t loglevel;   /*!< configured log-level */
diff --git a/src/logging.c b/src/logging.c
index b030f8a..7baa777 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -344,11 +344,11 @@
 }

 static const struct value_string level_colors[] = {
-   { LOGL_DEBUG, "\033[1;34m" },
-   { LOGL_INFO, "\033[1;32m" },
-   { LOGL_NOTICE, "\033[1;33m" },
-   { LOGL_ERROR, "\033[1;31m" },
-   { LOGL_FATAL, "\033[1;31m" },
+   { LOGL_DEBUG, OSMO_LOGCOLOR_BLUE },
+   { LOGL_INFO, OSMO_LOGCOLOR_GREEN },
+   { LOGL_NOTICE, OSMO_LOGCOLOR_YELLOW },
+   { LOGL_ERROR, OSMO_LOGCOLOR_RED },
+   { LOGL_FATAL, OSMO_LOGCOLOR_RED },
{ 0, NULL }
 };

@@ -428,7 +428,7 @@
ret = snprintf(buf + offset, rem, "%s%s%s%s ",
   target->use_color ? level_color(level) : 
"",
   log_category_name(subsys),
-  target->use_color ? "\033[0;m" : "",
+  target->use_color ? OSMO_LOGCOLOR_END : 
"",
   c_subsys ? c_subsys : "");
if (ret < 0)
goto err;
@@ -438,7 +438,7 @@
ret = snprintf(buf + offset, rem, "%s%s%s%s ",
   target->use_color ? level_color(level) : 
"",
   log_level_str(level),
-  target->use_color ? "\033[0;m" : "",
+  target->use_color ? OSMO_LOGCOLOR_END : 
"",
   c_subsys ? c_subsys : "");
if (ret < 0)
goto err;
@@ -501,7 +501,7 @@
}

if (target->use_color) {
-   ret = snprintf(buf + offset, rem, "\033[0;m");
+   ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
diff --git a/tests/logging/logging_test.c b/tests/logging/logging_test.c
index 8fd71d0..b9cb57f 100644
--- a/tests/logging/logging_test.c
+++ b/tests/logging/logging_test.c
@@ -37,19 +37,19 @@
[DRLL] = {
.name = "DRLL",
.description = "A-bis Radio Link Layer (RLL)",
-   .color = "\033[1;31m",
+   .color = OSMO_LOGCOLOR_RED,
.enabled = 1, .loglevel = LOGL_NOTICE,
},
[DCC] = {
.name = "DCC",
.description = "Layer3 Call Control (CC)",
-   .color = "\033[1;32m",
+   .color = OSMO_LOGCOLOR_GREEN,
.enabled = 1, .loglevel = LOGL_N

Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c()

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16159 )

Change subject: fix osmo_escape_str_c() and osmo_quote_str_c()
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8
Gerrit-Change-Number: 16159
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code)

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 )

Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code)
..


Patch Set 1: Code-Review+2

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn
File library/VPCD_CodecPort_CtrlFunct.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn@3
PS1, Line 3:   import from VPCD_CodecPort all;
> Usually we put all these lines without indentation right?
Yes, but this is a copy+paste from many other *_CodecPort_CtrlFunct which is 
originally generated from the IPL4 port of Titan.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc
File library/VPCD_CodecPort_CtrlFunctDef.cc:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc@16
PS1, Line 16:  
> whitespace, not sure if this is somehow autogenrated.
yes, it is.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb
Gerrit-Change-Number: 16175
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:57:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 )

Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number 
fields
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1
Gerrit-Change-Number: 16081
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:57:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 )

Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg
..

REMSIM_Tests: Fix REMSIM_Tests.cfg

Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
---
M remsim/REMSIM_Tests.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg
index b2dd9b2..36b0952 100644
--- a/remsim/REMSIM_Tests.cfg
+++ b/remsim/REMSIM_Tests.cfg
@@ -4,7 +4,7 @@
 # testsuite specific configuration, not expected to change
 "./REMSIM_Tests.default"

-[CONTROL]
+[EXECUTE]
 RemsimServer_Tests.control
 #RemsimBankd_Tests.control
 #RemsimClient_Tests.control

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
Gerrit-Change-Number: 16174
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code)

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 )

Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code)
..

VPCD protocol support (for vsmartcard.git PCD/PICC code)

vsmartcard.git contains an implementation of a virtual card reader
(vpcd) which registers with PC/SC (such as pcsc-lite).  It simply
binds to a TCP port and waits for a TCP client to connect to it,
implementing APDU transfer over TCP.

This code implements the related protocol as a TTCN-3 test port
for Eclipse TITAN, which will enable us to implement a 'virtual smart
card' in TTCN-3 tets cases, primarily for testing remsim-bankd at
this point.

Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb
---
A library/VPCD_Adapter.ttcn
A library/VPCD_CodecPort.ttcn
A library/VPCD_CodecPort_CtrlFunct.ttcn
A library/VPCD_CodecPort_CtrlFunctDef.cc
A library/VPCD_Types.ttcn
5 files changed, 330 insertions(+), 0 deletions(-)

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



diff --git a/library/VPCD_Adapter.ttcn b/library/VPCD_Adapter.ttcn
new file mode 100644
index 000..289be06
--- /dev/null
+++ b/library/VPCD_Adapter.ttcn
@@ -0,0 +1,73 @@
+module VPCD_Adapter {
+
+/* VPCD Adapter layer, sitting on top of VPCD_CodecPort.
+ * test suites can 'inherit' in order to have a VPCD connection to the IUT 
which they're testing
+ *
+ * (C) 2018-2019 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ */
+
+import from VPCD_Types all;
+import from VPCD_CodecPort all;
+import from VPCD_CodecPort_CtrlFunct all;
+import from IPL4asp_Types all;
+import from IPL4asp_PortType all;
+import from Socket_API_Definitions all;
+
+modulepar {
+   integer mp_vpcd_port := 35963;
+   charstring mp_vpcd_host := "127.0.0.1";
+}
+
+type component VPCD_Adapter_CT {
+   port VPCD_CODEC_PT VPCD;
+   var integer g_vpcd_conn_id;
+};
+
+
+private function f_set_tcp_segmentation() runs on VPCD_Adapter_CT {
+   /* Set function for dissecting the binary stream into packets */
+   var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen);
+   /* Offset: 0, size of length: 2, delta: 0, multiplier: 1, big-endian: 0 
*/
+   VPCD_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(VPCD, g_vpcd_conn_id, 
vl_f, {0, 2, 2, 1, 0});
+}
+
+function f_connect(charstring remote_host := mp_vpcd_host, integer remote_port 
:= mp_vpcd_port)
+runs on VPCD_Adapter_CT {
+   var IPL4asp_Types.Result res;
+   map(self:VPCD, system:VPCD);
+   res := VPCD_CodecPort_CtrlFunct.f_IPL4_connect(VPCD, remote_host, 
remote_port, "", 0, 0,
+   { tcp := {} });
+   if (not ispresent(res.connId)) {
+   setverdict(fail, "Could not connect to VPCD at ", remote_host, 
":", remote_port,
+   ", check your configuration");
+   mtc.stop;
+   }
+   g_vpcd_conn_id := res.connId;
+   f_set_tcp_segmentation();
+}
+
+function f_bind(charstring local_host, IPL4asp_Types.PortNumber local_port)
+runs on VPCD_Adapter_CT {
+   var IPL4asp_Types.Result res;
+   map(self:VPCD, system:VPCD);
+   res := VPCD_CodecPort_CtrlFunct.f_IPL4_listen(VPCD, local_host, 
local_port, { tcp:={} });
+   g_vpcd_conn_id := res.connId;
+   f_set_tcp_segmentation();
+}
+
+function f_vpcd_send(template (value) VPCD_PDU pdu) runs on VPCD_Adapter_CT {
+   VPCD.send(ts_VPCD_Send(g_vpcd_conn_id, pdu));
+}
+
+function f_vpcd_exp(template VPCD_PDU exp) runs on VPCD_Adapter_CT return 
VPCD_PDU {
+   var VPCD_RecvFrom rf;
+   VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, exp)) -> value rf;
+   return rf.msg;
+}
+
+
+}
diff --git a/library/VPCD_CodecPort.ttcn b/library/VPCD_CodecPort.ttcn
new file mode 100644
index 000..a9ae97f
--- /dev/null
+++ b/library/VPCD_CodecPort.ttcn
@@ -0,0 +1,64 @@
+module VPCD_CodecPort {
+
+/* Simple VPCD Codec Port, translating between raw TCP octetstring payload
+ * towards the IPL4asp port provider, and VPCD primitives
+ * which carry the decoded VPCD data types as payload.
+ *
+ * (C) 2018 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ */
+
+
+import from IPL4asp_PortType all;
+import from IPL4asp_Types all;
+import from VPCD_Types all;
+
+type record VPCD_RecvFrom {
+   ConnectionIdconnId,
+   VPCD_PDUmsg
+}
+
+type record VPCD_Send {
+   ConnectionIdconnId,
+   VPCD_PDUmsg
+}
+
+template (value) VPCD_Send ts_VPCD_Send(ConnectionId conn_id, template (value) 
VPCD_PDU msg) := {
+   connId := conn_id,
+   msg := msg
+}
+
+template VPCD_RecvFrom tr_VPCD_Recv(template Connection

Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 )

Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number 
fields
..

library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields

Since there can be multiple PDCH channels configured on different
timeslots, different TRXes, and BTSes, the PTCCH/U handling code
in OsmoPCU needs to know the exact origin of a given RACH.ind.

Otherwise, it is not known which subscriber originated a given
PTCCH/U indication, and hence it is impossible to send PTCCH/D
Timing Advance notification properly.

Fortunately, we can extend the RACH.ind message without even
bumping the protocol version, because every single PDU has a
fixed size defined by the largest message - INFO.ind. In case
if the actual message payload is smaller, the rest is filled
with a constant padding byte (0x00).

Older versions of OsmoPCU will consider the new fields as padding,
while the messages from older OsmoBTS versions will always have
both fields set to 0x00. Since C0/TS0 cannot be configured to
PDCH, this can be easily detected on the other end.

Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1
Related: OS#4102, OS#1545
---
M bts/BTS_Tests.ttcn
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
M pcu/PCU_Tests_RAW_SNS.ttcn
4 files changed, 24 insertions(+), 13 deletions(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 87c9131..779f7c3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4170,8 +4170,8 @@
   chan_nr := ts_RslChanNr_PDCH(7),
   link_id := ts_RslLinkID_OSMO_PTCCH(0));

-   /* TODO: check time-slot and TRX number as soon as we extend the PCU 
interface */
-   pcu_rach_ind := tr_PCUIF_RACH_IND(ra := ra, fn := fn, sapi := 
PCU_IF_SAPI_PTCCH);
+   pcu_rach_ind := tr_PCUIF_RACH_IND(bts_nr := 0, trx_nr := 0, ts_nr := 7,
+ ra := ra, fn := fn, sapi := 
PCU_IF_SAPI_PTCCH);

/* Expect a RACH.ind on the PCU interface (timeout is one multi-frame) 
*/
T.start(52.0 * 4.615 / 1000.0);
@@ -4333,7 +4333,7 @@
timer T := 2.0;
T.start;
alt {
-   [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, 
oct2int(ra), 0, ?, fn))) {
+   [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, 
0, 0, oct2int(ra), 0, ?, fn))) {
T.stop;
}
[] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND)) {
@@ -4382,7 +4382,7 @@

/* Compose the expected message */
pcu_rach_ind := tr_PCUIF_RACH_IND(
-   bts_nr := 0,
+   bts_nr := 0, trx_nr := 0, ts_nr := 0,
ra := bit2int(ra11),
is_11bit := 1,
burst_type := pcu_bt,
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index ae0762a..8ce41c4 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -130,7 +130,9 @@
uint32_tfn,
uint16_tarfcn,
uint8_t is_11bit,
-   PCUIF_BurstType burst_type
+   PCUIF_BurstType burst_type,
+   uint8_t trx_nr,
+   uint8_t ts_nr
 } with { variant "" };

 type record PCUIF_InfoTrx {
@@ -565,6 +567,8 @@
 }

 template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t 
bts_nr,
+template (value) uint8_t 
trx_nr,
+template (value) uint8_t ts_nr,
 template (value) uint16_t ra,
 template (value) uint8_t 
is_11bit,
 template (value) 
PCUIF_BurstType burst_type,
@@ -584,11 +588,15 @@
fn := fn,
arfcn := arfcn,
is_11bit := is_11bit,
-   burst_type := burst_type
+   burst_type := burst_type,
+   trx_nr := trx_nr,
+   ts_nr := ts_nr
}
}
 }
 template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?,
+template uint8_t trx_nr := ?,
+template uint8_t ts_nr := ?,
 template uint16_t ra := ?,
 template uint8_t is_11bit := ?,
 template PCUIF_BurstType burst_type := 
?,
@@ -605,7 +613,9 @@
   

Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..


Patch Set 3:

It seems we have a variety of osmo-bts-master build failures that may be 
related to this: 
https://jenkins.osmocom.org/jenkins/view/All%20no%20Gerrit/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=femtobts_v2.7,WITH_MANUALS=1,a4=default,label=osmocom-master-debian9/2970/console


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:55:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/16172 )

Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939
Gerrit-Change-Number: 16172
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 23 Nov 2019 07:52:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code)

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 )

Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code)
..


Patch Set 1: Code-Review+1

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn
File library/VPCD_CodecPort_CtrlFunct.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn@3
PS1, Line 3:   import from VPCD_CodecPort all;
Usually we put all these lines without indentation right?


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc
File library/VPCD_CodecPort_CtrlFunctDef.cc:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc@16
 
PS1, Line 16:
whitespace, not sure if this is somehow autogenrated.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb
Gerrit-Change-Number: 16175
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 22:55:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 )

Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
Gerrit-Change-Number: 16174
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 22:50:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg

2019-11-22 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 )


Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg
..

REMSIM_Tests: Fix REMSIM_Tests.cfg

Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
---
M remsim/REMSIM_Tests.cfg
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg
index b2dd9b2..36b0952 100644
--- a/remsim/REMSIM_Tests.cfg
+++ b/remsim/REMSIM_Tests.cfg
@@ -4,7 +4,7 @@
 # testsuite specific configuration, not expected to change
 "./REMSIM_Tests.default"

-[CONTROL]
+[EXECUTE]
 RemsimServer_Tests.control
 #RemsimBankd_Tests.control
 #RemsimClient_Tests.control

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
Gerrit-Change-Number: 16174
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code)

2019-11-22 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 )


Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code)
..

VPCD protocol support (for vsmartcard.git PCD/PICC code)

vsmartcard.git contains an implementation of a virtual card reader
(vpcd) which registers with PC/SC (such as pcsc-lite).  It simply
binds to a TCP port and waits for a TCP client to connect to it,
implementing APDU transfer over TCP.

This code implements the related protocol as a TTCN-3 test port
for Eclipse TITAN, which will enable us to implement a 'virtual smart
card' in TTCN-3 tets cases, primarily for testing remsim-bankd at
this point.

Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb
---
A library/VPCD_Adapter.ttcn
A library/VPCD_CodecPort.ttcn
A library/VPCD_CodecPort_CtrlFunct.ttcn
A library/VPCD_CodecPort_CtrlFunctDef.cc
A library/VPCD_Types.ttcn
5 files changed, 330 insertions(+), 0 deletions(-)



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

diff --git a/library/VPCD_Adapter.ttcn b/library/VPCD_Adapter.ttcn
new file mode 100644
index 000..289be06
--- /dev/null
+++ b/library/VPCD_Adapter.ttcn
@@ -0,0 +1,73 @@
+module VPCD_Adapter {
+
+/* VPCD Adapter layer, sitting on top of VPCD_CodecPort.
+ * test suites can 'inherit' in order to have a VPCD connection to the IUT 
which they're testing
+ *
+ * (C) 2018-2019 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ */
+
+import from VPCD_Types all;
+import from VPCD_CodecPort all;
+import from VPCD_CodecPort_CtrlFunct all;
+import from IPL4asp_Types all;
+import from IPL4asp_PortType all;
+import from Socket_API_Definitions all;
+
+modulepar {
+   integer mp_vpcd_port := 35963;
+   charstring mp_vpcd_host := "127.0.0.1";
+}
+
+type component VPCD_Adapter_CT {
+   port VPCD_CODEC_PT VPCD;
+   var integer g_vpcd_conn_id;
+};
+
+
+private function f_set_tcp_segmentation() runs on VPCD_Adapter_CT {
+   /* Set function for dissecting the binary stream into packets */
+   var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen);
+   /* Offset: 0, size of length: 2, delta: 0, multiplier: 1, big-endian: 0 
*/
+   VPCD_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(VPCD, g_vpcd_conn_id, 
vl_f, {0, 2, 2, 1, 0});
+}
+
+function f_connect(charstring remote_host := mp_vpcd_host, integer remote_port 
:= mp_vpcd_port)
+runs on VPCD_Adapter_CT {
+   var IPL4asp_Types.Result res;
+   map(self:VPCD, system:VPCD);
+   res := VPCD_CodecPort_CtrlFunct.f_IPL4_connect(VPCD, remote_host, 
remote_port, "", 0, 0,
+   { tcp := {} });
+   if (not ispresent(res.connId)) {
+   setverdict(fail, "Could not connect to VPCD at ", remote_host, 
":", remote_port,
+   ", check your configuration");
+   mtc.stop;
+   }
+   g_vpcd_conn_id := res.connId;
+   f_set_tcp_segmentation();
+}
+
+function f_bind(charstring local_host, IPL4asp_Types.PortNumber local_port)
+runs on VPCD_Adapter_CT {
+   var IPL4asp_Types.Result res;
+   map(self:VPCD, system:VPCD);
+   res := VPCD_CodecPort_CtrlFunct.f_IPL4_listen(VPCD, local_host, 
local_port, { tcp:={} });
+   g_vpcd_conn_id := res.connId;
+   f_set_tcp_segmentation();
+}
+
+function f_vpcd_send(template (value) VPCD_PDU pdu) runs on VPCD_Adapter_CT {
+   VPCD.send(ts_VPCD_Send(g_vpcd_conn_id, pdu));
+}
+
+function f_vpcd_exp(template VPCD_PDU exp) runs on VPCD_Adapter_CT return 
VPCD_PDU {
+   var VPCD_RecvFrom rf;
+   VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, exp)) -> value rf;
+   return rf.msg;
+}
+
+
+}
diff --git a/library/VPCD_CodecPort.ttcn b/library/VPCD_CodecPort.ttcn
new file mode 100644
index 000..a9ae97f
--- /dev/null
+++ b/library/VPCD_CodecPort.ttcn
@@ -0,0 +1,64 @@
+module VPCD_CodecPort {
+
+/* Simple VPCD Codec Port, translating between raw TCP octetstring payload
+ * towards the IPL4asp port provider, and VPCD primitives
+ * which carry the decoded VPCD data types as payload.
+ *
+ * (C) 2018 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ */
+
+
+import from IPL4asp_PortType all;
+import from IPL4asp_Types all;
+import from VPCD_Types all;
+
+type record VPCD_RecvFrom {
+   ConnectionIdconnId,
+   VPCD_PDUmsg
+}
+
+type record VPCD_Send {
+   ConnectionIdconnId,
+   VPCD_PDUmsg
+}
+
+template (value) VPCD_Send ts_VPCD_Send(ConnectionId conn_id, template (value) 
VPCD_PDU msg) := {
+   connId := conn_id,
+   msg := msg
+}
+
+template VPCD_RecvFrom tr_VPCD_Recv(template ConnectionId conn_id, template 
VPCD_PDU msg) := {

Change in osmo-gsm-tester[master]: WIP

2019-11-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 )


Change subject: WIP
..

WIP

Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a
---
M example/resources.conf.prod
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/process.py
M src/osmo_gsm_tester/resource.py
4 files changed, 71 insertions(+), 26 deletions(-)



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

diff --git a/example/resources.conf.prod b/example/resources.conf.prod
index 0bf9f45..826ed4f 100644
--- a/example/resources.conf.prod
+++ b/example/resources.conf.prod
@@ -62,6 +62,22 @@
 trx_ip: 10.42.42.117
 clock_reference: external
 dev_args: "LimeSDR-USB,serial=00090706024F0A22"
+channels:
+  - rx_path: "LNAW"
+
+- label: LimeNET-Micro
+  type: osmo-bts-trx
+  ipa_unit_id: 15
+  addr: 10.42.42.53
+  band: GSM-1800
+  ciphers: [a5_0, a5_1]
+  osmo_trx:
+type: lms
+launch_trx: true
+remote_user: pi
+trx_ip: 10.42.42.123
+clock_reference: external
+dev_args: "LimeNET-Micro,serial=005839AF25B352"

 - label: sysmoCell 5000
   type: osmo-bts-trx
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index 554a236..0578259 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -295,35 +295,55 @@
 os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC)
 return wrapper_script

+def inst_compatible_for_remote(self):
+proc = process.run_remote_sync(self.run_dir, self.remote_user, 
self.listen_ip, 'uname-m', ('uname', '-m'))
+if "x86_64" in (proc.get_stdout() or ''):
+return True
+return False
+
+def start_remotely(self, keepalive):
+# Run remotely through ssh. We need to run osmo-trx under a wrapper
+# script since osmo-trx ignores SIGHUP and will keep running after
+# we close local ssh session. The wrapper script catches SIGHUP and
+# sends SIGINT to it.
+remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR)
+remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX)
+
+have_inst = self.inst_compatible_for_remote()
+if have_inst:
+self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx')))
+
+# if self.inst is None, we still want to copy config file, create 
remote run dir, etc.
+self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, 
remote_run_dir, self.remote_user,
+ self.listen_ip, 
self.binary_name(), self.config_file)
+
+wrapper_script = self.generate_wrapper_script()
+remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT)
+process.scp(self.run_dir, self.remote_user, self.listen_ip, 
'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script)
+
+if have_inst:
+remote_lib = self.remote_inst.child('lib')
+remote_binary = self.remote_inst.child('bin', self.binary_name())
+args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, 
remote_binary, '-C', remote_config_file)
+else: # Use whatever is available i nremote system PATH:
+args = (remote_wrapper_script, self.binary_name(), '-C', 
remote_config_file)
+
+self.proc_trx = self.launch_process_remote(self.binary_name(), args, 
remote_cwd=remote_run_dir, keepalive=keepalive)
+
 ##
 # PUBLIC (test API included)
 ##
 def start(self, keepalive=False):
 self.configure()
+if self.remote_user:
+self.start_remotely(keepalive)
+return
+# Run locally if ssh user is not set
 self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx')))
-if not self.remote_user:
-# Run locally if ssh user is not set
-lib = self.inst.child('lib')
-self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
-self.proc_trx = self.launch_process_local(keepalive, 
self.binary_name(),
-'-C', 
os.path.abspath(self.config_file))
-else:
-# Run remotely through ssh. We need to run osmo-trx under a wrapper
-# script since osmo-trx ignores SIGHUP and will keep running after
-# we close local ssh session. The wrapper script catches SIGHUP and
-# sends SIGINT to it.
-wrapper_script = self.generate_wrapper_script()
-remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR)
-self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, 
remote_run_dir, self.remote_user,
-self.listen_ip, 
self.binary_name(), self.config_file)
-remote_wrapper_script = 
remote_run_dir.child(OsmoTrx.WRAP

Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/16172 )

Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939
Gerrit-Change-Number: 16172
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 18:52:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries

2019-11-22 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/16172 )


Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries
..

counters: clarify documentation for some MSC_CTR_SMS_* entries

Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939
Related: OS#4273
---
M doc/manuals/chapters/counters_generated.adoc
M include/osmocom/msc/gsm_data.h
2 files changed, 6 insertions(+), 6 deletions(-)



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

diff --git a/doc/manuals/chapters/counters_generated.adoc 
b/doc/manuals/chapters/counters_generated.adoc
index 1b40d8b..4a92e79 100644
--- a/doc/manuals/chapters/counters_generated.adoc
+++ b/doc/manuals/chapters/counters_generated.adoc
@@ -23,9 +23,9 @@
 | sms:submitted | <> | Received a RPDU from a MS (MO).
 | sms:no_receiver | <> | Counts SMS which couldn't routed 
because no receiver found.
 | sms:delivered | <> | Global SMS Deliver attempts.
-| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS 
responses on a sms deliver attempt.
-| sms:rp_err_other | <> | Other error of MS responses on 
a sms delive attempt.
-| sms:deliver_unknown_error | <> | Unknown 
error occurred during sms delivery.
+| sms:rp_err_mem | <> | Failed MT SMS delivery attempts 
(no memory).
+| sms:rp_err_other | <> | Failed MT SMS delivery 
attempts (other reason).
+| sms:deliver_unknown_error | <> | Failed MO 
SMS delivery attempts.
 | call:mo_setup | <> | Received setup requests from a MS to 
init a MO call.
 | call:mo_connect_ack | <> | Received a connect ack 
from MS of a MO call. Call is now succesful connected up.
 | call:mt_setup | <> | Sent setup requests to the MS (MT).
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 11b6e82..0ff0d4e 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -78,9 +78,9 @@
[MSC_CTR_SMS_SUBMITTED] =   {"sms:submitted", "Received a 
RPDU from a MS (MO)."},
[MSC_CTR_SMS_NO_RECEIVER] = {"sms:no_receiver", "Counts SMS 
which couldn't routed because no receiver found."},
[MSC_CTR_SMS_DELIVERED] =   {"sms:delivered", "Global SMS 
Deliver attempts."},
-   [MSC_CTR_SMS_RP_ERR_MEM] =  {"sms:rp_err_mem", 
"CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."},
-   [MSC_CTR_SMS_RP_ERR_OTHER] ={"sms:rp_err_other", "Other 
error of MS responses on a sms delive attempt."},
-   [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] =   {"sms:deliver_unknown_error", 
"Unknown error occurred during sms delivery."},
+   [MSC_CTR_SMS_RP_ERR_MEM] =  {"sms:rp_err_mem", "Failed MT 
SMS delivery attempts (no memory)."},
+   [MSC_CTR_SMS_RP_ERR_OTHER] ={"sms:rp_err_other", "Failed MT 
SMS delivery attempts (other reason)."},
+   [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] =   {"sms:deliver_unknown_error", 
"Failed MO SMS delivery attempts."},
/* FIXME: count also sms delivered */
[MSC_CTR_CALL_MO_SETUP] =   {"call:mo_setup", "Received 
setup requests from a MS to init a MO call."},
[MSC_CTR_CALL_MO_CONNECT_ACK] = {"call:mo_connect_ack", 
"Received a connect ack from MS of a MO call. Call is now succesful connected 
up."},

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939
Gerrit-Change-Number: 16172
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 )

Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number 
fields
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1
Gerrit-Change-Number: 16081
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 17:51:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: libosmogsm: add support for XOR authentication

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/7310 )

Change subject: libosmogsm: add support for XOR authentication
..


Patch Set 5: Verified+1 Code-Review+2

> > [...] and the card is broken.
 >
 > Are you testing on sysmoUSIM-SJS1?

no, a new product called sysmoTSIM-SJA1. And with an update to the card I just 
verified that this patch is correct.

 > Are you sure sysmoUSIM-SJS1 actually does
 > support XOR?

no, it seems broken, unfortunately.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565
Gerrit-Change-Number: 7310
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Fri, 22 Nov 2019 17:39:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: libosmogsm: add support for XOR authentication

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/7310 )

Change subject: libosmogsm: add support for XOR authentication
..

libosmogsm: add support for XOR authentication

Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565
Related: OS#2475
---
M src/gsm/Makefile.am
A src/gsm/auth_xor.c
2 files changed, 188 insertions(+), 1 deletion(-)

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



diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 0aa0de3..f13ba9d 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -26,7 +26,7 @@
gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c 
gsm0502.c \
gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c gsm0414.c \
lapd_core.c lapdm.c kasumi.c gsm29205.c 
gsm_04_08_gprs.c \
-   auth_core.c auth_comp128v1.c auth_comp128v23.c \
+   auth_core.c auth_comp128v1.c auth_comp128v23.c 
auth_xor.c \
auth_milenage.c milenage/aes-encblock.c gea.c \
milenage/aes-internal.c milenage/aes-internal-enc.c \
milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \
diff --git a/src/gsm/auth_xor.c b/src/gsm/auth_xor.c
new file mode 100644
index 000..36e006e
--- /dev/null
+++ b/src/gsm/auth_xor.c
@@ -0,0 +1,187 @@
+/*! \file auth_xor.c
+ * GSM/GPRS/3G authentication core infrastructure */
+/*
+ * (C) 2018 by Harald Welte 
+ * (C) 2017 by sysmocom s.f.m.c. GmbH
+ *
+ * All Rights Reserved
+ *
+ * Author: Daniel Willmann 
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+/*! \addtogroup auth
+ *  @{
+ */
+
+static void xor(uint8_t *out, const uint8_t *a, const uint8_t *b, size_t len)
+{
+   size_t i;
+
+   for (i = 0; i < len; i++)
+   out[i] = a[i] ^ b[i];
+}
+
+/* 3GPP TS 34.108, section 8.1.2.1 */
+static int xor_gen_vec(struct osmo_auth_vector *vec,
+  struct osmo_sub_auth_data *aud,
+  const uint8_t *_rand)
+{
+   uint8_t xdout[16], cdout[8];
+   uint8_t ak[6], xmac[8];
+   int i;
+
+   /* Step 1: xdout = (ki or k) ^ rand */
+   if (aud->type == OSMO_AUTH_TYPE_GSM)
+   xor(xdout, aud->u.gsm.ki, _rand, sizeof(xdout));
+   else if (aud->type == OSMO_AUTH_TYPE_UMTS)
+   xor(xdout, aud->u.umts.k, _rand, sizeof(xdout));
+   else
+   return -ENOTSUP;
+
+   /**
+* Step 2: res = xdout
+*
+* Suggested length for res is 128 bits, i.e. 16 bytes,
+* but also can be in range: 30 < n < 128 bits.
+*/
+   memcpy(vec->res, xdout, sizeof(xdout));
+   vec->res_len = sizeof(xdout);
+
+   /* ck = xdout[1-15,0] */
+   memcpy(vec->ck, xdout + 1, sizeof(xdout) - 1);
+   vec->ck[15] = xdout[0];
+
+   /* ik = xdout[2-15,0-1] */
+   memcpy(vec->ik, xdout + 2, sizeof(xdout) - 2);
+   memcpy(vec->ik + sizeof(xdout) - 2, xdout, 2);
+
+   /* ak = xdout[3-8] */
+   memcpy(ak, xdout + 3, sizeof(ak));
+
+   /**
+* 3GPP TS 33.102, clause 6.8.1.2, b
+* sres = c2(res) = res[0-3] ^ res[4-7] ^ res[8-11] ^ res[12-15]
+*/
+   for (i = 0; i < 4; i++) {
+   vec->sres[i]  = vec->res[i] ^ vec->res[i + 4];
+   vec->sres[i] ^= vec->res[i + 8] ^ vec->res[i + 12];
+   }
+
+   /**
+* 3GPP TS 33.102, clause 6.8.1.2, c
+* kc = c3(ck, ik) = ck[0-7] ^ ck[8-15] ^ ik[0-7] ^ ik[8-15]
+* FIXME: do we really have CK/IK for GSM?
+*/
+   osmo_auth_c3(vec->kc, vec->ck, vec->ik);
+
+   /* The further part is UMTS specific */
+   if (aud->type != OSMO_AUTH_TYPE_UMTS) {
+   vec->auth_types = OSMO_AUTH_TYPE_GSM;
+   return 0;
+   }
+
+   /**
+* Step 3: cdout = sqn[0-5] || amf[0-1]
+* NOTE (for USIM): sqn[0-5] = autn[0-5] ^ ak[0-5]
+*/
+   osmo_store64be_ext(aud->u.umts.sqn, cdout, 6);
+   memcpy(cdout + 6, aud->u.umts.amf, 2);
+
+   /* Step 4: xmac = xdout[0-8] ^ cdout[0-8] */
+   xor(x

Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16080 )

Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number 
fields
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6
Gerrit-Change-Number: 16080
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 17:38:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16080 )

Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number 
fields
..

pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields

Since there can be multiple PDCH channels configured on different
timeslots, different TRXes, and BTSes, the PTCCH/U handling code
in OsmoPCU needs to know the exact origin of a given RACH.ind.

Otherwise, it is not known which subscriber originated a given
PTCCH/U indication, and hence it is impossible to send PTCCH/D
Timing Advance notification properly.

Fortunately, we can extend the RACH.ind message without even
bumping the protocol version, because every single PDU has a
fixed size defined by the largest message - INFO.ind. In case
if the actual message payload is smaller, the rest is filled
with a constant padding byte (0x00).

Older versions of OsmoPCU will consider the new fields as padding,
while the messages from older OsmoBTS versions will always have
both fields set to 0x00. Since C0/TS0 cannot be configured to
PDCH, this can be easily detected on the other end.

Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6
Related: OS#4102, OS#1545
---
M include/osmo-bts/pcu_if.h
M include/osmo-bts/pcuif_proto.h
M src/common/l1sap.c
M src/common/pcu_sock.c
4 files changed, 15 insertions(+), 7 deletions(-)

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



diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index f34e0cd..1475a94 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -11,8 +11,9 @@
 int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-   uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi);
+int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+   int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit,
+   enum ph_burst_type burst_type, uint8_t sapi);
 int pcu_tx_time_ind(uint32_t fn);
 int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
 int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index 2d24c43..e977914 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -108,6 +108,8 @@
uint16_tarfcn;
uint8_t is_11bit;
uint8_t burst_type;
+   uint8_t trx_nr;
+   uint8_t ts_nr;
 } __attribute__ ((packed));

 struct gsm_pcu_if_info_trx {
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 7bf0b09..e640ce9 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1403,7 +1403,8 @@
   rach_ind->acc_delay_256bits);

/* QTA: Timing Advance in units of 1/4 of a symbol */
-   pcu_tx_rach_ind(trx->bts, rach_ind->acc_delay_256bits >> 6,
+   pcu_tx_rach_ind(trx->bts->nr, trx->nr, rach_ind->chan_nr & 0x07,
+   rach_ind->acc_delay_256bits >> 6,
rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
return 0;
@@ -1466,7 +1467,8 @@
rach_ind->acc_delay, rach_ind->ra);

/* QTA: Timing Advance in units of 1/4 of a symbol */
-   pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6,
+   pcu_tx_rach_ind(bts->nr, trx->nr, rach_ind->chan_nr & 0x07,
+   rach_ind->acc_delay_256bits >> 6,
rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
rach_ind->burst_type, PCU_IF_SAPI_RACH);
return 0;
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 9fc1d4d..579f8cc 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -379,8 +379,9 @@
return pcu_sock_send(&bts_gsmnet, msg);
 }

-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-   uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi)
+int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+   int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit,
+   enum ph_burst_type burst_type, uint8_t sapi)
 {
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -389,7 +390,7 @@
LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, "
"fn=%d\n", qta, ra, fn);

-   msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr);
+   ms

Change in osmo-bts[master]: Unify common and bts-trx power control loop VTY command

2019-11-22 Thread pespin
pespin has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16058 )

Change subject: Unify common and bts-trx power control loop VTY command
..


Abandoned

superseded by https://gerrit.osmocom.org/c/osmo-bts/+/16072 and previous 
commits.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I8fb310b2aee7780982bd9394bc5e758dfd66be25
Gerrit-Change-Number: 16058
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon


Change in libosmo-sccp[master]: ss7: Set Traffic Mode and Route Ctx in ASPAC msg if set in VTY

2019-11-22 Thread pespin
pespin has abandoned this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/15817 )

Change subject: ss7: Set Traffic Mode and Route Ctx in ASPAC msg if set in VTY
..


Abandoned

properly implemented and already merged in another patch.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15817
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Icce0e672f6180ebc92ca34f538d41161d02fecb9
Gerrit-Change-Number: 15817
Gerrit-PatchSet: 6
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-MessageType: abandon


Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list

2019-11-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 )

Change subject: trx_if.adoc: Fix typo and formatting of bullet list
..

trx_if.adoc: Fix typo and formatting of bullet list

Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5
---
M common/chapters/trx_if.adoc
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc
index 6dd680b..d9f074a 100644
--- a/common/chapters/trx_if.adoc
+++ b/common/chapters/trx_if.adoc
@@ -11,6 +11,7 @@

 Given a base port `B` (5700), and a set of channels `0..N`, the ports related 
to
 a channel `0 <= X <= N` are:
+
 * The Master clock interface is located on port `P=B`.
 * The `TRXC` interface for channel `X` is located on port `P=B+2X+1`
 * The `TRXD` interface for channel `X` is located on port `P=B+2X+2`.
@@ -152,11 +153,12 @@
 code of the response message should indicate a preferred (basically, the 
latest)
 version. The format of this message is the following:
 
-CMD SETFORMAT  
+CMD SETFORMAT 
 RSP SETFORMAT  
 

 where:
+
 * `` is the requested version (suggested by the BTS),
 * `` is either the applied version if matches ``, or a
   preferred version if `` is not supported.

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5
Gerrit-Change-Number: 16171
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 )

Change subject: trx_if.adoc: Fix typo and formatting of bullet list
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5
Gerrit-Change-Number: 16171
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 15:54:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list

2019-11-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 )


Change subject: trx_if.adoc: Fix typo and formatting of bullet list
..

trx_if.adoc: Fix typo and formatting of bullet list

Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5
---
M common/chapters/trx_if.adoc
1 file changed, 3 insertions(+), 1 deletion(-)



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

diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc
index 6dd680b..d9f074a 100644
--- a/common/chapters/trx_if.adoc
+++ b/common/chapters/trx_if.adoc
@@ -11,6 +11,7 @@

 Given a base port `B` (5700), and a set of channels `0..N`, the ports related 
to
 a channel `0 <= X <= N` are:
+
 * The Master clock interface is located on port `P=B`.
 * The `TRXC` interface for channel `X` is located on port `P=B+2X+1`
 * The `TRXD` interface for channel `X` is located on port `P=B+2X+2`.
@@ -152,11 +153,12 @@
 code of the response message should indicate a preferred (basically, the 
latest)
 version. The format of this message is the following:
 
-CMD SETFORMAT  
+CMD SETFORMAT 
 RSP SETFORMAT  
 

 where:
+
 * `` is the requested version (suggested by the BTS),
 * `` is either the applied version if matches ``, or a
   preferred version if `` is not supported.

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5
Gerrit-Change-Number: 16171
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in libosmocore[master]: logging.h: define ansi color constants

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16156 )

Change subject: logging.h: define ansi color constants
..


Patch Set 2:

On the other hand, we may want to use these constants from other osmo-* 
projects...


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
Gerrit-Change-Number: 16156
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 15:07:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: rsl: ensure measurement reports are sent

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16170 )

Change subject: rsl: ensure measurement reports are sent
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/l1sap.c
File src/common/l1sap.c:

https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/l1sap.c@1252
PS1, Line 1252: return -EINVAL;
That means in this case lchan_ms_pwr_ctrl() is not called and the MS power loop 
is missing information. For instance it could mean the strength being used by 
the MS is not enough and precisely lchan_ms_pwr_ctrl() should be notified so 
that BTS can instruct the MS to increase the signal strength.

If in this case we don't have block data (data[0]) then MS Power Level value is 
not available for lchan_ms_pwr_ctrl(). In that case I'd probably makes sense to 
pass a special value to it, for instance -1, so that it knows the value is not 
available. Internally it can then for instance use lchan->ms_power_ctrl.current 
as input for calculations, or simply raise the current MS Power level if rssi 
is detected to be bad.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
Gerrit-Change-Number: 16170
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 15:04:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board

2019-11-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16153 )

Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro 
board
..

ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board

Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef
---
M ansible/host_vars/osmo-gsm-tester-prod.yml
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Verified



diff --git a/ansible/host_vars/osmo-gsm-tester-prod.yml 
b/ansible/host_vars/osmo-gsm-tester-prod.yml
index 92d8169..a2a5a36 100644
--- a/ansible/host_vars/osmo-gsm-tester-prod.yml
+++ b/ansible/host_vars/osmo-gsm-tester-prod.yml
@@ -6,6 +6,8 @@
 ip: 10.42.42.121
   - mac: 00:02:95:00:7c:07
 ip: 10.42.42.122
+  - mac: b8:27:eb:71:3a:36
+ip: 10.42.42.123

 # how many modems are connected via a quadmodem?
 gsm_modems: 8

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef
Gerrit-Change-Number: 16153
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n()

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16167 )

Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n()
..


Patch Set 1: Code-Review+1

I'd put this together with the previous commit adding the APIs, since 
deprecating that one is extremly tight to adding/changing related APIs.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338
Gerrit-Change-Number: 16167
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:54:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Patch Set 5: Code-Review+1

I see you deprecated it in a follow-up patch. I'd prefer them merged in here 
but fine.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:54:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16153 )

Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro 
board
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef
Gerrit-Change-Number: 16153
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:55:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16164 )

Change subject: msgb_put: more elaborate logging of head/tailroom failure
..


Patch Set 2: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h
File include/osmocom/core/msgb.h:

https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h@243
PS2, Line 243: " (allocated %u, head at %u, len %u, 
tailroom %u < want tailroom %u)\n",
> isn't msgb->head - msgb->_data a pointer? then use %p instead of %u.
Ah it's fine, sorry.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726
Gerrit-Change-Number: 16164
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:50:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16164 )

Change subject: msgb_put: more elaborate logging of head/tailroom failure
..


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h
File include/osmocom/core/msgb.h:

https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h@243
PS2, Line 243: " (allocated %u, head at %u, len %u, 
tailroom %u < want tailroom %u)\n",
isn't msgb->head - msgb->_data a pointer? then use %p instead of %u.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726
Gerrit-Change-Number: 16164
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:47:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fsm.h: add missing include of logging.h

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16163 )

Change subject: fsm.h: add missing include of logging.h
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a
Gerrit-Change-Number: 16163
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:45:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: vty: track parent nodes also for telnet sessions

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16162 )

Change subject: vty: track parent nodes also for telnet sessions
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h
File include/osmocom/vty/vty.h:

https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h@189
PS2, Line 189:  int (*is_config_node)(struct vty *vty, int node);
worth checking if a field in a struct can be marked as deprecated.


https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c
File src/vty/command.c:

https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c@2361
PS2, Line 2361: llist_add(&parent->entry, 
&vty->parent_nodes);
Don't you need to initialize ->entry beforehand? or having it set to 0 is fine?



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5
Gerrit-Change-Number: 16162
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:44:37 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: rsl: ensure measurement reports are sent

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16170 )

Change subject: rsl: ensure measurement reports are sent
..


Patch Set 1: Code-Review-1

(1 comment)

Please fix at least 1). The approach described in 2) can be implemented later.

https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/scheduler.c
File src/common/scheduler.c:

https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/scheduler.c@194
PS1, Line 194: rx_tchf_fn
How about TCH/H?

Also, I don't think it's a good idea to use generic Uplink handlers directly: 
1) NOPE.ind contains no burst (actually an uninitialized buffer), so that would 
result in accessing uninitialized memory (Coverity will be unhappy, ASAN too); 
2) TCH coding involves much less redundancy than xCCH, so losing one burst 
would probably mean we've lost the whole frame (or even two, due to 
block-diagonal interleaving) - needs to be checked though.

We should probably think about a wrapper function that would check the burst 
mask (i.e. how many bursts are lost), and either call the corresponding generic 
handler (e.g. rx_tchf_fn), or update the logical channel state and simply send 
BFI. This would allow do save some CPU power when we sure that Viterbi decoder 
would definitely fail.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
Gerrit-Change-Number: 16170
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:29:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )

Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..

docker: remove python-nwdiag (using nwdiag3 now)

Related: OS#4246
Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
---
M docker/Dockerfile_osmocom_jenkins.amd64
1 file changed, 0 insertions(+), 2 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  osmith: Verified



diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 
b/docker/Dockerfile_osmocom_jenkins.amd64
index cec662e..bc69985 100644
--- a/docker/Dockerfile_osmocom_jenkins.amd64
+++ b/docker/Dockerfile_osmocom_jenkins.amd64
@@ -6,7 +6,6 @@
 ARG DEBIAN_VERSION

 # Install apt dependencies (keep in alphabetic order)
-# python-nwdiag: can be removed once osmo-gsm-manuals 
Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged
 RUN \
dpkg --add-architecture i386 && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
@@ -94,7 +93,6 @@
python3-usb \
python3-yaml \
python-minimal \
-   python-nwdiag \
python-pip \
python-pychart \
python-setuptools \

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )

Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 14:00:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )

Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 13:56:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c()

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16159 )

Change subject: fix osmo_escape_str_c() and osmo_quote_str_c()
..


Patch Set 3: Code-Review+1

Would be great if you could add some unit tests for the breaking scenarios.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8
Gerrit-Change-Number: 16159
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 13:55:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Patch Set 5:

So if I understood correctly, we have users using a osmo_sockaddr_str_to_32n() 
(where n clearly states network-byte, as well as its documentation indicates) 
hoping it would convert it to host-byte simply because the implementation was 
wrong? That's a bug in the users then, I'm still not sure the best way to fix 
it is by doing this change this way.

If you still want to go this way, at least mark that API deprecated since it's 
clearly a monster we want to get rid as soon as possible.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 13:50:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16157 )

Change subject: fix DLSMS logging category color: '[1:38m' isn't actually 
defined
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2
Gerrit-Change-Number: 16157
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 13:41:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 )

Change subject: msc: overhaul voice call testing
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
Gerrit-Change-Number: 15938
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 13:39:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: rsl: ensure measurement reports are sent

2019-11-22 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16170 )


Change subject: rsl: ensure measurement reports are sent
..

rsl: ensure measurement reports are sent

osmo-bts currently does not generate a measurement report in case the
SACCH of the related traffic channel is lost. This is a problem because
the moment when reception gets bad measurmenet reporting is crucial to
carry out handover decisions effectively.

The presence of a SACCH block controls the conclusion of the measurement
interval and the sending of the RSL measurement report. The latter one
not only requires a measurmenet indication, it also requires a fully
intact SACCH block.

Lets use the NOPE / IDLE indications from V1 of the TRXD protocol to
ensure a SACCH block is always reported up to l1sap.c. In cases where
the SACCH is bad, trigger the sending of the RSL measurement report
manually without attaching the measurmenet data from the MS (which we do
not have in this case)

Related: OS#2975
Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
---
M include/osmo-bts/rsl.h
M src/common/l1sap.c
M src/common/rsl.c
M src/common/scheduler.c
4 files changed, 24 insertions(+), 5 deletions(-)



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

diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 186018e..ff6c2a8 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -45,4 +45,6 @@

 int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool 
overflow, uint8_t amount);

+int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const 
struct lapdm_entity *le);
+
 #endif // _RSL_H */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 7bf0b09..47368b7 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1235,8 +1235,20 @@

/* bad frame */
if (len == 0) {
-   if (L1SAP_IS_LINK_SACCH(link_id))
+   if (L1SAP_IS_LINK_SACCH(link_id)) {
+
+   /* In case we loose a SACCH block on the traffic we
+* must take care that the related measurement report
+* is sent via RSL. This is a fallback method. The
+* report will also lack the measurement report from
+* the MS side. See also rsl.c:lapdm_rll_tx_cb() */
+   if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == 
GSM_LCHAN_TCH_H) {
+   le = &lchan->lapdm_ch.lapdm_acch;
+   rsl_tx_meas_res(lchan, NULL, 0, le);
+   }
+
radio_link_timeout(lchan, 1);
+   }
return -EINVAL;
}

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 09a9217..61f3a38 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2837,8 +2837,8 @@
uint16_t toa256_std_dev;
 } __attribute__((packed));

-/* 8.4.8 MEASUREMENT RESult */
-static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, 
const struct lapdm_entity *le)
+/* Compose and send 8.4.8 MEASUREMENT RESult via RSL */
+int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const 
struct lapdm_entity *le)
 {
struct msgb *msg;
uint8_t meas_res[16];
@@ -2898,9 +2898,12 @@
msgb_tv_fixed_put(msg, RSL_IE_L1_INFO, 2, lchan->meas.l1_info);
lchan->meas.flags &= ~LC_UL_M_F_L1_VALID;
}
-   msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
+
+   if (l3 && l3_len > 0)
+   msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
if (ms_to_valid(lchan)) {
-   msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le));
+   if (l3 && l3_len > 0)
+   msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, 
ms_to2rsl(lchan, le));
lchan->ms_t_offs = -1;
lchan->p_offs = -1;
}
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index fe93c32..1c2755e 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -191,6 +191,7 @@
.rts_fn = rts_tchf_fn,
.dl_fn = tx_tchf_fn,
.ul_fn = rx_tchf_fn,
+   .nope_fn = rx_tchf_fn,
},
[TRXC_TCHH_0] = {
.name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */
@@ -365,6 +366,7 @@
.rts_fn = rts_data_fn,
.dl_fn = tx_data_fn,
.ul_fn = rx_data_fn,
+   .nope_fn = rx_data_fn,
},
[TRXC_SACCHTH_0] = {
.name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idfa8ef94e8cf131ff

Change in osmo-remsim[master]: bankd_client_fsm: close IPA client connection before re-establishing it

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-remsim/+/15997 )

Change subject: bankd_client_fsm: close IPA client connection before 
re-establishing it
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa
Gerrit-Change-Number: 15997
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:34:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-remsim[master]: bankd_client_fsm: close IPA client connection before re-establishing it

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-remsim/+/15997 )

Change subject: bankd_client_fsm: close IPA client connection before 
re-establishing it
..

bankd_client_fsm: close IPA client connection before re-establishing it

ipa_client_conn_destroy() really only destroys the object, but not close
the underlying file descriptor.  This leads to old connections
lingering around, which in turn (in case of the remsim client) will
occupy banksim worker threads.

Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa
---
M src/bankd_client_fsm.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/bankd_client_fsm.c b/src/bankd_client_fsm.c
index 8cc773a..cedb597 100644
--- a/src/bankd_client_fsm.c
+++ b/src/bankd_client_fsm.c
@@ -152,6 +152,7 @@
/* re-create bankd_conn */
if (bc->bankd_conn) {
LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to 
bankd\n");
+   ipa_client_conn_close(bc->bankd_conn);
ipa_client_conn_destroy(bc->bankd_conn);
bc->bankd_conn = NULL;
}

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa
Gerrit-Change-Number: 15997
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16153 )

Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro 
board
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef
Gerrit-Change-Number: 16153
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: utils: add osmo_strnchr()

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16166 )

Change subject: utils: add osmo_strnchr()
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537
Gerrit-Change-Number: 16166
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n()

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16167 )

Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338
Gerrit-Change-Number: 16167
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: utils_test: add osmo_print_n_test()

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16165 )

Change subject: utils_test: add osmo_print_n_test()
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc
Gerrit-Change-Number: 16165
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: vty: track parent nodes also for telnet sessions

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16162 )

Change subject: vty: track parent nodes also for telnet sessions
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5
Gerrit-Change-Number: 16162
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fsm.h: add missing include of logging.h

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16163 )

Change subject: fsm.h: add missing include of logging.h
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a
Gerrit-Change-Number: 16163
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16164 )

Change subject: msgb_put: more elaborate logging of head/tailroom failure
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726
Gerrit-Change-Number: 16164
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )

Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..


Patch Set 1:

This change is ready for review.


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 22 Nov 2019 12:05:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..

Fix python-nwdiag dependency on new debian distros

As seen by https://packages.debian.org, python-nwdiag is only available
in buster and older stables, while python3-nwdiag is available in both
old and new releases as well as testing and unstable.

Related: OS#4246
Depends: osmo-ci I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
---
M INSTALL.txt
M build/diag-filter.conf
M check-depends.sh
M debian/control
4 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/INSTALL.txt b/INSTALL.txt
index 3166bfa..3f4ef9f 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -10,7 +10,7 @@
   mscgen \
   graphviz \
   python-pychart \
-  python-nwdiag
+  python3-nwdiag

 (Note that asciidoc-dblatex is required from debian 9 on and did not exist 
before.)

diff --git a/build/diag-filter.conf b/build/diag-filter.conf
index 4f6005e..0c30db7 100644
--- a/build/diag-filter.conf
+++ b/build/diag-filter.conf
@@ -49,7 +49,7 @@


 [nwdiag-filter-style]
-nwdiag-style=template="nwdiag-block",subs=(),posattrs=("style","target"),filter='nwdiag
 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" 
-T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "'
+nwdiag-style=template="nwdiag-block",subs=(),posattrs=("style","target"),filter='nwdiag3
 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" 
-T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "'

 [blockdef-listing]
 template::[nwdiag-filter-style]
@@ -62,7 +62,7 @@


 [packetdiag-filter-style]
-packetdiag-style=template="packetdiag-block",subs=(),posattrs=("style","target"),filter='packetdiag
 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" 
-T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "'
+packetdiag-style=template="packetdiag-block",subs=(),posattrs=("style","target"),filter='packetdiag3
 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" 
-T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "'

 [blockdef-listing]
 template::[packetdiag-filter-style]
diff --git a/check-depends.sh b/check-depends.sh
index ec3f26f..d640abf 100755
--- a/check-depends.sh
+++ b/check-depends.sh
@@ -21,7 +21,7 @@
 check_dep_bin a2x asciidoc
 check_dep_bin asciidoc asciidoc
 check_dep_bin dblatex dblatex
-check_dep_bin packetdiag nwdiag
+check_dep_bin packetdiag3 python3-nwdiag
 check_dep_bin dot graphviz
 check_dep_bin python2 python2
 check_dep_python2_module pychart python2-pychart
diff --git a/debian/control b/debian/control
index 0f89d0a..afd09a3 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@
libxml2-utils,
mscgen,
python,
-   python-nwdiag,
+   python3-nwdiag,
python-pychart,
xsltproc
 Standards-Version: 3.9.8
@@ -32,7 +32,7 @@
  libxml2-utils,
  mscgen,
  python,
- python-nwdiag,
+ python3-nwdiag,
  python-pychart,
  xsltproc
 Description: Osmocom manuals shared code

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 11:58:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 22 Nov 2019 11:23:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16161 )

Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e
Gerrit-Change-Number: 16161
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:47:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: add osmo_escape_c_str and osmo_quote_c_str

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16160 )

Change subject: add osmo_escape_c_str and osmo_quote_c_str
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16160/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/16160/3//COMMIT_MSG@7
PS3, Line 7: _str and osmo_quote_c_str
the actual functions don't have underscores between c and str, let's avoid that 
inconsistency.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3dfb892036e0133dd8e7e4a6a0c32a3caa9b
Gerrit-Change-Number: 16160
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:46:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c()

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16159 )

Change subject: fix osmo_escape_str_c() and osmo_quote_str_c()
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8
Gerrit-Change-Number: 16159
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:44:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/15957 )

Change subject: utils.h: add OSMO_NAME_C_IMPL() macro
..


Patch Set 10: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322
Gerrit-Change-Number: 15957
Gerrit-PatchSet: 10
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:44:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Patch Set 5: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16158 )

Change subject: cosmetic: logging.h: fix comment s/levels/subsystems
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d
Gerrit-Change-Number: 16158
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: logging.h: define ansi color constants

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16156 )

Change subject: logging.h: define ansi color constants
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG@12
PS2, Line 12: the "LOG" prefix
> Do we really need to expose these color constants? If no, you can just put 
> them into logging_interna […]
very good idea!



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
Gerrit-Change-Number: 16156
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:42:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte...

2019-11-22 Thread laforge
laforge has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )


Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of 
host/network byte order
..


Removed Code-Review+2 by laforge 
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: deleteVote


Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16155 )

Change subject: utils.c: fix various inaccurate API doc about return values
..

utils.c: fix various inaccurate API doc about return values

Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3
---
M src/utils.c
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/src/utils.c b/src/utils.c
index ea1de0f..6fc2ee6 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -280,7 +280,7 @@
  * \param[out] buf_len size of buf in bytes
  * \param[in] bits A sequence of unpacked bits
  * \param[in] len Length of bits
- * \returns string representation in static buffer.
+ * \return The output buffer (buf).
  */
 char *osmo_ubit_dump_buf(char *buf, size_t buf_len, const uint8_t *bits, 
unsigned int len)
 {
@@ -672,7 +672,7 @@
  * \param[in] bufsize  sizeof(buf).
  * \param[in] str  A string that may contain any characters.
  * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length (also past nul chars).
- * \return Number of characters that would be written if bufsize were large 
enough excluding '\0' (like snprintf()).
+ * \return The output buffer (buf).
  */
 char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int 
in_len)
 {
@@ -763,7 +763,7 @@
  * \param[in] bufsize  sizeof(buf).
  * \param[in] str  A string that may contain any characters.
  * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length.
- * \return Number of characters that would be written if bufsize were large 
enough excluding '\0' (like snprintf()).
+ * \return The output buffer (buf).
  */
 char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int 
in_len)
 {
@@ -808,7 +808,6 @@
 }

 /*! Like osmo_quote_str_buf() but returns the result in a 
dynamically-allocated buffer.
- * The static buffer is shared with get_value_string() and osmo_escape_str().
  * \param[in] str  A string that may contain any characters.
  * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a 
length.
  * \returns dynamically-allocated buffer containing a quoted and escaped 
representation.

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3
Gerrit-Change-Number: 16155
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16155 )

Change subject: utils.c: fix various inaccurate API doc about return values
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3
Gerrit-Change-Number: 16155
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:42:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: install python3-nwdiag

2019-11-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16168 )

Change subject: docker: install python3-nwdiag
..

docker: install python3-nwdiag

Related: OS#4246
Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
---
M docker/Dockerfile_osmocom_jenkins.amd64
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 
b/docker/Dockerfile_osmocom_jenkins.amd64
index 1ff2d0b..cec662e 100644
--- a/docker/Dockerfile_osmocom_jenkins.amd64
+++ b/docker/Dockerfile_osmocom_jenkins.amd64
@@ -6,6 +6,7 @@
 ARG DEBIAN_VERSION

 # Install apt dependencies (keep in alphabetic order)
+# python-nwdiag: can be removed once osmo-gsm-manuals 
Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged
 RUN \
dpkg --add-architecture i386 && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
@@ -86,6 +87,7 @@
python3 \
python3-gi \
python3-mako \
+   python3-nwdiag \
python3-pip \
python3-pyflakes \
python3-setuptools \

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Gerrit-Change-Number: 16168
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ci[master]: docker: install python3-nwdiag

2019-11-22 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16168 )

Change subject: docker: install python3-nwdiag
..


Patch Set 1: Verified+1 Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Gerrit-Change-Number: 16168
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:40:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )

Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..


Patch Set 1:

Setting to WIP to prevent accidental merge before osmo-gsm-manuals commit is 
merged.


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:27:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now)

2019-11-22 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16169 )


Change subject: docker: remove python-nwdiag (using nwdiag3 now)
..

docker: remove python-nwdiag (using nwdiag3 now)

Related: OS#4246
Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
---
M docker/Dockerfile_osmocom_jenkins.amd64
1 file changed, 0 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/16169/1

diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 
b/docker/Dockerfile_osmocom_jenkins.amd64
index cec662e..bc69985 100644
--- a/docker/Dockerfile_osmocom_jenkins.amd64
+++ b/docker/Dockerfile_osmocom_jenkins.amd64
@@ -6,7 +6,6 @@
 ARG DEBIAN_VERSION

 # Install apt dependencies (keep in alphabetic order)
-# python-nwdiag: can be removed once osmo-gsm-manuals 
Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged
 RUN \
dpkg --add-architecture i386 && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
@@ -94,7 +93,6 @@
python3-usb \
python3-yaml \
python-minimal \
-   python-nwdiag \
python-pip \
python-pychart \
python-setuptools \

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
Gerrit-Change-Number: 16169
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..


Patch Set 3:

Depends on this patch: https://gerrit.osmocom.org/c/osmo-ci/+/16168


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:25:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has uploaded a new patch set (#3) to the change originally created by 
pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..

Fix python-nwdiag dependency on new debian distros

As seen by https://packages.debian.org, python-nwdiag is only available
in buster and older stables, while python3-nwdiag is available in both
old and new releases as well as testing and unstable.

Related: OS#4246
Depends: osmo-ci I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
---
M INSTALL.txt
M build/diag-filter.conf
M check-depends.sh
M debian/control
4 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/52/16152/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-MessageType: newpatchset


Change in osmo-ci[master]: docker: install python3-nwdiag

2019-11-22 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/16168 )


Change subject: docker: install python3-nwdiag
..

docker: install python3-nwdiag

Related: OS#4246
Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
---
M docker/Dockerfile_osmocom_jenkins.amd64
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/16168/1

diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 
b/docker/Dockerfile_osmocom_jenkins.amd64
index 1ff2d0b..cec662e 100644
--- a/docker/Dockerfile_osmocom_jenkins.amd64
+++ b/docker/Dockerfile_osmocom_jenkins.amd64
@@ -6,6 +6,7 @@
 ARG DEBIAN_VERSION

 # Install apt dependencies (keep in alphabetic order)
+# python-nwdiag: can be removed once osmo-gsm-manuals 
Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged
 RUN \
dpkg --add-architecture i386 && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
@@ -86,6 +87,7 @@
python3 \
python3-gi \
python3-mako \
+   python3-nwdiag \
python3-pip \
python3-pyflakes \
python3-setuptools \

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Gerrit-Change-Number: 16168
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..


Patch Set 1: Code-Review+1

Thanks for the patch!

I've tried it on a debian 9 system locally, and found that the binaries of 
nwdiag and packetdiag have a different name in python3-nwdiag: they are called 
nwdiag3 and packetdiag3 now.

So I took the liberty to update the patch, with this version it works on my 
machine.


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:19:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros

2019-11-22 Thread osmith
osmith has uploaded a new patch set (#2) to the change originally created by 
pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 )

Change subject: Fix python-nwdiag dependency on new debian distros
..

Fix python-nwdiag dependency on new debian distros

As seen by https://packages.debian.org, python-nwdiag is only available
in buster and older stables, while python3-nwdiag is available in both
old and new releases as well as testing and unstable.

Related: OS#4246
Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
---
M INSTALL.txt
M build/diag-filter.conf
M check-depends.sh
M debian/control
4 files changed, 6 insertions(+), 6 deletions(-)


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Gerrit-Change-Number: 16152
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16161 )

Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e
Gerrit-Change-Number: 16161
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 09:20:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16158 )

Change subject: cosmetic: logging.h: fix comment s/levels/subsystems
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d
Gerrit-Change-Number: 16158
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 09:03:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16157 )

Change subject: fix DLSMS logging category color: '[1:38m' isn't actually 
defined
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2
Gerrit-Change-Number: 16157
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 09:03:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: logging.h: define ansi color constants

2019-11-22 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16156 )

Change subject: logging.h: define ansi color constants
..


Patch Set 2: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG@12
PS2, Line 12: the "LOG" prefix
Do we really need to expose these color constants? If no, you can just put them 
into logging_internal.h, so there would be no need to use 'OSMO_' prefix.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
Gerrit-Change-Number: 16156
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Fri, 22 Nov 2019 09:01:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment