Change in osmo-msc[master]: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13450 )

Change subject: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()
..


Patch Set 2:

Regarding "conflicts with https://gerrit.osmocom.org/#/c/osmo-msc/+/13136/";, I 
just tried to rebase neels/ho over this change, and there were no any 
conflicts. The result of this rebase can be found in fixeria/ho_rebase.


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Gerrit-Change-Number: 13450
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 29 Mar 2019 05:13:46 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

2019-03-28 Thread Vadim Yanitskiy
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13450

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

Change subject: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()
..

libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

A memleak has been noticed after executing some of TTCN-3 test
cases. For example, the following ones:

  - MSC_Tests.TC_lu_and_mo_sms,
  - MSC_Tests.TC_lu_and_mt_sms.

The key point is that a test case basically disconnects too quickly,
leaving some MT SMS messages (e.g. delivery reports) undelivered,
so they are getting stored in the SMSC's database.

As soon as the SMSC's queue is triggered, sms_submit_pending() would
retrieve pending messages from the database by calling function
smsq_take_next_sms() in loop and attempt to deliver them.

This function in it's turn checks whether the subscriber is attached
or not. If not, the allocated 'gsm_sms' structure would not be
free()ed! Therefore, every time smsq_take_next_sms() is called,
one 'gsm_sms' structure for an unattached subscriber is leaked.

Furthermore, there is a unit test called 'sms_queue_test', that
actually does cover smsq_take_next_sms() and was designed to
catch some potential memory leaks, but...

In order to avoid emulating the low-level SQLite API, the unit
test by design overwrites some functions of libmsc, including
db_sms_get_next_unsent_rr_msisdn(), that is being called by
smsq_take_next_sms().

The problem is that the original function in libmsc does
allocate a 'gsm_sms' structure on heap (using talloc), while
the overwriting function did this statically, returning a
pointer to stack. This critical difference made it impossible
to spot the memleak in smsq_take_next_sms() during the
unit test execution.

Let's refactor 'sms_queue_test' to use dynamic memory allocation,
and finally fix the evil memleak in smsq_take_next_sms().

Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Closes: OS#3860
---
M src/libmsc/sms_queue.c
M tests/sms_queue/sms_queue_test.c
2 files changed, 21 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/50/13450/2
--
To view, visit https://gerrit.osmocom.org/13450
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Gerrit-Change-Number: 13450
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in openbsc[master]: Write configuration correctly from vty (alert notifications)

2019-03-28 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/13320 )

Change subject: Write configuration correctly from vty (alert notifications)
..


Patch Set 3:

> Please re-trigger tests once it's resolved.

I find I've forgotten the best way to do that?
Is it possible without having to have Harald +2 it again?


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4b0363fa34dd9ac0a221844974e4ebf7465b56f4
Gerrit-Change-Number: 13320
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Keith Whyte 
Gerrit-CC: Max 
Gerrit-Comment-Date: Thu, 28 Mar 2019 17:02:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: ttcn3-bscnat-test: osmo-bsc_nat config file fixes

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13462 )

Change subject: ttcn3-bscnat-test: osmo-bsc_nat config file fixes
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie90ef6a6e09a3c47955297dedf78121e2c5cbe31
Gerrit-Change-Number: 13462
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:44:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: Add bscnat tests to jenkins

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13463


Change subject: Add bscnat tests to jenkins
..

Add bscnat tests to jenkins

This requires Change-ID I800ebe0f33cf7c86eea65d2e186c6af12fee6db7 from
osmo-ttcn3-hacks.

Fixes: OS#3179
Change-Id: Idee5a986e4cda8db601982ac3f2662bc20fe3f5f
---
M jobs/ttcn3-testsuites.yml
1 file changed, 4 insertions(+), 0 deletions(-)



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

diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index e3e6d5c..f42a26f 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -35,6 +35,8 @@
   timer: 00 07 * * *
   - ttcn3-sip-test:
   timer: 30 07 * * *
+  - ttcn3-bscnat-test:
+  timer: 00 08 * * *
   - ttcn3-bsc-test-sccplite:
   timer: 30 08 * * *

@@ -65,6 +67,8 @@
   blocking: "^ttcn3-pcu-test.*"
   - ttcn3-pcu-test-sns-latest:
   blocking: "^ttcn3-pcu-test-sns.*"
+  - ttcn3-bscnat-test-latest:
+  blocking: "^ttcn3-bscnat-test.*"
 - job-template:
 name: '{job-name}'
 project-type: freestyle

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idee5a986e4cda8db601982ac3f2662bc20fe3f5f
Gerrit-Change-Number: 13463
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: Add first osmo-cn-latest image

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13438 )

Change subject: Add first osmo-cn-latest image
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icfddc75447fbd94f9d5c19408ccc7f3a914e083f
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:24:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bscnat-test: osmo-bsc_nat config file fixes

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13462


Change subject: ttcn3-bscnat-test: osmo-bsc_nat config file fixes
..

ttcn3-bscnat-test: osmo-bsc_nat config file fixes

* Log to file in osmo-bsc_nat
* Fix number of endpoints so the test passes

Change-Id: Ie90ef6a6e09a3c47955297dedf78121e2c5cbe31
---
M ttcn3-bscnat-test/osmo-bsc-nat.cfg
1 file changed, 5 insertions(+), 33 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/62/13462/1

diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg 
b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
index 4f02366..e3398b9 100644
--- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg
+++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
@@ -2,40 +2,12 @@
 ! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
 !!
 !
-log stderr
+log file /data/osmo-bsc_nat.log
   logging filter all 1
-  logging color 1
+  logging color 0
+  logging print category 1
   logging timestamp 1
-  logging level rll notice
-  logging level cc notice
-  logging level mm notice
-  logging level rr notice
-  logging level rsl notice
-  logging level nm info
-  logging level mncc notice
-  logging level pag notice
-  logging level meas notice
-  logging level sccp debug
-  logging level msc notice
-  logging level mgcp notice
-  logging level ho notice
-  logging level db notice
-  logging level ref notice
-  logging level gprs debug
-  logging level ns info
-  logging level bssgp debug
-  logging level llc debug
-  logging level sndcp debug
-  logging level nat notice
-  logging level ctrl notice
-  logging level smpp debug
-  logging level lglobal notice
-  logging level llapd notice
-  logging level linp notice
-  logging level lmux notice
-  logging level lmi notice
-  logging level lmib notice
-  logging level lsms notice
+  logging level force-all debug
 !
 line vty
  no login
@@ -50,7 +22,7 @@
   sdp audio-payload number 126
   sdp audio-payload name AMR/8000
   loop 0
-  number endpoints 1
+  number endpoints 32
   call-agent ip 172.18.11.203
   rtp transcoder-base 0
   transcoder-remote-base 4000

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie90ef6a6e09a3c47955297dedf78121e2c5cbe31
Gerrit-Change-Number: 13462
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Clarify steps for provisioning

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13444 )

Change subject: osmo-cn-latest: Clarify steps for provisioning
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia55181c791cc66ae95ce41bb1c39092d38751ecb
Gerrit-Change-Number: 13444
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:26:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-cn-latest: Rename the script to provision the hlr

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13443 )

Change subject: osmo-cn-latest: Rename the script to provision the hlr
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e7578879a6880664faa5bb0ac3367880f538b5
Gerrit-Change-Number: 13443
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:25:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-cn-latest: Add config snippets for static CS7 configuration

2019-03-28 Thread Daniel Willmann
Daniel Willmann has abandoned this change. ( https://gerrit.osmocom.org/13446 )

Change subject: osmo-cn-latest: Add config snippets for static CS7 configuration
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/13446
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ib19e870d208acefc1f2b2694752a35ee6505338f
Gerrit-Change-Number: 13446
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Add default osmo-msc.cfg

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13445 )

Change subject: osmo-cn-latest: Add default osmo-msc.cfg
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I821f76ace7dfd666a6ba6aa382eafa6527af7ba6
Gerrit-Change-Number: 13445
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:26:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-cn-latest: Use osmo-config-merge to configure the MSC

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13442 )

Change subject: osmo-cn-latest: Use osmo-config-merge to configure the MSC
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ccebf041d6e4fd3f9e1c6d898e2787b7de9ccca
Gerrit-Change-Number: 13442
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:25:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-cn-latest: Add script to populate HLR

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13439 )

Change subject: osmo-cn-latest: Add script to populate HLR
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3ba73347a87e82422fcd3ec3da9acc4b70411003
Gerrit-Change-Number: 13439
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:24:36 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-cn-latest: Add README with instructions for provisioning

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13441 )

Change subject: osmo-cn-latest: Add README with instructions for provisioning
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e29106373cb72773f4d8b9f164aa9a6163addc7
Gerrit-Change-Number: 13441
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:24:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-ci-latest: Add options to change mcc/mnc for SIM card data

2019-03-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13440 )

Change subject: osmo-ci-latest: Add options to change mcc/mnc for SIM card data
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica348dc12f07a1a57729c4d97a40cf9c04e975c9
Gerrit-Change-Number: 13440
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 16:24:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bsc-nat: Fix errors due to bit rot

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13456


Change subject: bsc-nat: Fix errors due to bit rot
..

bsc-nat: Fix errors due to bit rot

Change-Id: I79f3b1b74c9f6f8769a5d71fde04847435f3f345
---
M bsc-nat/BSC_MS_ConnectionHandler.ttcn
M bsc-nat/BSC_MS_Simulation.ttcn
M bsc-nat/MSC_ConnectionHandler.ttcn
M bsc-nat/MSC_Simulation.ttcn
4 files changed, 11 insertions(+), 4 deletions(-)



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

diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn 
b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index 1f41434..27e1b58 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -52,7 +52,9 @@
create_cb := refers(CreateCallback),
unitdata_cb := refers(UnitdataCallback),
decode_dtap := false,
-   role_ms := true
+   role_ms := true,
+   sccp_addr_local := omit,
+   sccp_addr_peer := omit
 }


@@ -157,6 +159,9 @@
self.stop;
}

+   [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {
+   }
+
/* disconnect in invalid state */
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(fail);
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index b9414a3..7b0093d 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -62,7 +62,7 @@
/* start components */
vc_IPA.start(IPA_Emulation.main_client(remote_ip, remote_port, 
local_ip, local_port));
vc_SCCP.start(SCCPStart(sccp_pars));
-   vc_BSSMAP.start(BSSMAP_Emulation.main(BSC_MS_BssmapOps, id));
+   
vc_BSSMAP.start(BSSMAP_Emulation.main(BSC_MS_ConnectionHandler.BSC_MS_BssmapOps,
 id));

/* Initial delay to wait for IPA connection establishment */
T.start(2.0);
diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn 
b/bsc-nat/MSC_ConnectionHandler.ttcn
index 102869c..27fbba7 100644
--- a/bsc-nat/MSC_ConnectionHandler.ttcn
+++ b/bsc-nat/MSC_ConnectionHandler.ttcn
@@ -58,7 +58,9 @@
create_cb := refers(CreateCallback),
unitdata_cb := refers(UnitdataCallback),
decode_dtap := false,
-   role_ms := false
+   role_ms := false,
+   sccp_addr_local := omit,
+   sccp_addr_peer := omit
 }

 type enumerated MSC_State {
diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn
index 7e39ca1..0a13509 100755
--- a/bsc-nat/MSC_Simulation.ttcn
+++ b/bsc-nat/MSC_Simulation.ttcn
@@ -64,7 +64,7 @@

vc_IPA.start(IPA_Emulation.main_server(local_ip, local_port));
vc_SCCP.start(SCCPStart(sccp_pars));
-   vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_BssmapOps, id & "-BSSMAP"));
+   
vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_ConnectionHandler.MSC_BssmapOps, id & 
"-BSSMAP"));

/* wait until termination of respective components */
vc_IPA.done;

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79f3b1b74c9f6f8769a5d71fde04847435f3f345
Gerrit-Change-Number: 13456
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: bsc-nat: Add sample bsc-nat config for test

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13461


Change subject: bsc-nat: Add sample bsc-nat config for test
..

bsc-nat: Add sample bsc-nat config for test

Change-Id: I0ab3a4fb66201cd134238f5efcf6ff80033011e3
---
A bsc-nat/bscs.config
A bsc-nat/osmo-bsc-nat.cfg
2 files changed, 86 insertions(+), 0 deletions(-)



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

diff --git a/bsc-nat/bscs.config b/bsc-nat/bscs.config
new file mode 100644
index 000..6afa09b
--- /dev/null
+++ b/bsc-nat/bscs.config
@@ -0,0 +1,19 @@
+nat
+ bsc 0
+  token BSC0
+  location_area_code 1
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
+ bsc 1
+  token BSC1
+  location_area_code 2
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
+ bsc 2
+  token BSC2
+  location_area_code 3
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
diff --git a/bsc-nat/osmo-bsc-nat.cfg b/bsc-nat/osmo-bsc-nat.cfg
new file mode 100644
index 000..ec1a7c2
--- /dev/null
+++ b/bsc-nat/osmo-bsc-nat.cfg
@@ -0,0 +1,67 @@
+!
+! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
+!!
+!
+log stderr
+  logging filter all 1
+  logging color 1
+  logging timestamp 1
+  logging level rll notice
+  logging level cc notice
+  logging level mm notice
+  logging level rr notice
+  logging level rsl notice
+  logging level nm info
+  logging level mncc notice
+  logging level pag notice
+  logging level meas notice
+  logging level sccp debug
+  logging level msc notice
+  logging level mgcp notice
+  logging level ho notice
+  logging level db notice
+  logging level ref notice
+  logging level gprs debug
+  logging level ns info
+  logging level bssgp debug
+  logging level llc debug
+  logging level sndcp debug
+  logging level nat notice
+  logging level ctrl notice
+  logging level smpp debug
+  logging level lglobal notice
+  logging level llapd notice
+  logging level linp notice
+  logging level lmux notice
+  logging level lmi notice
+  logging level lmib notice
+  logging level lsms notice
+!
+line vty
+ no login
+!
+mgcp
+  bind ip 127.0.0.1
+  bind port 2427
+  rtp bts-base 4000
+  rtp net-base 16000
+  rtp ip-dscp 0
+  no rtcp-omit
+  sdp audio-payload number 126
+  sdp audio-payload name AMR/8000
+  loop 0
+  number endpoints 32
+  call-agent ip 127.0.0.1
+  rtp transcoder-base 0
+  transcoder-remote-base 4000
+nat
+ msc ip 127.0.0.1
+ msc port 5100
+ token foo
+ timeout auth 2
+ timeout ping 20
+ timeout pong 5
+ ip-dscp 0
+ bscs-config-file bscs.config
+ access-list msceven imsi-allow ^[0-9]*[24680]$
+ access-list mscodd imsi-allow ^[0-9]*[13579]$

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ab3a4fb66201cd134238f5efcf6ff80033011e3
Gerrit-Change-Number: 13461
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: bsc-nat: Add default module parameters

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13459


Change subject: bsc-nat: Add default module parameters
..

bsc-nat: Add default module parameters

Change-Id: I800ebe0f33cf7c86eea65d2e186c6af12fee6db7
---
M bsc-nat/BSCNAT_Tests.default
1 file changed, 11 insertions(+), 11 deletions(-)



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

diff --git a/bsc-nat/BSCNAT_Tests.default b/bsc-nat/BSCNAT_Tests.default
index bb279bd..37c1048 100644
--- a/bsc-nat/BSCNAT_Tests.default
+++ b/bsc-nat/BSCNAT_Tests.default
@@ -6,20 +6,20 @@
 #*.*.udpReuseAddress := "yes";

 [MODULE_PARAMETERS]
-#mp_bsc_port := 4;
-#mp_bsc_ip   := "127.0.0.1";
-#mp_msc_port := 5100;
-#mp_msc_ip   := "127.0.0.1";
-#mp_nat_port := 5000;
-#mp_nat_ip   := "127.0.0.1";
+mp_bsc_port := 4;
+mp_bsc_ip   := "127.0.0.1";
+mp_msc_port := 5100;
+mp_msc_ip   := "127.0.0.1";
+mp_nat_port := 5000;
+mp_nat_ip   := "127.0.0.1";

 #mp_ipa_mgcp_uses_osmo_ext := true;

-#mp_mgcp_uses_udp := true;
-#mp_callagent_ip := "127.0.0.1";
-#mp_callagent_udp_port := 2727;
-#mp_mgw_ip := "127.0.0.1";
-#mp_mgw_udp_port := 2427;
+mp_mgcp_uses_udp := true;
+mp_callagent_ip := "127.0.0.1";
+mp_callagent_udp_port := 2727;
+mp_mgw_ip := "127.0.0.1";
+mp_mgw_udp_port := 2427;

 [EXECUTE]


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I800ebe0f33cf7c86eea65d2e186c6af12fee6db7
Gerrit-Change-Number: 13459
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: bsc-nat: Use BSCx as token for BSC no x

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13458


Change subject: bsc-nat: Use BSCx as token for BSC no x
..

bsc-nat: Use BSCx as token for BSC no x

Change-Id: I27cf1a2f5c8a55eb9883ac9430e73c95dded9b7b
---
M bsc-nat/BSC_MS_Simulation.ttcn
1 file changed, 3 insertions(+), 1 deletion(-)



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

diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index 7b0093d..2f1961b 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -39,6 +39,8 @@
 {
var integer i := 0;
timer T := 1.0;
+   var IPA_CCM_Parameters ccm_pars := IPA_Emulation.c_IPA_default_ccm_pars;
+   ccm_pars.name := id;

g_sccp_addr_own := sccp_addr_own;
g_sccp_addr_remote := sccp_addr_remote;
@@ -60,7 +62,7 @@
connect(vc_BSSMAP:MGCP, vc_IPA:IPA_MGCP_PORT);

/* start components */
-   vc_IPA.start(IPA_Emulation.main_client(remote_ip, remote_port, 
local_ip, local_port));
+   vc_IPA.start(IPA_Emulation.main_client(remote_ip, remote_port, 
local_ip, local_port, ccm_pars));
vc_SCCP.start(SCCPStart(sccp_pars));

vc_BSSMAP.start(BSSMAP_Emulation.main(BSC_MS_ConnectionHandler.BSC_MS_BssmapOps,
 id));


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27cf1a2f5c8a55eb9883ac9430e73c95dded9b7b
Gerrit-Change-Number: 13458
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: bsc_nat: Wait for bsc-nat to connect to MSC before connecting the BSC

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13457


Change subject: bsc_nat: Wait for bsc-nat to connect to MSC before connecting 
the BSC
..

bsc_nat: Wait for bsc-nat to connect to MSC before connecting the BSC

Change-Id: Ic02ce9bd46cab7e6d4833b1d838c334e377f7d50
---
M bsc-nat/BSCNAT_Tests.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn
index b6dca28..685066c 100644
--- a/bsc-nat/BSCNAT_Tests.ttcn
+++ b/bsc-nat/BSCNAT_Tests.ttcn
@@ -112,6 +112,8 @@
msc[i].MSC.start(MSC_Simulation.main(mp_msc_ip, mp_msc_port + 
i, msc[i].sccp_pars, msc[i].sccp_addr_own, id));
}

+   /* Wait for bsc_nat to attach to MSC. Before that all BSC connections 
will be dropped */
+   f_sleep(5.0);
for (i := 0; i < NUM_BSC; i := i+1) {
f_init_BscState(bsc[i], mp_bsc_pc +i, mp_msc_pc, mp_bsc_ssn, 
mp_msc_ssn);
bsc[i].BSC := BSC_CT.create;

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic02ce9bd46cab7e6d4833b1d838c334e377f7d50
Gerrit-Change-Number: 13457
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: bsc-nat: Use id when creating components

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13460


Change subject: bsc-nat: Use id when creating components
..

bsc-nat: Use id when creating components

Change-Id: I2c130d74405cef2b9aa1f9c0a2122fd70aa9cc62
---
M bsc-nat/BSCNAT_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn
index 685066c..993d668 100644
--- a/bsc-nat/BSCNAT_Tests.ttcn
+++ b/bsc-nat/BSCNAT_Tests.ttcn
@@ -107,8 +107,8 @@

for (i := 0; i < NUM_MSC; i := i+1) {
f_init_MscState(msc[i], mp_msc_pc +i, mp_bsc_pc, mp_msc_ssn, 
mp_bsc_ssn);
-   msc[i].MSC := MSC_CT.create;
id := "MSC" & int2str(i);
+   msc[i].MSC := MSC_CT.create(id);
msc[i].MSC.start(MSC_Simulation.main(mp_msc_ip, mp_msc_port + 
i, msc[i].sccp_pars, msc[i].sccp_addr_own, id));
}

@@ -116,8 +116,8 @@
f_sleep(5.0);
for (i := 0; i < NUM_BSC; i := i+1) {
f_init_BscState(bsc[i], mp_bsc_pc +i, mp_msc_pc, mp_bsc_ssn, 
mp_msc_ssn);
-   bsc[i].BSC := BSC_CT.create;
id := "BSC" & int2str(i);
+   bsc[i].BSC := BSC_CT.create(id);
bsc[i].BSC.start(BSC_MS_Simulation.main(mp_nat_ip, mp_nat_port, 
mp_bsc_ip, mp_bsc_port+i,
bsc[i].sccp_pars, 
bsc[i].sccp_addr_own,
bsc[i].sccp_addr_peer, 
id));

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c130d74405cef2b9aa1f9c0a2122fd70aa9cc62
Gerrit-Change-Number: 13460
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ttcn3-hacks[master]: Rename IPA_Test->BSCNAT_Tests and get proper cfg files

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13455


Change subject: Rename IPA_Test->BSCNAT_Tests and get proper cfg files
..

Rename IPA_Test->BSCNAT_Tests and get proper cfg files

Change-Id: I937d2aa1abfcb302dfb529ac8be75dcd269c46e2
---
A bsc-nat/BSCNAT_Tests.cfg
R bsc-nat/BSCNAT_Tests.default
R bsc-nat/BSCNAT_Tests.ttcn
M bsc-nat/regen_makefile.sh
4 files changed, 31 insertions(+), 9 deletions(-)



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

diff --git a/bsc-nat/BSCNAT_Tests.cfg b/bsc-nat/BSCNAT_Tests.cfg
new file mode 100644
index 000..c40957a
--- /dev/null
+++ b/bsc-nat/BSCNAT_Tests.cfg
@@ -0,0 +1,27 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./BSCNAT_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+BSCNAT_Tests.control
+#BSCNAT_Tests.TC_recv_dump
diff --git a/bsc-nat/IPA_Test.cfg b/bsc-nat/BSCNAT_Tests.default
similarity index 66%
rename from bsc-nat/IPA_Test.cfg
rename to bsc-nat/BSCNAT_Tests.default
index 617e349..bb279bd 100644
--- a/bsc-nat/IPA_Test.cfg
+++ b/bsc-nat/BSCNAT_Tests.default
@@ -1,8 +1,6 @@
 [LOGGING]
-SourceInfoFormat := Single;
-#FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
-#ConsoleMask := ERROR | WARNING | TESTCASE | TTCN_MATCHING | DEBUG_ENCDEC
 FileMask := LOG_ALL | TTCN_MATCHING;
+mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP;

 [TESTPORT_PARAMETERS]
 #*.*.udpReuseAddress := "yes";
@@ -23,8 +21,5 @@
 #mp_mgw_ip := "127.0.0.1";
 #mp_mgw_udp_port := 2427;

-[MAIN_CONTROLLER]
-
 [EXECUTE]
-#MGCP_Test.TC_selftest
-IPA_Test.TC_recv_dump
+
diff --git a/bsc-nat/IPA_Test.ttcn b/bsc-nat/BSCNAT_Tests.ttcn
similarity index 99%
rename from bsc-nat/IPA_Test.ttcn
rename to bsc-nat/BSCNAT_Tests.ttcn
index fbff84a..b6dca28 100644
--- a/bsc-nat/IPA_Test.ttcn
+++ b/bsc-nat/BSCNAT_Tests.ttcn
@@ -1,4 +1,4 @@
-module IPA_Test {
+module BSCNAT_Tests {

 import from Osmocom_Types all;

diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh
index 5c25366..c5fe64c 100755
--- a/bsc-nat/regen_makefile.sh
+++ b/bsc-nat/regen_makefile.sh
@@ -1,6 +1,6 @@
 #!/bin/sh

-MAIN=IPA_Test.ttcn
+MAIN=BSCNAT_Tests.ttcn

 FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc 
IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc 
RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc"


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I937d2aa1abfcb302dfb529ac8be75dcd269c46e2
Gerrit-Change-Number: 13455
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-ci[master]: build-old-tags: build libosmo-legacy-mgcp

2019-03-28 Thread osmith
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/13454 )

Change subject: build-old-tags: build libosmo-legacy-mgcp
..

build-old-tags: build libosmo-legacy-mgcp

Build osmo-mgw 1.4.0 (which provides libosmo-legacy-mgcp) and install
it into a different temp dir. Allows properly building osmo-bsc 1.2.x,
as soon as a new release is tagged, which makes it use
LIBOSMOLEGACYMGCP_CFLAGS and therefore pick up the include path
properly [1].

osmo-mgw 1.4.0's "make check" doesn't pass right now, so add a check
parameter to build_repo() and disable them when building
libosmo-legacy-mgcp. The checks will get executed later, when the
depends are installed and we are building various tags of Osmocom repos,
including osmo-mgw 1.4.0.

While at it, slightly refactor build_repo() to put all arguments into
descriptive variable names (as it is getting a bit longer now).

[1]: Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908

Related: OS#3867
Change-Id: I63d16f8e44c14dee46e2ef3fd050a421017c56b0
---
M scripts/osmocom-build-old-tags-against-master.sh
1 file changed, 44 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/54/13454/2
--
To view, visit https://gerrit.osmocom.org/13454
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I63d16f8e44c14dee46e2ef3fd050a421017c56b0
Gerrit-Change-Number: 13454
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 


Change in osmo-bsc[osmith/release-1.2.2]: osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS

2019-03-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13451 )

Change subject: osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS
..


Patch Set 1: Verified+1

Jenkins failure is expected:

> configure: error: Package requirements (libosmo-legacy-mgcp >= 1.3.0) were 
> not met


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/release-1.2.2
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908
Gerrit-Change-Number: 13451
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 15:42:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[osmith/release-1.2.2]: Bump version: 1.2.1.1-fb26e → 1.2.2

2019-03-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13452 )

Change subject: Bump version: 1.2.1.1-fb26e → 1.2.2
..


Patch Set 1: Verified+1

Jenkins failure is expected:

> configure: error: Package requirements (libosmo-legacy-mgcp >= 1.3.0) were 
> not met


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/release-1.2.2
Gerrit-MessageType: comment
Gerrit-Change-Id: Idd1d5c212d5f156ae1327a75b368879a90a6859a
Gerrit-Change-Number: 13452
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 15:42:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: build-old-tags: build libosmo-legacy-mgcp

2019-03-28 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13454


Change subject: build-old-tags: build libosmo-legacy-mgcp
..

build-old-tags: build libosmo-legacy-mgcp

Build osmo-mgw 1.4.0 (which provides libosmo-legacy-mgcp) and install
it into a different temp dir. Allows properly building osmo-bsc 1.2.x,
as soon as a new release is tagged, which makes it use
LIBOSMOLEGACYMGCP_CFLAGS and therefore pick up the include path
properly [1].

osmo-mgw 1.4.0's "make check" doesn't pass right now, so add a check
parameter to build_repo() and disable them when building
libosmo-legacy-mgcp. The checks will get executed later, when the
depends are installed and we are building various tags of Osmocom repos,
including osmo-mgw 1.4.0.

While at it, slightly refactor build_repo() to put all arguments into
descriptive variable names (as it is getting a bit longer now).

[1]: Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908

Related: OS#3867
Change-Id: I63d16f8e44c14dee46e2ef3fd050a421017c56b0
---
M scripts/osmocom-build-old-tags-against-master.sh
1 file changed, 47 insertions(+), 10 deletions(-)



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

diff --git a/scripts/osmocom-build-old-tags-against-master.sh 
b/scripts/osmocom-build-old-tags-against-master.sh
index 0ac220e..b8fab38 100755
--- a/scripts/osmocom-build-old-tags-against-master.sh
+++ b/scripts/osmocom-build-old-tags-against-master.sh
@@ -2,6 +2,7 @@
 # Environment variables:
 # * PARALLEL_MAKE: -jN argument for make (default: -j5).
 # * SKIP_MASTER: don't build REPOS_MASTER (assume that they were just built 
and keep _temp).
+# * SKIP_LEGACY: don't build libosmo-legacy-mgcp (assume that it was just 
built and keep _temp).
 #
 # Latest result:
 # 
https://jenkins.osmocom.org/jenkins/job/Osmocom-build-tags-against-master/lastBuild/console
@@ -53,7 +54,9 @@
echo "1.0.0" # testsuite
;;
osmo-bsc)
-   echo "1.2.1" # depends on libosmo-legacy-mgcp
+   # Depends on libosmo-legacy-mgcp, but missing 
LIBOSMOLEGACYMGCP_CFLAGS so we can't build it with
+   # this script (we put that legacy lib into a different 
temp install dir). Fixed in 1.2.2.
+   echo "1.2.1"
echo "1.4.0" # testsuite
;;
osmo-bts)
@@ -97,9 +100,9 @@
 # Delete existing temp dir and create a new one, output the path.
 prepare_temp_dir() {
TEMP="$(cd ..; pwd)/_temp"
-   if [ -n "$SKIP_MASTER" ]; then
+   if [ -n "$SKIP_MASTER" ] || [ -n "$SKIP_LEGACY" ]; then
if ! [ -d "$TEMP" ]; then
-   echo "ERROR: SKIP_MASTER is set, but temp dir not 
found: $TEMP"
+   echo "ERROR: SKIP_MASTER or SKIP_LEGACY is set, but 
temp dir not found: $TEMP"
exit 1
fi
else
@@ -136,20 +139,27 @@
 # $1: installation path (either $TEMP/inst_master or $TEMP/inst)
 # $2: repository
 # $3: branch, tag or commit
+# $4: run tests (set to 0 to disable tests, default is 1)
 # returns: 0 on sucessful build, 1 on error
 build_repo() {
-   local log="$TEMP/log/$2-$3.txt"
+   local inst="$1"
+   local repo="$2"
+   local branch="$3"
+   local check=""
+   if [ "$4" != "0" ]; then
+   check="1"
+   fi

if ! PATH="$PWD:$PATH"\
-   
PKG_CONFIG_PATH="$TEMP/inst_master/lib/pkgconfig:$PKG_CONFIG_PATH" \
-   LD_LIBRARY_PATH="$TEMP/inst_master/lib:$LD_LIBRARY_PATH" \
+   
PKG_CONFIG_PATH="$TEMP/inst_master/lib/pkgconfig:$TEMP/inst_legacy/lib/pkgconfig:$PKG_CONFIG_PATH"
 \
+   
LD_LIBRARY_PATH="$TEMP/inst_master/lib:$TEMP/inst_legacy/lib:$LD_LIBRARY_PATH" \
MAKE="make" \
PARALLEL_MAKE="$PARALLEL_MAKE" \
-   CHECK="1" \
+   CHECK="$check" \
deps="../_deps" \
-   inst="$1" \
-   ./osmo-build-dep.sh "$2" "$3" \
-   > "$log" 2>&1
+   inst="$inst" \
+   ./osmo-build-dep.sh "$repo" "$branch" \
+   > "$TEMP/log/$repo-$branch.txt" 2>&1
then
return 1
fi
@@ -183,6 +193,32 @@
done
 }

+# Build libosmo-legacy-mgcp and install to $TEMP/inst_legacy (osmo-bsc 1.2.1 
depends on it).
+build_legacy_mgcp() {
+   echo "Building legacy libraries..."
+
+   if [ -n "$SKIP_LEGACY" ]; then
+   echo "=> SKIPPED (SKIP_LEGACY is set)"
+   return
+   fi
+
+   local repo="osmo-mgw"
+   local tag="1.4.0"
+
+   # Don't run "make check" here. The script tries it during 
build_repos_tags() instead.
+   local check="0"
+   printf "%-21s %10s %s" " * $repo" "$tag" "(provides 
libosmo-legacy-mgcp)"
+   if ! build_rep

Change in osmo-ci[master]: Cosmetic: build-old-tags: osmo-msc: note fixed in

2019-03-28 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13453


Change subject: Cosmetic: build-old-tags: osmo-msc: note fixed in
..

Cosmetic: build-old-tags: osmo-msc: note fixed in

Change-Id: If4d84e3c8c2b8d75136f7440a737956d654f2297
---
M scripts/osmocom-build-old-tags-against-master.sh
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/scripts/osmocom-build-old-tags-against-master.sh 
b/scripts/osmocom-build-old-tags-against-master.sh
index 548ac3d..0ac220e 100755
--- a/scripts/osmocom-build-old-tags-against-master.sh
+++ b/scripts/osmocom-build-old-tags-against-master.sh
@@ -64,7 +64,7 @@
echo "1.4.0" # testsuite
;;
osmo-msc)
-   echo "1.3.0" # -Werror and deprecated 
gsm0480_create_ussd_release_complete()
+   echo "1.3.0" # -Werror and deprecated 
gsm0480_create_ussd_release_complete(), fixed in 1.3.1
;;
osmo-pcu)
echo "0.5.0" # testsuite

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

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


Change in osmo-bsc[osmith/release-1.2.2]: Bump version: 1.2.1.1-fb26e → 1.2.2

2019-03-28 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13452


Change subject: Bump version: 1.2.1.1-fb26e → 1.2.2
..

Bump version: 1.2.1.1-fb26e → 1.2.2

Change-Id: Idd1d5c212d5f156ae1327a75b368879a90a6859a
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)



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

diff --git a/debian/changelog b/debian/changelog
index 461b0c9..787a35c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+osmo-bsc (1.2.2) unstable; urgency=medium
+
+  * osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS
+
+ -- Oliver Smith   Thu, 28 Mar 2019 16:36:58 +0100
+
 osmo-bsc (1.2.1) unstable; urgency=medium

   [ Philipp Maier ]

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/release-1.2.2
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd1d5c212d5f156ae1327a75b368879a90a6859a
Gerrit-Change-Number: 13452
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-bsc[osmith/release-1.2.2]: osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS

2019-03-28 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13451


Change subject: osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS
..

osmo-bsc/Makefile.am: use LIBOSMOLEGACYMGCP_CFLAGS

Fix the following compile error, when libosmo-legacy-mgcp is installed,
but into a different prefix than the other libosmo* libraries:

In file included from osmo_bsc_msc.c:23:0:
../../include/osmocom/bsc/bsc_nat.h:24:38: fatal error: 
osmocom/legacy_mgcp/mgcp.h: No such file or directory
 #include 

This is needed for a new CI job, which builds old Osmocom releases
against current master of all Osmocom libraries. libosmo-legacy-mgcp is
provided by osmo-mgw 1.4.0 and was removed in later versions, so we
want to have the 1.4.0 version installed into a fallback directory only.

Related: OS#3867
Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908
---
M src/osmo-bsc/Makefile.am
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index cc96743..a04b6f2 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -15,6 +15,7 @@
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
$(LIBOSMOMGCPCLIENT_CFLAGS) \
+   $(LIBOSMOLEGACYMGCP_CFLAGS) \
$(NULL)

 AM_LDFLAGS = \

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/release-1.2.2
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908
Gerrit-Change-Number: 13451
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-msc[master]: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/13450


Change subject: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()
..

libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

A memleak has been noticed after executing some of TTCN-3 test
cases. For example, the following ones:

  - MSC_Tests.TC_lu_and_mo_sms,
  - MSC_Tests.TC_lu_and_mt_sms.

The key point is that a test case basically disconnects too quick,
leaving some MT SMS messages (e.g. delivery reports) undelivered,
so they are getting stored in the SMSC's database.

As soon as the SMS queue is triggered, sms_submit_pending() would
retrieve pending messages from the database by calling function
smsq_take_next_sms() in loop.

This function in it's turn checks whether the subscriber is attached
or not. If not, the allocated 'gsm_sms' structure would not be
free()ed! Therefore, every time smsq_take_next_sms() is called,
a 'gsm_sms' structure for unattached subscriber is leaked.

Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Closes: OS#3860
---
M src/libmsc/sms_queue.c
1 file changed, 6 insertions(+), 1 deletion(-)



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

diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index c924dde..2987eba 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -226,8 +226,13 @@
osmo_strlcpy(last_msisdn, sms->dst.addr, last_msisdn_buflen);

/* Is the subscriber attached? If not, go to next SMS */
-   if (!sms->receiver || !sms->receiver->lu_complete)
+   if (!sms->receiver || !sms->receiver->lu_complete) {
+   LOGP(DLSMS, LOGL_DEBUG,
+"Subscriber %s is not attached, skipping SMS 
%llu\n",
+vlr_subscr_msisdn_or_name(sms->receiver), sms->id);
+   talloc_free(sms);
continue;
+   }

return sms;
}

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Gerrit-Change-Number: 13450
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in openbsc[master]: vty_test_runner: Handle MGCP message recv len dynamically

2019-03-28 Thread Pau Espin Pedrol
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13435

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

Change subject: vty_test_runner: Handle MGCP message recv len dynamically
..

vty_test_runner: Handle MGCP message recv len dynamically

Change-Id: I536d78a2a1962240e5e369cda9927d8c9955ab86
---
M openbsc/tests/vty_test_runner.py
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/35/13435/2
--
To view, visit https://gerrit.osmocom.org/13435
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I536d78a2a1962240e5e369cda9927d8c9955ab86
Gerrit-Change-Number: 13435
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

2019-03-28 Thread Pau Espin Pedrol
Hello Vadim Yanitskiy, Harald Welte, osmith, Jenkins Builder,

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

https://gerrit.osmocom.org/13433

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

Change subject: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones
..

Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

ipa_ccm_idtag_parse_off is broken, and can only be used with
len_offset=1 on ID Request messages, otherwise won't work correctly.
Modify ipa_ccm_idtag_parse to at least parse those correctly, and
document the limitations.

Those two functions are already deprecated and only used in openbsc by 3
callers:
* ipa_ccm_idtag_parse in ussd_read_cb(): Broken, that function can only
work for Requests and it's used to parse a Response.
* ipa_ccm_idtag_parse_off in forward_sccp_to_msc (NAT): Broken, it can
only be used to parse Requests and it's used to parse a Response.
Furthermore, len_offset=2 is passed which makes no sense and most
probably it fails always, or can even make the program crash.
* ipa_ccm_idtag_parse_off in (answer_challenge): This one is fine and
could actually be replaced with ipa_ccm_id_get_parse after libosmocore
commit (see below) is merged.

See libosmocore I6efc852dfc041192f554e41a58290a0f63298021 for more information.

As a consequence of the fixes, osmo-bsc-nat now parses messages sent
from VTY test correctly and thus it goes into processing them instead of
silently dropping them. As a result, some VTY tests fail because they
are sending incorrect format (missing NULL char in unit id strings) and
osmo-bsc-nat closses its connection (due to bad auth).

Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
---
M openbsc/src/osmo-bsc/osmo_bsc_msc.c
M openbsc/src/osmo-bsc_nat/bsc_nat.c
M openbsc/src/osmo-bsc_nat/bsc_ussd.c
M openbsc/tests/vty_test_runner.py
4 files changed, 10 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/33/13433/3
--
To view, visit https://gerrit.osmocom.org/13433
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
Gerrit-Change-Number: 13433
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-CC: Daniel Willmann 


Change in osmo-msc[master]: libmsc: fix: properly initialize the SGs server

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13373 )

Change subject: libmsc: fix: properly initialize the SGs server
..

libmsc: fix: properly initialize the SGs server

It was observed that the SGs server is started before
the actual VTY configuration is parsed. For example:

  sgs
   local-port 
   local-ip 127.0.0.1
   vlr-name vlr.example.net

produces the following debug output:

  <0011> sgs_server.c:185 SGs socket bound to r=NULL<->l=0.0.0.0:29118
  DLSS7 NOTICE <001e> osmo_ss7.c:1284 0: ASP Restart for server not implemented 
yet!
  DSGS NOTICE <0011> sgs_server.c:185 SGs socket bound to 
r=NULL<->l=0.0.0.0:
  DSGS NOTICE <0011> sgs_server.c:185 SGs socket bound to 
r=NULL<->l=127.0.0.1:
  DMNCC DEBUG <0004> msc_main.c:604 Using internal MNCC handler.

The first startup is triggered by sgs_iface_init(), before reading
the VTY configuration, so the logging style is different. The next
two calls to sgs_server_open() are triggered during reading of the
VTY configuration by cfg_sgs_local_port() and cfg_sgs_local_ip().

Let's avoid starting the SGs server three times, and do it once,
after the VTY configuration is parsed. Also, keep the possibility
to change the binding parameters at run-time.

Change-Id: Ie0c31205ac48be7e50d0380a89833771b2708da4
---
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_vty.c
M src/osmo-msc/msc_main.c
3 files changed, 16 insertions(+), 8 deletions(-)

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



diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index 95b68f8..450d552 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -1258,8 +1258,6 @@
return NULL;
g_sgs = sgs;

-   sgs_server_open(sgs);
-
return sgs;
 }

diff --git a/src/libmsc/sgs_vty.c b/src/libmsc/sgs_vty.c
index 8ba5a79..dbf2607 100644
--- a/src/libmsc/sgs_vty.c
+++ b/src/libmsc/sgs_vty.c
@@ -56,9 +56,11 @@
osmo_strlcpy(sgs->cfg.local_addr, argv[0], sizeof(sgs->cfg.local_addr));
osmo_stream_srv_link_set_addr(sgs->srv_link, sgs->cfg.local_addr);

-   rc = sgs_server_open(sgs);
-   if (rc < 0)
-   return CMD_WARNING;
+   if (vty->type != VTY_FILE) {
+   rc = sgs_server_open(sgs);
+   if (rc < 0)
+   return CMD_WARNING;
+   }

return CMD_SUCCESS;
 }
@@ -74,9 +76,11 @@
sgs->cfg.local_port = atoi(argv[0]);
osmo_stream_srv_link_set_port(sgs->srv_link, sgs->cfg.local_port);

-   rc = sgs_server_open(sgs);
-   if (rc < 0)
-   return CMD_WARNING;
+   if (vty->type != VTY_FILE) {
+   rc = sgs_server_open(sgs);
+   if (rc < 0)
+   return CMD_WARNING;
+   }

return CMD_SUCCESS;
 }
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index f29b2a8..b55d38f 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -62,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 

 #ifdef BUILD_IU
 #include 
@@ -692,6 +693,11 @@
return 8;
}

+   if (sgs_server_open(g_sgs)) {
+   printf("Starting SGs server failed\n");
+   return 9;
+   }
+
 #ifdef BUILD_IU
/* Set up IuCS */
ranap_iu_init(tall_msc_ctx, DRANAP, "OsmoMSC-IuCS", 
msc_network->iu.sccp, rcvmsg_iu_cs, rx_iu_event);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0c31205ac48be7e50d0380a89833771b2708da4
Gerrit-Change-Number: 13373
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: osmo_escape_str_buf: Always copy, don't return input string pointer

2019-03-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13447 )

Change subject: osmo_escape_str_buf: Always copy, don't return input string 
pointer
..


Patch Set 1: Code-Review+1

(2 comments)

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

https://gerrit.osmocom.org/#/c/13447/1//COMMIT_MSG@10
PS1, Line 10: if no escaping was needed, it would return the original pointe 
without
typo: pointer


https://gerrit.osmocom.org/#/c/13447/1//COMMIT_MSG@11
PS1, Line 11: making any copy to the output buffer.  While this seems like a 
elegant
an elegant



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a02bdb27008a73101c2db41ac04248960ed4064
Gerrit-Change-Number: 13447
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 28 Mar 2019 12:59:33 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: HLR_Tests.ttcn: suspend some compilation warnings

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/13448


Change subject: HLR_Tests.ttcn: suspend some compilation warnings
..

HLR_Tests.ttcn: suspend some compilation warnings

In the most use cases of f_SS_expect() we are not interested in
GSUP_PDU returned by this function. Calling it without storing
the returned value causes TTCN-3 compiler to complain:

  warning: The value returned by function
   `@HLR_Tests.f_SS_expect' is not used

Let's make use of previously unused variable 'res', and save
the returned GSUP_PDU to make the TTCN-3 compiler happy.

Change-Id: Ifda42aa18af8076013b436364513296b2b008731
---
M hlr/HLR_Tests.ttcn
1 file changed, 34 insertions(+), 20 deletions(-)



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

diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index e32fa68..da6ad7c 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -783,8 +783,9 @@
ussd_string := "*#200#");
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_STATE_BEGIN, 
ss)));
-   f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, 
OSMO_GSUP_SESSION_STATE_END,
-   tr_SS_FACILITY_RETURN_ERROR(1, 18));
+   res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid,
+  OSMO_GSUP_SESSION_STATE_END,
+  tr_SS_FACILITY_RETURN_ERROR(1, 18));
 }
 testcase TC_mo_ussd_unknown() runs on test_CT {
var HlrSubscriberList sl;
@@ -809,8 +810,9 @@
ussd_string := "*100#");
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_STATE_BEGIN, 
ss)));
-   f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, 
OSMO_GSUP_SESSION_STATE_END,
-   tr_SS_FACILITY_RETURN_ERROR(1, 34));
+   res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid,
+  OSMO_GSUP_SESSION_STATE_END,
+  tr_SS_FACILITY_RETURN_ERROR(1, 34));
 }
 testcase TC_mo_ussd_euse_disc() runs on test_CT {
var HlrSubscriberList sl;
@@ -837,8 +839,10 @@
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_STATE_BEGIN, 
ss)));
resp_str := "Your IMSI is " & hex2str(g_pars.sub.imsi);
-   f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, 
OSMO_GSUP_SESSION_STATE_END,
-   tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS, f_encGSM7bit(resp_str)));
+   res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid,
+  OSMO_GSUP_SESSION_STATE_END,
+  tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS,
+
f_encGSM7bit(resp_str)));
 }
 testcase TC_mo_ussd_iuse_imsi() runs on test_CT {
var HlrSubscriberList sl;
@@ -865,8 +869,10 @@
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_STATE_BEGIN, 
ss)));
resp_str := "Your extension is " & hex2str(g_pars.sub.msisdn);
-   f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, 
OSMO_GSUP_SESSION_STATE_END,
-   tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS, f_encGSM7bit(resp_str)));
+   res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid,
+  OSMO_GSUP_SESSION_STATE_END,
+  tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS,
+
f_encGSM7bit(resp_str)));
 }
 testcase TC_mo_ussd_iuse_msisdn() runs on test_CT {
var HlrSubscriberList sl;
@@ -893,8 +899,10 @@
ussd_string := "*100#");
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_STATE_BEGIN, 
ss)));
-   f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, 
OSMO_GSUP_SESSION_STATE_END,
-   tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS, f_encGSM7bit("*100#")));
+   res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid,
+  OSMO_GSUP_SESSION_STATE_END,
+  tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, 
SS_USSD_DEFAULT_DCS,
+
f_encGSM7bit("*100#")));
 }
 testcase TC_mo_ussd_euse() runs on test_CT {
var HlrSubscriberList sl;
@@ -925,8 +933,10 @@
GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid,
OSMO_GSUP_SESSION_

Change in osmo-ci[master]: ttcn3: Order tests by time triggered

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13449


Change subject: ttcn3: Order tests by time triggered
..

ttcn3: Order tests by time triggered

We had some load issues with many things running at once on jenkins.
This will at least make it easier from having colliding ttcn3 jobs.

I also changed ttcn3-sip-test to run at 7:30 instead of 7:00 where
ttcn3-bts-test runs.

Change-Id: I65f346a3fae2811c8314c26d4a5b3a528b8101f9
---
M jobs/ttcn3-testsuites.yml
1 file changed, 15 insertions(+), 15 deletions(-)



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

diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index 0558144..e3e6d5c 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -10,33 +10,33 @@
   - "{job-name}"
 # Folders from docker-playground.git
 job-name:
-  # nightly
+  # nightly - order by time
   - nplab-m3ua-test:
   timer: 00 03 * * *
   - nplab-sua-test:
   timer: 15 03 * * *
-  - ttcn3-bsc-test:
-  timer: 00 06 * * *
-  - ttcn3-bsc-test-sccplite:
-  timer: 30 08 * * *
-  - ttcn3-bts-test:
-  timer: 00 07 * * *
   - ttcn3-ggsn-test:
   timer: 00 04 * * *
-  - ttcn3-hlr-test:
-  timer: 45 06 * * *
-  - ttcn3-mgw-test:
-  timer: 30 06 * * *
   - ttcn3-msc-test:
   timer: 30 04 * * *
-  - ttcn3-sgsn-test:
-  timer: 30 05 * * *
-  - ttcn3-sip-test:
-  timer: 00 07 * * *
   - ttcn3-pcu-test:
   timer: 00 05 * * *
   - ttcn3-pcu-test-sns:
   timer: 15 05 * * *
+  - ttcn3-sgsn-test:
+  timer: 30 05 * * *
+  - ttcn3-bsc-test:
+  timer: 00 06 * * *
+  - ttcn3-mgw-test:
+  timer: 30 06 * * *
+  - ttcn3-hlr-test:
+  timer: 45 06 * * *
+  - ttcn3-bts-test:
+  timer: 00 07 * * *
+  - ttcn3-sip-test:
+  timer: 30 07 * * *
+  - ttcn3-bsc-test-sccplite:
+  timer: 30 08 * * *

   # latest stable
   - nplab-m3ua-test-latest:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65f346a3fae2811c8314c26d4a5b3a528b8101f9
Gerrit-Change-Number: 13449
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in libosmocore[master]: osmo_escape_str_buf: Always copy, don't return input string pointer

2019-03-28 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13447


Change subject: osmo_escape_str_buf: Always copy, don't return input string 
pointer
..

osmo_escape_str_buf: Always copy, don't return input string pointer

osmo_escape_str_buf() used to have the somewhat odd semantics that
if no escaping was needed, it would return the original pointe without
making any copy to the output buffer.  While this seems like a elegant
optimization, it is a very strange behavior and it works differently
than all of our other *_buf() functions.  Let's unify the API and
turn osmo_escape_str_buf() into a strlcpy() if no escaping is needed.

Change-Id: I3a02bdb27008a73101c2db41ac04248960ed4064
---
M include/osmocom/core/utils.h
M src/utils.c
M tests/utils/utils_test.c
M tests/utils/utils_test.ok
4 files changed, 10 insertions(+), 31 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/13447/1

diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 16159d3..e3728cd 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -137,7 +137,7 @@
 bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars);

 const char *osmo_escape_str(const char *str, int len);
-const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize);
+char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize);
 const char *osmo_quote_str(const char *str, int in_len);
 const char *osmo_quote_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize);

diff --git a/src/utils.c b/src/utils.c
index 2d5bcb0..019e733 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -538,14 +538,14 @@
return osmo_separated_identifiers_valid(str, NULL);
 }

-/*! Return the string with all non-printable characters escaped.
+/*! Return the string with all non-printable characters escapeda, in 
user-supplied buffer.
  * \param[in] str  A string that may contain any characters.
  * \param[in] len  Pass -1 to print until nul char, or >= 0 to force a length.
  * \param[inout] buf  string buffer to write escaped characters to.
  * \param[in] bufsize  size of \a buf.
- * \returns buf containing an escaped representation, possibly truncated, or 
str itself.
+ * \returns buf containing an escaped representation, possibly truncated.
  */
-const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize)
+char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize)
 {
int in_pos = 0;
int next_unprintable = 0;
@@ -567,9 +567,10 @@
 && str[next_unprintable] != '\\';
 next_unprintable++);

-   if (next_unprintable == in_len
-   && in_pos == 0)
-   return str;
+   if (next_unprintable == in_len && in_pos == 0) {
+   osmo_strlcpy(buf, str, bufsize);
+   return buf;
+   }

while (in_pos < next_unprintable && out_pos < out_len)
out[out_pos++] = str[in_pos++];
@@ -633,25 +634,13 @@
  */
 const char *osmo_quote_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize)
 {
-   const char *res;
int l;
if (!str)
return "NULL";
if (bufsize < 3)
return "";
buf[0] = '"';
-   res = osmo_escape_str_buf(str, in_len, buf + 1, bufsize - 2);
-   /* if osmo_escape_str_buf() returned the str itself, we need to copy it 
to buf to be able to
-* quote it. */
-   if (res == str) {
-   /* max_len = bufsize - two quotes - nul term */
-   int max_len = bufsize - 2 - 1;
-   if (in_len >= 0)
-   max_len = OSMO_MIN(in_len, max_len);
-   /* It is not allowed to pass unterminated strings into 
osmo_strlcpy() :/ */
-   strncpy(buf + 1, str, max_len);
-   buf[1 + max_len] = '\0';
-   }
+   osmo_escape_str_buf(str, in_len, buf + 1, bufsize - 2);
l = strlen(buf);
buf[l] = '"';
buf[l+1] = '\0'; /* both osmo_escape_str_buf() and max_len above ensure 
room for '\0' */
diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c
index d592fe0..711d6e1 100644
--- a/tests/utils/utils_test.c
+++ b/tests/utils/utils_test.c
@@ -545,7 +545,7 @@

printf("- passthru:\n");
res = osmo_escape_str(printable, -1);
-   if (res != printable)
+   if (strcmp(res, printable))
printf("NOT passed through! \"%s\"\n", res);
else
printf("passed through unchanged \"%s\"\n", res);
@@ -560,14 +560,6 @@
memset(out_buf, 0x7f, sizeof(out_buf));
printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, 
sizeof(in_buf), out_buf, 10));
OSMO_ASSERT(out_buf[10] =

Change in docker-playground[master]: Add first osmo-cn-latest image

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13438


Change subject: Add first osmo-cn-latest image
..

Add first osmo-cn-latest image

Core network in a container. Starts all the services, configuration
needs to be tweaked.

Change-Id: Icfddc75447fbd94f9d5c19408ccc7f3a914e083f
---
A osmo-cn-latest/.release
A osmo-cn-latest/Dockerfile
A osmo-cn-latest/Makefile
A osmo-cn-latest/Release.key
A osmo-cn-latest/osmo-ggsn.cfg
A osmo-cn-latest/osmo-hlr.cfg
A osmo-cn-latest/osmo-mgw.cfg
A osmo-cn-latest/osmo-msc.cfg
A osmo-cn-latest/osmo-sgsn.cfg
A osmo-cn-latest/osmo-stp.cfg
A osmo-cn-latest/run.sh
A osmo-cn-latest/runit/ggsn-run
A osmo-cn-latest/runit/hlr-run
A osmo-cn-latest/runit/mgw-run
A osmo-cn-latest/runit/msc-run
A osmo-cn-latest/runit/sgsn-run
A osmo-cn-latest/runit/stp-run
17 files changed, 343 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/38/13438/1

diff --git a/osmo-cn-latest/.release b/osmo-cn-latest/.release
new file mode 100644
index 000..334aa04
--- /dev/null
+++ b/osmo-cn-latest/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=osmo-cn-latest-0.0.0
diff --git a/osmo-cn-latest/Dockerfile b/osmo-cn-latest/Dockerfile
new file mode 100644
index 000..3b49c29
--- /dev/null
+++ b/osmo-cn-latest/Dockerfile
@@ -0,0 +1,45 @@
+FROM debian:stretch
+
+MAINTAINER Daniel Willmann 
+
+ARG 
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/";
+
+COPY   Release.key /tmp/Release.key
+
+RUNapt-get update && \
+   apt-get install -y --no-install-recommends \
+   gnupg
+
+RUNapt-key add /tmp/Release.key && \
+   rm /tmp/Release.key && \
+   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-latest.list
+
+ADD$OSMOCOM_REPO/Release /tmp/Release
+RUNapt-get update && \
+   apt-get install -y --no-install-recommends \
+   osmo-msc osmo-hlr osmo-sgsn osmo-ggsn osmo-mgw osmo-stp \
+   runit telnet iptables && \
+   apt-get clean
+
+WORKDIR/tmp
+
+VOLUME /data
+COPY   osmo-stp.cfg /data/osmo-stp.cfg
+COPY   osmo-msc.cfg /data/osmo-msc.cfg
+COPY   osmo-hlr.cfg /data/osmo-hlr.cfg
+COPY   osmo-mgw.cfg /data/osmo-mgw.cfg
+COPY   osmo-sgsn.cfg /data/osmo-sgsn.cfg
+COPY   osmo-ggsn.cfg /data/osmo-ggsn.cfg
+
+COPY   runit/stp-run /etc/service/osmo-stp/run
+COPY   runit/msc-run /etc/service/osmo-msc/run
+COPY   runit/hlr-run /etc/service/osmo-hlr/run
+COPY   runit/mgw-run /etc/service/osmo-mgw/run
+COPY   runit/sgsn-run /etc/service/osmo-sgsn/run
+COPY   runit/ggsn-run /etc/service/osmo-ggsn/run
+
+WORKDIR/data
+CMD["/sbin/runit"]
+
+
+EXPOSE 23000/udp
diff --git a/osmo-cn-latest/Makefile b/osmo-cn-latest/Makefile
new file mode 100644
index 000..8d0e10b
--- /dev/null
+++ b/osmo-cn-latest/Makefile
@@ -0,0 +1 @@
+include ../make/Makefile
diff --git a/osmo-cn-latest/Release.key b/osmo-cn-latest/Release.key
new file mode 100644
index 000..e656238
--- /dev/null
+++ b/osmo-cn-latest/Release.key
@@ -0,0 +1,20 @@
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc
+aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI
+ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw
+8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI
+L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb
+/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I
+ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi
+8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=Gvly
+-END PGP PUBLIC KEY BLOCK-
diff --git a/osmo-cn-latest/osmo-ggsn.cfg b/osmo-cn-latest/osmo-ggsn.cfg
new file mode 100644
index 000..899f261
--- /dev/null
+++ b/osmo-cn-latest/osmo-ggsn.cfg
@@ -0,0 +1,51 @@
+!
+! OpenGGSN (0.94.1-adac) configuration saved from vty
+!!
+!
+log file /data/osmo-ggsn.log
+  logging filter all 1
+  logging color 0
+  logging print category 1
+  logging timestamp 1
+  logging level ip info
+  logging level tun info
+  logging level ggsn info
+  logging level sgsn notice
+  logging level icmp6 debug
+  logging level lglobal notice
+  logging level llapd notice
+  logging level linp notice
+  logging level lmux notice
+  logging level lmi notice
+  logging level lmib notice
+  logging level lsms notice
+  logging level lctrl noti

Change in docker-playground[master]: osmo-cn-latest: Add config snippets for static CS7 configuration

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13446


Change subject: osmo-cn-latest: Add config snippets for static CS7 configuration
..

osmo-cn-latest: Add config snippets for static CS7 configuration

Change-Id: Ib19e870d208acefc1f2b2694752a35ee6505338f
---
A osmo-cn-latest/osmo-msc.cfg.cs7-static
A osmo-cn-latest/osmo-stp.cfg.cs7-static
2 files changed, 55 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/46/13446/1

diff --git a/osmo-cn-latest/osmo-msc.cfg.cs7-static 
b/osmo-cn-latest/osmo-msc.cfg.cs7-static
new file mode 100644
index 000..726022d
--- /dev/null
+++ b/osmo-cn-latest/osmo-msc.cfg.cs7-static
@@ -0,0 +1,7 @@
+cs7 instance 0
+ point-code 0.23.1
+ asp asp-clnt-OsmoMSC-A-Iu 2905 2904 m3ua
+  remote-ip 192.168.42.10
+ as as-clnt-OsmoMSC-A-Iu m3ua
+  asp asp-clnt-OsmoMSC-A-Iu
+  routing-key 1 0.23.1
diff --git a/osmo-cn-latest/osmo-stp.cfg.cs7-static 
b/osmo-cn-latest/osmo-stp.cfg.cs7-static
new file mode 100644
index 000..a8b4f21
--- /dev/null
+++ b/osmo-cn-latest/osmo-stp.cfg.cs7-static
@@ -0,0 +1,48 @@
+!
+! osmo-stp (0.0.6.3.179-b248) configuration saved from vty
+!!
+!
+log file /data/osmo-stp.log
+  logging filter all 1
+  logging color 0
+  logging print category 1
+  logging timestamp 1
+  logging level all everything
+  logging level lglobal notice
+  logging level llapd notice
+  logging level linp debug
+  logging level lmux notice
+  logging level lmi notice
+  logging level lmib notice
+  logging level lsms notice
+  logging level lctrl notice
+  logging level lgtp notice
+  logging level lstats notice
+  logging level lgsup notice
+  logging level loap notice
+  logging level lss7 debug
+  logging level lsccp debug
+  logging level lsua debug
+  logging level lm3ua debug
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+cs7 instance 0
+ asp asp-core 2904 2905 m3ua
+  remote-ip 192.168.42.10
+ asp asp-bss 2904 2905 m3ua
+  remote-ip 192.168.42.1
+ as as-core m3ua
+  asp asp-core
+  routing-key 1 0.23.1
+ as as-bss m3ua
+  asp asp-bss
+  routing-key 2 0.23.3
+ route-table system
+  update route 0.23.1 0.23.1 linkset as-core
+  update route 0.23.3 0.23.3 linkset as-bss
+ listen m3ua 2905
+  local-ip 192.168.42.10
+end

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib19e870d208acefc1f2b2694752a35ee6505338f
Gerrit-Change-Number: 13446
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Clarify steps for provisioning

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13444


Change subject: osmo-cn-latest: Clarify steps for provisioning
..

osmo-cn-latest: Clarify steps for provisioning

Change-Id: Ia55181c791cc66ae95ce41bb1c39092d38751ecb
---
M osmo-cn-latest/README
1 file changed, 6 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/44/13444/1

diff --git a/osmo-cn-latest/README b/osmo-cn-latest/README
index 293dee9..7e60cec 100644
--- a/osmo-cn-latest/README
+++ b/osmo-cn-latest/README
@@ -1,11 +1,13 @@
-You need a csv with the simcard data.
+You need a csv with the simcard data and osmo-config-merge needs to be in your
+path.

 To create hlr.db and change the mcc/mnc run:
-./create_hlr.py --mcc 901 --mnc 23 source.csv
+./provision_hlr.py --mcc 901 --mnc 23 source.csv

 This will create the hlr.db and a simcards.csv where the first digits of the
-IMSI will be changed to match the MCC/MNC. In order to reprogram the SIM cards
-run pySim-prog like this:
+IMSI will be changed to match the MCC/MNC. In order to reprogram the IMSIs of
+the SIM cards run pySim-prog:

 ./pySim-prog.py -p 0 -t sysmoUSIM-SJS1 --source=csv --read-csv=simcards.csv 
--read-iccid

+This is only needed if the mcc/mnc options are used.

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia55181c791cc66ae95ce41bb1c39092d38751ecb
Gerrit-Change-Number: 13444
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Add script to populate HLR

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13439


Change subject: osmo-cn-latest: Add script to populate HLR
..

osmo-cn-latest: Add script to populate HLR

Change-Id: I3ba73347a87e82422fcd3ec3da9acc4b70411003
---
A osmo-cn-latest/create_hlr.py
1 file changed, 147 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/39/13439/1

diff --git a/osmo-cn-latest/create_hlr.py b/osmo-cn-latest/create_hlr.py
new file mode 100755
index 000..4285ea6
--- /dev/null
+++ b/osmo-cn-latest/create_hlr.py
@@ -0,0 +1,147 @@
+#!/usr/bin/env python
+
+import csv
+import sys
+import sqlite3
+
+# 3G
+def create_hlr_3g(db):
+   conn = sqlite3.connect(db)
+   c = conn.execute(
+   """CREATE TABLE IF NOT EXISTS subscriber (
+   id INTEGER PRIMARY KEY AUTOINCREMENT,
+   imsiVARCHAR(15) UNIQUE NOT NULL,
+   msisdn  VARCHAR(15) UNIQUE,
+   imeisv  VARCHAR,
+   vlr_number  VARCHAR(15),
+   hlr_number  VARCHAR(15),
+   sgsn_number VARCHAR(15),
+   sgsn_addressVARCHAR,
+   ggsn_number VARCHAR(15),
+   gmlc_number VARCHAR(15),
+   smsc_number VARCHAR(15),
+   periodic_lu_tmr INTEGER,
+   periodic_rau_tau_tmr INTEGER,
+   nam_cs  BOOLEAN NOT NULL DEFAULT 1,
+   nam_ps  BOOLEAN NOT NULL DEFAULT 1,
+   lmsiINTEGER,
+   ms_purged_csBOOLEAN NOT NULL DEFAULT 0,
+   ms_purged_psBOOLEAN NOT NULL DEFAULT 0
+   );"""
+   )
+   c.close()
+   c = conn.execute(
+   """CREATE TABLE IF NOT EXISTS subscriber_apn (
+   subscriber_id   INTEGER,
+   apn VARCHAR(256) NOT NULL
+   );"""
+   )
+   c.close()
+   c = conn.execute(
+   """CREATE TABLE IF NOT EXISTS subscriber_multi_msisdn (
+   subscriber_id   INTEGER,
+   msisdn  VARCHAR(15) NOT NULL
+   );"""
+   )
+   c.close()
+   c = conn.execute(
+   """CREATE TABLE IF NOT EXISTS auc_2g (
+   subscriber_id   INTEGER PRIMARY KEY,
+   algo_id_2g  INTEGER NOT NULL,
+   ki  VARCHAR(32) NOT NULL
+   );"""
+   )
+   c.close()
+   c = conn.execute(
+   """CREATE TABLE IF NOT EXISTS auc_3g (
+   subscriber_id   INTEGER PRIMARY KEY,
+   algo_id_3g  INTEGER NOT NULL,
+   k   VARCHAR(32) NOT NULL,
+   op  VARCHAR(32),
+   opc VARCHAR(32),
+   sqn INTEGER NOT NULL DEFAULT 0,
+   ind_bitlen  INTEGER NOT NULL DEFAULT 5
+   );"""
+   )
+   c.close()
+   c = conn.execute(
+   """CREATE UNIQUE INDEX idx_subscr_imsi ON subscriber (imsi);"""
+   )
+   conn.commit()
+   conn.close()
+
+def write_hlr_3g(db, data):
+   conn = sqlite3.connect(db)
+   c = conn.execute(
+   'INSERT INTO subscriber ' +
+   '(imsi, msisdn) ' +
+   'VALUES ' +
+   '(?,?);',
+   [
+   data['imsi'],
+   data['extension']
+   ],
+   )
+   sub_id= c.lastrowid
+   c.close()
+   c = conn.execute(
+   'INSERT INTO auc_2g ' +
+   '(subscriber_id, algo_id_2g, ki)' +
+   'VALUES ' +
+   '(?,?,?);',
+   [
+   sub_id,
+   1,
+   data['ki']
+   ],
+   )
+   c.close()
+   c = conn.execute(
+   'INSERT INTO auc_3g ' +
+   '(subscriber_id, algo_id_3g, k, opc, sqn)' +
+   'VALUES ' +
+   '(?, ?, ?, ?, ?);',
+   [
+   sub_id,
+   5,
+   data['ki'],
+   data['opc'],
+   0
+   ],
+   )
+   conn.commit()
+   conn.close()
+
+def main(infilename):
+   csvfields = ['name', 'iccid', 'mcc', 'mnc', 'imsi', 'extension', 
'smsp', 'ki', 'opc', 'adm1']
+
+   create_hlr_3g("hlr.db")
+   inf = open(infilename, "r")
+   outf = open("simcards.csv", "w")
+
+   cr = csv.DictReader(inf)
+   cw = csv.DictWriter(outf, csvfields)
+
+   cw.writeheader()
+   for row in cr:
+   data = {}
+   data['name'] = "Subscriber " + row['iccid'][-6:-1]
+   data['iccid'] = row['iccid']
+   data['mcc'] = row['imsi'][0:3]
+   data['mnc

Change in docker-playground[master]: osmo-ci-latest: Add options to change mcc/mnc for SIM card data

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13440


Change subject: osmo-ci-latest: Add options to change mcc/mnc for SIM card data
..

osmo-ci-latest: Add options to change mcc/mnc for SIM card data

Change-Id: Ica348dc12f07a1a57729c4d97a40cf9c04e975c9
---
M osmo-cn-latest/create_hlr.py
1 file changed, 24 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/40/13440/1

diff --git a/osmo-cn-latest/create_hlr.py b/osmo-cn-latest/create_hlr.py
index 4285ea6..b754af7 100755
--- a/osmo-cn-latest/create_hlr.py
+++ b/osmo-cn-latest/create_hlr.py
@@ -3,8 +3,17 @@
 import csv
 import sys
 import sqlite3
+from optparse import OptionParser

-# 3G
+def parse_options():
+parser = OptionParser()
+
+parser.add_option("-c", "--mcc", dest="mcc", help="Mobile Country Code")
+parser.add_option("-n", "--mnc", dest="mnc", help="Mobile Network Code")
+(options, args) = parser.parse_args()
+
+return options, args
+
 def create_hlr_3g(db):
conn = sqlite3.connect(db)
c = conn.execute(
@@ -112,7 +121,10 @@
conn.commit()
conn.close()

-def main(infilename):
+def main():
+options, args = parse_options()
+
+infilename = args[0]
csvfields = ['name', 'iccid', 'mcc', 'mnc', 'imsi', 'extension', 
'smsp', 'ki', 'opc', 'adm1']

create_hlr_3g("hlr.db")
@@ -124,12 +136,18 @@

cw.writeheader()
for row in cr:
+   imsi = row['imsi']
+if options.mcc:
+imsi = options.mcc + imsi[3:]
+if options.mnc:
+imsi = imsi[0:3] + options.mnc + imsi[5:]
+
data = {}
data['name'] = "Subscriber " + row['iccid'][-6:-1]
data['iccid'] = row['iccid']
-   data['mcc'] = row['imsi'][0:3]
-   data['mnc'] = row['imsi'][3:5]
-   data['imsi'] = row['imsi']
+data['imsi'] = imsi
+   data['mcc'] = data['imsi'][0:3]
+   data['mnc'] = data['imsi'][3:5]
data['ki'] = row['ki']
data['opc'] = row['opc']
data['extension'] = row['iccid'][-6:-1]
@@ -143,5 +161,5 @@


 if __name__ == '__main__':
-main(sys.argv[1])
+main()


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica348dc12f07a1a57729c4d97a40cf9c04e975c9
Gerrit-Change-Number: 13440
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Add README with instructions for provisioning

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13441


Change subject: osmo-cn-latest: Add README with instructions for provisioning
..

osmo-cn-latest: Add README with instructions for provisioning

Change-Id: I3e29106373cb72773f4d8b9f164aa9a6163addc7
---
A osmo-cn-latest/README
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/41/13441/1

diff --git a/osmo-cn-latest/README b/osmo-cn-latest/README
new file mode 100644
index 000..293dee9
--- /dev/null
+++ b/osmo-cn-latest/README
@@ -0,0 +1,11 @@
+You need a csv with the simcard data.
+
+To create hlr.db and change the mcc/mnc run:
+./create_hlr.py --mcc 901 --mnc 23 source.csv
+
+This will create the hlr.db and a simcards.csv where the first digits of the
+IMSI will be changed to match the MCC/MNC. In order to reprogram the SIM cards
+run pySim-prog like this:
+
+./pySim-prog.py -p 0 -t sysmoUSIM-SJS1 --source=csv --read-csv=simcards.csv 
--read-iccid
+

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e29106373cb72773f4d8b9f164aa9a6163addc7
Gerrit-Change-Number: 13441
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in openbsc[master]: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

2019-03-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13433 )

Change subject: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones
..


Patch Set 2:

> looks good to me.  However, we should have at least some very basic
 > bsc-nat tests in operation (Daniel?) before merging a change like
 > this.

I could manually test with the VTY NAT tests that it's working better than it 
used to. I saw parsing working correctly on those paths which used to fail. I 
think it's fine merging right now.


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
Gerrit-Change-Number: 13433
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-CC: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 12:24:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: osmo-cn-latest: Use osmo-config-merge to configure the MSC

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13442


Change subject: osmo-cn-latest: Use osmo-config-merge to configure the MSC
..

osmo-cn-latest: Use osmo-config-merge to configure the MSC

Change-Id: I6ccebf041d6e4fd3f9e1c6d898e2787b7de9ccca
---
M osmo-cn-latest/create_hlr.py
R osmo-cn-latest/osmo-msc.cfg.base
2 files changed, 22 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/42/13442/1

diff --git a/osmo-cn-latest/create_hlr.py b/osmo-cn-latest/create_hlr.py
index b754af7..0a625a9 100755
--- a/osmo-cn-latest/create_hlr.py
+++ b/osmo-cn-latest/create_hlr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python

+import os, sys
 import csv
 import sys
 import sqlite3
@@ -127,7 +128,22 @@
 infilename = args[0]
csvfields = ['name', 'iccid', 'mcc', 'mnc', 'imsi', 'extension', 
'smsp', 'ki', 'opc', 'adm1']

-   create_hlr_3g("hlr.db")
+try:
+create_hlr_3g("hlr.db")
+except sqlite3.OperationalError:
+print("hlr.db already exists, please remove!\n");
+sys.exit(1)
+
+msc = open("osmo-msc.cfg.patch", "w")
+msc.write("network\n")
+msc.write(" network country code %s\n" %(options.mcc))
+msc.write(" mobile network code %s\n" %(options.mnc))
+msc.write(" short name OsmoMSC-%s-%s\n" %(options.mcc, options.mnc))
+msc.write(" long name OsmoMSC-%s-%s\n" %(options.mcc, options.mnc))
+msc.close()
+
+os.system("osmo-config-merge osmo-msc.cfg.base osmo-msc.cfg.patch > 
osmo-msc.cfg")
+
inf = open(infilename, "r")
outf = open("simcards.csv", "w")

diff --git a/osmo-cn-latest/osmo-msc.cfg b/osmo-cn-latest/osmo-msc.cfg.base
similarity index 77%
rename from osmo-cn-latest/osmo-msc.cfg
rename to osmo-cn-latest/osmo-msc.cfg.base
index 8924d1e..042d847 100644
--- a/osmo-cn-latest/osmo-msc.cfg
+++ b/osmo-cn-latest/osmo-msc.cfg.base
@@ -2,11 +2,11 @@
 ! OsmoMSC configuration saved from vty
 !
 log file /data/osmo-msc.log
-  logging filter all 1
-  logging color 1
-  logging print category 1
-  logging timestamp 0
-  logging level all everything
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 0
+ logging level all everything
 !
 line vty
  no login

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ccebf041d6e4fd3f9e1c6d898e2787b7de9ccca
Gerrit-Change-Number: 13442
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Add default osmo-msc.cfg

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13445


Change subject: osmo-cn-latest: Add default osmo-msc.cfg
..

osmo-cn-latest: Add default osmo-msc.cfg

Change-Id: I821f76ace7dfd666a6ba6aa382eafa6527af7ba6
---
A osmo-cn-latest/osmo-msc.cfg
1 file changed, 30 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/45/13445/1

diff --git a/osmo-cn-latest/osmo-msc.cfg b/osmo-cn-latest/osmo-msc.cfg
new file mode 100644
index 000..3015850
--- /dev/null
+++ b/osmo-cn-latest/osmo-msc.cfg
@@ -0,0 +1,30 @@
+!
+! OsmoMSC configuration saved from vty
+!
+log file /data/osmo-msc.log
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 0
+ logging level all everything
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+cs7 instance 0
+ asp asp-clnt-OsmoMSC-A-Iu 2905 2904 m3ua
+  remote-ip 192.168.42.10
+network
+ network country code 901
+ mobile network code 99
+ short name UNCONFIGURED
+ long name UNCONFIGURED
+ encryption a5 0
+ rrlp mode none
+ mm info 1
+msc
+ mgw remote-ip 127.0.0.1
+ assign-tmsi
+ auth-tuple-max-reuse-count 3
+ auth-tuple-reuse-on-error 1

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I821f76ace7dfd666a6ba6aa382eafa6527af7ba6
Gerrit-Change-Number: 13445
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in docker-playground[master]: osmo-cn-latest: Rename the script to provision the hlr

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13443


Change subject: osmo-cn-latest: Rename the script to provision the hlr
..

osmo-cn-latest: Rename the script to provision the hlr

Change-Id: I49e7578879a6880664faa5bb0ac3367880f538b5
---
R osmo-cn-latest/provision-hlr.py
1 file changed, 0 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/43/13443/1

diff --git a/osmo-cn-latest/create_hlr.py b/osmo-cn-latest/provision-hlr.py
similarity index 100%
rename from osmo-cn-latest/create_hlr.py
rename to osmo-cn-latest/provision-hlr.py

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49e7578879a6880664faa5bb0ac3367880f538b5
Gerrit-Change-Number: 13443
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in libosmocore[master]: ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse

2019-03-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13431 )

Change subject: ipa: Document ipa_ccm_idtag_parse_off and fix 
ipa_ccm_idtag_parse
..

ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse

ipa_ccm_idtag_parse_off is broken, and can only be used with
len_offset=1 on ID Request messages, otherwise won't work correctly.
Modify ipa_ccm_idtag_parse to at least parse those correctly, and
document the limitations.

Those two functions are already deprecated and only used in openbsc by 3
callers:
* ipa_ccm_idtag_parse in ussd_read_cb(): Broken, that function can only
work for Requests and it's used to parse a Response.
* ipa_ccm_idtag_parse_off in forward_sccp_to_msc (NAT): Broken, it can
only be used to parse Requests and it's used to parse a Response.
Furthermore, len_offset=2 is passed which makes no sense and most
probably it fails always, or can even make the program crash.
* ipa_ccm_idtag_parse_off in (answer_challenge): This one is fine and
could actually be replaced with ipa_ccm_id_get_parse after this commit
is merged.

Change-Id: I6efc852dfc041192f554e41a58290a0f63298021
---
M src/gsm/ipa.c
1 file changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index d423c26..8e64a1e 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -98,11 +98,21 @@
return idtag_names[tag];
 }

+/*! Parse the payload part of an IPA CCM ID GET, return \ref tlv_parsed 
format. */
 int ipa_ccm_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len)
 {
-   return ipa_ccm_idtag_parse_off(dec, buf, len, 0);
+   return ipa_ccm_idtag_parse_off(dec, buf, len, 1);
 }

+/*! Parse the payload part of an IPA CCM ID GET, return \ref tlv_parsed format.
+ * WARNING: This function can only parse correctly IPA CCM ID GET/REQUEST
+ * messages, and only when len_offset is passed value of 1.
+ *  \param[out] dec Caller-provided/allocated output structure for parsed 
payload
+ *  \param[in] buf Buffer containing the payload (excluding 1 byte msg_type) 
of the message
+ *  \param[in] len Length of \a buf in octets
+ *  \param[in] len_offset Offset from end of len field to start of value 
(ommiting tag). Must be 1!
+ *  \returns 0 on success; negative on error
+ */
 int ipa_ccm_idtag_parse_off(struct tlv_parsed *dec, unsigned char *buf, int 
len, const int len_offset)
 {
uint8_t t_len;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6efc852dfc041192f554e41a58290a0f63298021
Gerrit-Change-Number: 13431
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in libosmocore[master]: ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse

2019-03-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13431 )

Change subject: ipa: Document ipa_ccm_idtag_parse_off and fix 
ipa_ccm_idtag_parse
..


Set Ready For Review


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6efc852dfc041192f554e41a58290a0f63298021
Gerrit-Change-Number: 13431
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 12:22:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: ipa: Fix ipa_ccm_id_resp_parse on big endian systems

2019-03-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13432 )

Change subject: ipa: Fix ipa_ccm_id_resp_parse on big endian systems
..

ipa: Fix ipa_ccm_id_resp_parse on big endian systems

Change-Id: Iedc46ab53a4f76bbd98741c065fad3d9042a34a4
---
M src/gsm/ipa.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 8e64a1e..1563d0a 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -204,8 +204,8 @@

while (len >= 3) {
len -= 3;
-   t_len = *cur++ << 8;
-   t_len += *cur++;
+   t_len = osmo_load16be(cur);
+   cur += 2;
t_tag = *cur++;

if (t_len > len + 1) {

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iedc46ab53a4f76bbd98741c065fad3d9042a34a4
Gerrit-Change-Number: 13432
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ttcn3-hacks[master]: mgw: Ensure TC_selftest passed if no error is encountered

2019-03-28 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13437


Change subject: mgw: Ensure TC_selftest passed if no error is encountered
..

mgw: Ensure TC_selftest passed if no error is encountered

Change-Id: Ie1601d57ac5bf9ddf99cbbd1cdb91160dc47c84d
---
M mgw/MGCP_Test.ttcn
1 file changed, 3 insertions(+), 0 deletions(-)



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

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 467ebfc..8cb2404 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -151,6 +151,9 @@
log(c_crcx510_ret);
log(dec_MgcpResponse(c_crcx510_ret));
log(dec_MgcpMessage(c_crcx510_ret));
+
+   /* We didn't encounter any DTE, so pass the test */
+   setverdict(pass);
}

/* CRCX test ideas:

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1601d57ac5bf9ddf99cbbd1cdb91160dc47c84d
Gerrit-Change-Number: 13437
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-msc[master]: Add vty option to globally enable LCLS

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13421 )

Change subject: Add vty option to globally enable LCLS
..


Patch Set 6:

> I'm wondering if we should add some kind of warning, that the option has no 
> effect yet. [...]

I would rather avoid merging this patch at all until the corresponding code is 
introduced. For now, we can mark it as WIP.


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
Gerrit-Change-Number: 13421
Gerrit-PatchSet: 6
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 12:07:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: Add vty option to globally enable LCLS

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13421 )

Change subject: Add vty option to globally enable LCLS
..


Patch Set 6: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
Gerrit-Change-Number: 13421
Gerrit-PatchSet: 6
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 12:06:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: Add vty option to globally enable LCLS

2019-03-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13421 )

Change subject: Add vty option to globally enable LCLS
..


Patch Set 6:

(2 comments)

Review points addressed.

I'm wondering if we should add some kind of warning, that the option has no 
effect yet. I don't see a follow up patch, that will actually use this option, 
so it seems like it will stay in this state for some time.

https://gerrit.osmocom.org/#/c/13421/5/include/osmocom/msc/vlr.h
File include/osmocom/msc/vlr.h:

https://gerrit.osmocom.org/#/c/13421/5/include/osmocom/msc/vlr.h@277
PS5, Line 277: enable_lcls;
> Cosmetic: other symbols here are using imperative style, so "enable_lcls" 
> would be better.
Done


https://gerrit.osmocom.org/#/c/13421/5/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/13421/5/src/libmsc/msc_vty.c@408
PS5, Line 408: lcls enable
> Are you (you anyone else) going to add more LCLS related parameters? If yes, 
> it would make sense to  […]
Done. I went with this instead of '"lcls-mode (disable|enable-all)"' proposed 
by Harald, because "lcls enable" seems more flexible to me.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
Gerrit-Change-Number: 13421
Gerrit-PatchSet: 6
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 28 Mar 2019 10:32:47 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: Add vty option to globally enable LCLS

2019-03-28 Thread osmith
osmith has uploaded a new patch set (#6) to the change originally created by 
Max. ( https://gerrit.osmocom.org/13421 )

Change subject: Add vty option to globally enable LCLS
..

Add vty option to globally enable LCLS

It's disabled by default and will be used in follow-up patches.

Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
---
M include/osmocom/msc/vlr.h
M src/libmsc/msc_vty.c
M tests/test_nodes.vty
3 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/21/13421/6
--
To view, visit https://gerrit.osmocom.org/13421
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
Gerrit-Change-Number: 13421
Gerrit-PatchSet: 6
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-msc[master]: libmsc/sgs_iface.c: fix copy-paste error

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13370 )

Change subject: libmsc/sgs_iface.c: fix copy-paste error
..

libmsc/sgs_iface.c: fix copy-paste error

Change-Id: I57b773659302ad4c92b6e670c6156e90a50189ba
---
M src/libmsc/sgs_iface.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index 4f262a5..f2e74cb 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -51,7 +51,7 @@

 /* A pointer to the GSM network we work with. By the current paradigm,
  * there can only be one gsm_network per MSC. The pointer is set once
- * when calling a_init() */
+ * when calling sgs_iface_init() */
 static struct gsm_network *gsm_network = NULL;

 static struct osmo_fsm sgs_vlr_reset_fsm;

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I57b773659302ad4c92b6e670c6156e90a50189ba
Gerrit-Change-Number: 13370
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: libmsc/sgs_vty.c: don't print SGs socket error twice

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13372 )

Change subject: libmsc/sgs_vty.c: don't print SGs socket error twice
..

libmsc/sgs_vty.c: don't print SGs socket error twice

Because sgs_server_open() already does this.

Change-Id: Ifea308645c7829691dbcf53e4f59841090119006
---
M src/libmsc/sgs_vty.c
1 file changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/src/libmsc/sgs_vty.c b/src/libmsc/sgs_vty.c
index 8c94301..8ba5a79 100644
--- a/src/libmsc/sgs_vty.c
+++ b/src/libmsc/sgs_vty.c
@@ -57,10 +57,8 @@
osmo_stream_srv_link_set_addr(sgs->srv_link, sgs->cfg.local_addr);

rc = sgs_server_open(sgs);
-   if (rc < 0) {
-   vty_out(vty, "%% SGs socket cannot be opened: %s%s", 
strerror(errno), VTY_NEWLINE);
+   if (rc < 0)
return CMD_WARNING;
-   }

return CMD_SUCCESS;
 }
@@ -77,10 +75,8 @@
osmo_stream_srv_link_set_port(sgs->srv_link, sgs->cfg.local_port);

rc = sgs_server_open(sgs);
-   if (rc < 0) {
-   vty_out(vty, "%% SGs socket cannot be opened: %s%s", 
strerror(errno), VTY_NEWLINE);
+   if (rc < 0)
return CMD_WARNING;
-   }

return CMD_SUCCESS;
 }

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifea308645c7829691dbcf53e4f59841090119006
Gerrit-Change-Number: 13372
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: libmsc/sgs_iface.c: register sgs_vlr_reset_fsm on DSO load

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13371 )

Change subject: libmsc/sgs_iface.c: register sgs_vlr_reset_fsm on DSO load
..

libmsc/sgs_iface.c: register sgs_vlr_reset_fsm on DSO load

Change-Id: I80cd2e5645d6e391080376250c0853a3f3f821ef
---
M src/libmsc/sgs_iface.c
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c
index f2e74cb..95b68f8 100644
--- a/src/libmsc/sgs_iface.c
+++ b/src/libmsc/sgs_iface.c
@@ -1258,8 +1258,12 @@
return NULL;
g_sgs = sgs;

-   osmo_fsm_register(&sgs_vlr_reset_fsm);
sgs_server_open(sgs);

return sgs;
 }
+
+static __attribute__((constructor)) void on_dso_load(void)
+{
+   OSMO_ASSERT(osmo_fsm_register(&sgs_vlr_reset_fsm) == 0);
+}

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I80cd2e5645d6e391080376250c0853a3f3f821ef
Gerrit-Change-Number: 13371
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13389 )

Change subject: src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I970b493f3a64fbe9c3f68fcfba5097ee3ff72960
Gerrit-Change-Number: 13389
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 28 Mar 2019 10:07:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()

2019-03-28 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13389 )

Change subject: src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()
..

src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()

In gsmtap_source_init() we dynamically allocate a gsmtap_inst struct,
but don't free it if the subsequent call to osmo_fd_register() fails.

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

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c
index fd0bcc9..2fb18a4 100644
--- a/src/gsmtap_util.c
+++ b/src/gsmtap_util.c
@@ -440,6 +440,7 @@

rc = osmo_fd_register(>i->wq.bfd);
if (rc < 0) {
+   talloc_free(gti);
close(fd);
return NULL;
}

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I970b493f3a64fbe9c3f68fcfba5097ee3ff72960
Gerrit-Change-Number: 13389
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: make use of OTC_GLOBAL when allocating library-internal contexts

2019-03-28 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13338

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

Change subject: make use of OTC_GLOBAL when allocating library-internal contexts
..

make use of OTC_GLOBAL when allocating library-internal contexts

As libosmcore is now managing the global talloc contexts, there's
no point in having APIs where the user tells the library about
which talloc contexts to use for a given sub-system.

Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1
---
M include/osmocom/core/signal.h
M src/counter.c
M src/ctrl/control_vty.c
M src/gb/gprs_bssgp.c
M src/gsm/lapd_core.c
M src/logging.c
M src/signal.c
M src/stats.c
M src/vty/telnet_interface.c
M tests/ctrl/ctrl_test.c
10 files changed, 42 insertions(+), 24 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1
Gerrit-Change-Number: 13338
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in libosmocore[master]: make all library-internal static buffers thread-local

2019-03-28 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13436


Change subject: make all library-internal static buffers thread-local
..

make all library-internal static buffers thread-local

We have a number of library-internal static global buffers which are
mainly used for various stringification functions.  This worked as
all of the related Osmocom programs were strictly single-threaded.

Let's make those buffers at least thread-local.  This way every thread
gets their own set of buffers, and it's safe for multiple threads to
execute the same functiosn once.  They're of course still not
re-entrant.  If you need re-entrancy, you will need to use the _c()
or _buf() suffix versionf of those functions and work with your own
(stack or heap) buffers.

Change-Id: I50eb2436a7c1261d79a9d2955584dce92780ca07
---
M src/fsm.c
M src/gb/gprs_ns.c
M src/gsm/abis_nm.c
M src/gsm/apn.c
M src/gsm/gsm0808_utils.c
M src/gsm/gsm23003.c
M src/gsm/gsm48.c
M src/gsm/gsm_utils.c
M src/gsm/rsl.c
M src/msgb.c
M src/sim/core.c
M src/socket.c
M src/utils.c
13 files changed, 31 insertions(+), 32 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/13436/1

diff --git a/src/fsm.c b/src/fsm.c
index d86ff4b..351e490 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -412,7 +412,7 @@
  */
 const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event)
 {
-   static char buf[32];
+   static __thread char buf[32];
if (!fsm->event_names) {
snprintf(buf, sizeof(buf), "%"PRIu32, event);
return buf;
@@ -442,7 +442,7 @@
  */
 const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state)
 {
-   static char buf[32];
+   static __thread char buf[32];
if (state >= fsm->num_states) {
snprintf(buf, sizeof(buf), "unknown %"PRIu32, state);
return buf;
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index d72003e..e4141ee 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -1548,7 +1548,7 @@

 const char *gprs_ns_ll_str(const struct gprs_nsvc *nsvc)
 {
-   static char buf[80];
+   static __thread char buf[80];
return gprs_ns_ll_str_buf(buf, sizeof(buf), nsvc);
 }

diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c
index a4c0e41..3fb8f0f 100644
--- a/src/gsm/abis_nm.c
+++ b/src/gsm/abis_nm.c
@@ -939,7 +939,7 @@

 const char *abis_nm_dump_foh(const struct abis_om_fom_hdr *foh)
 {
-   static char foh_buf[128];
+   static __thread char foh_buf[128];
return abis_nm_dump_foh_buf(foh_buf, sizeof(foh_buf), foh);
 }

diff --git a/src/gsm/apn.c b/src/gsm/apn.c
index 88b45a4..a7074ea 100644
--- a/src/gsm/apn.c
+++ b/src/gsm/apn.c
@@ -31,7 +31,7 @@
 #define APN_OI_GPRS_FMT"mnc%03u.mcc%03u.gprs"
 #define APN_GPRS_FMT   "%s.mnc%03u.mcc%03u.gprs"

-static char apn_strbuf[APN_MAXLEN+1];
+static __thread char apn_strbuf[APN_MAXLEN+1];

 char *osmo_apn_qualify_buf(char *buf, size_t buf_len, unsigned int mcc, 
unsigned int mnc, const char *ni)
 {
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 99cf188..c86496d 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -592,7 +592,7 @@
return ret;
 }

-static char dbuf[256];
+static __thread char dbuf[256];

 /*! Dump LCLS parameters (GCR excluded) into string for printing.
  *  \param[out] buf caller-allocated output string buffer
@@ -1799,7 +1799,7 @@
  */
 const char *gsm0808_cell_id_name(const struct gsm0808_cell_id *cid)
 {
-   static char buf[64];
+   static __thread char buf[64];
return gsm0808_cell_id_name_buf(buf, sizeof(buf), cid);
 }

@@ -1809,7 +1809,7 @@
  */
 const char *gsm0808_cell_id_name2(const struct gsm0808_cell_id *cid)
 {
-   static char buf[64];
+   static __thread char buf[64];
return gsm0808_cell_id_name_buf(buf, sizeof(buf), cid);
 }

@@ -1866,7 +1866,7 @@
  * See also gsm0808_cell_id_list_name_buf(). */
 const char *gsm0808_cell_id_list_name(const struct gsm0808_cell_id_list2 *cil)
 {
-   static char buf[1024];
+   static __thread char buf[1024];
gsm0808_cell_id_list_name_buf(buf, sizeof(buf), cil);
return buf;
 }
@@ -1893,7 +1893,7 @@

 const char *gsm0808_channel_type_name(const struct gsm0808_channel_type *ct)
 {
-   static char buf[128];
+   static __thread char buf[128];
return gsm0808_channel_type_name_buf(buf, sizeof(buf), ct);
 }

diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c
index 6a8e509..20ee1ca 100644
--- a/src/gsm/gsm23003.c
+++ b/src/gsm/gsm23003.c
@@ -107,7 +107,7 @@
  */
 const char *osmo_mcc_name(uint16_t mcc)
 {
-   static char buf[8];
+   static __thread char buf[8];
return osmo_mcc_name_buf(buf, sizeof(buf), mcc);
 }

@@ -158,7 +158,7 @@
  */
 const char *osmo_mnc_name(uint16_t mnc, bool mnc_3_digits)
 {
-   static char buf[8];
+   static __thread char buf[8];

Change in osmo-ci[master]: build-old-tags: known error: osmo-bts-1.0.0

2019-03-28 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13430 )

Change subject: build-old-tags: known error: osmo-bts-1.0.0
..

build-old-tags: known error: osmo-bts-1.0.0

Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
---
M scripts/osmocom-build-old-tags-against-master.sh
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/scripts/osmocom-build-old-tags-against-master.sh 
b/scripts/osmocom-build-old-tags-against-master.sh
index 542785d..548ac3d 100755
--- a/scripts/osmocom-build-old-tags-against-master.sh
+++ b/scripts/osmocom-build-old-tags-against-master.sh
@@ -56,6 +56,9 @@
echo "1.2.1" # depends on libosmo-legacy-mgcp
echo "1.4.0" # testsuite
;;
+   osmo-bts)
+   echo "1.0.0" # missing gsm0808.h include, fixed in 1.0.1
+   ;;
osmo-mgw)
echo "1.3.0" # testsuite
echo "1.4.0" # testsuite

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
Gerrit-Change-Number: 13430
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-ci[master]: build-old-tags: known error: osmo-bts-1.0.0

2019-03-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13430 )

Change subject: build-old-tags: known error: osmo-bts-1.0.0
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
Gerrit-Change-Number: 13430
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 09:32:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: Write configuration correctly from vty (alert notifications)

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13320 )

Change subject: Write configuration correctly from vty (alert notifications)
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4b0363fa34dd9ac0a221844974e4ebf7465b56f4
Gerrit-Change-Number: 13320
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Max 
Gerrit-Comment-Date: Thu, 28 Mar 2019 09:22:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

2019-03-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13433 )

Change subject: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones
..


Patch Set 2:

(1 comment)

Thanks for figuring this out and for creating the patches!

https://gerrit.osmocom.org/#/c/13433/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/13433/2//COMMIT_MSG@23
PS2, Line 23: could actually be replaced with ipa_ccm_id_get_parse after this 
commit
: is merged.
This part only makes sense in the related libosmocore.git commit. In this 
openbsc.git patch it gets replaced already.



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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
Gerrit-Change-Number: 13433
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-CC: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 09:19:34 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ci[master]: Also build oc2g support for osmo-pcu

2019-03-28 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13368 )

Change subject: Also build oc2g support for osmo-pcu
..

Also build oc2g support for osmo-pcu

Needs gerrit change I7cd89a549c9463e81893ca7dd925299f728e4453 in
osmo-pcu

Fixes: SYS#4524
Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
---
M jobs/gerrit-verifications.yml
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Daniel Willmann: Verified
  Harald Welte: Looks good to me, approved



diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index a2f68f5..c28a2fa 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -192,11 +192,11 @@

   - osmo-pcu:
   a1_name: FIRMWARE_VERSION
-  a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15]
+  a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15, oc2g]
   a2_name: with_vty
   a2: !!python/tuple [True, False]
   a3_name: with_dsp
-  a3: !!python/tuple [sysmo, lc15, none]
+  a3: !!python/tuple [sysmo, lc15, oc2g, none]
   a4_name: WITH_MANUALS
   a4: !!python/tuple ["1", "0"]
   sequential: true
@@ -205,6 +205,7 @@
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0") ||
+(with_vty == "True" && with_dsp == "oc2g" && 
FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0") ||
 (with_vty == "False" && with_dsp == "none" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "1")

   - osmo-python-tests:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
Gerrit-Change-Number: 13368
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-CC: André Boddenberg 


Change in osmo-ci[master]: Avoid '/' in jenkins matrix labels

2019-03-28 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13434 )

Change subject: Avoid '/' in jenkins matrix labels
..

Avoid '/' in jenkins matrix labels

The script already deals with this for osmo-bts by using the
version_prefix variable

Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
---
M jobs/gerrit-verifications.yml
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Daniel Willmann: Verified
  Harald Welte: Looks good to me, approved



diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index c28a2fa..6128dc5 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -192,7 +192,7 @@

   - osmo-pcu:
   a1_name: FIRMWARE_VERSION
-  a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15, oc2g]
+  a1: !!python/tuple [master, v2017.01, litecell15, oc2g]
   a2_name: with_vty
   a2: !!python/tuple [True, False]
   a3_name: with_dsp
@@ -204,7 +204,7 @@
 (with_vty == "True" && with_dsp == "sysmo" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0") ||
-(with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0") ||
+(with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "oc2g" && 
FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0") ||
 (with_vty == "False" && with_dsp == "none" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "1")


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
Gerrit-Change-Number: 13434
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 


Change in libosmocore[master]: BSSGP: use variable for NSEI

2019-03-28 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13204 )

Change subject: BSSGP: use variable for NSEI
..

BSSGP: use variable for NSEI

Handle NSEI the same way as BVCI is handled: assign it to variable
instead of repetitive calls to msgb_nsei() - this simplifies log update
in follow-up patches and makes code slightly easier to read.

Change-Id: I919a717ca22646849d6ec7f62c677c536db0ed31
---
M src/gb/gprs_bssgp.c
1 file changed, 27 insertions(+), 26 deletions(-)

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



diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 4a4bab3..550757f 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -307,7 +307,7 @@
 static int bssgp_rx_bvc_block(struct msgb *msg, struct tlv_parsed *tp)
 {
struct osmo_bssgp_prim nmp;
-   uint16_t bvci;
+   uint16_t bvci, nsei = msgb_nsei(msg);
struct bssgp_bvc_ctx *ptp_ctx;

bvci = tlvp_val16be(tp, BSSGP_IE_BVCI);
@@ -315,13 +315,13 @@
/* 8.3.2: Signalling BVC shall never be blocked */
LOGP(DBSSGP, LOGL_ERROR, "NSEI=%u/BVCI=%u "
"received block for signalling BVC!?!\n",
-   msgb_nsei(msg), msgb_bvci(msg));
+   nsei, msgb_bvci(msg));
return 0;
}

LOGP(DBSSGP, LOGL_INFO, "BSSGP Rx BVCI=%u BVC-BLOCK\n", bvci);

-   ptp_ctx = btsctx_by_bvci_nsei(bvci, msgb_nsei(msg));
+   ptp_ctx = btsctx_by_bvci_nsei(bvci, nsei);
if (!ptp_ctx)
return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI, &bvci, msg);

@@ -330,7 +330,7 @@

/* Send NM_BVC_BLOCK.ind to NM */
memset(&nmp, 0, sizeof(nmp));
-   nmp.nsei = msgb_nsei(msg);
+   nmp.nsei = nsei;
nmp.bvci = bvci;
nmp.tp = tp;
osmo_prim_init(&nmp.oph, SAP_BSSGP_NM, PRIM_NM_BVC_BLOCK,
@@ -338,14 +338,14 @@
bssgp_prim_cb(&nmp.oph, NULL);

/* We always acknowledge the BLOCKing */
-   return bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_BLOCK_ACK, msgb_nsei(msg),
+   return bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_BLOCK_ACK, nsei,
bvci, msgb_bvci(msg));
 };

 static int bssgp_rx_bvc_unblock(struct msgb *msg, struct tlv_parsed *tp)
 {
struct osmo_bssgp_prim nmp;
-   uint16_t bvci;
+   uint16_t bvci, nsei = msgb_nsei(msg);
struct bssgp_bvc_ctx *ptp_ctx;

bvci = tlvp_val16be(tp, BSSGP_IE_BVCI);
@@ -353,13 +353,13 @@
/* 8.3.2: Signalling BVC shall never be blocked */
LOGP(DBSSGP, LOGL_ERROR, "NSEI=%u/BVCI=%u "
"received unblock for signalling BVC!?!\n",
-   msgb_nsei(msg), msgb_bvci(msg));
+   nsei, msgb_bvci(msg));
return 0;
}

DEBUGP(DBSSGP, "BSSGP BVCI=%u Rx BVC-UNBLOCK\n", bvci);

-   ptp_ctx = btsctx_by_bvci_nsei(bvci, msgb_nsei(msg));
+   ptp_ctx = btsctx_by_bvci_nsei(bvci, nsei);
if (!ptp_ctx)
return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI, &bvci, msg);

@@ -367,7 +367,7 @@

/* Send NM_BVC_UNBLOCK.ind to NM */
memset(&nmp, 0, sizeof(nmp));
-   nmp.nsei = msgb_nsei(msg);
+   nmp.nsei = nsei;
nmp.bvci = bvci;
nmp.tp = tp;
osmo_prim_init(&nmp.oph, SAP_BSSGP_NM, PRIM_NM_BVC_UNBLOCK,
@@ -375,7 +375,7 @@
bssgp_prim_cb(&nmp.oph, NULL);

/* We always acknowledge the unBLOCKing */
-   return bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_UNBLOCK_ACK, msgb_nsei(msg),
+   return bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_UNBLOCK_ACK, nsei,
bvci, msgb_bvci(msg));
 };

@@ -419,7 +419,7 @@
struct osmo_bssgp_prim gbp;
struct gprs_ra_id raid;
uint32_t tlli;
-   uint16_t ns_bvci = msgb_bvci(msg);
+   uint16_t ns_bvci = msgb_bvci(msg), nsei = msgb_nsei(msg);
int rc;

if (!TLVP_PRESENT(tp, BSSGP_IE_TLLI) ||
@@ -438,7 +438,7 @@

/* Inform GMM about the SUSPEND request */
memset(&gbp, 0, sizeof(gbp));
-   gbp.nsei = msgb_nsei(msg);
+   gbp.nsei = nsei;
gbp.bvci = ns_bvci;
gbp.tlli = tlli;
gbp.ra_id = &raid;
@@ -447,9 +447,9 @@

rc = bssgp_prim_cb(&gbp.oph, NULL);
if (rc < 0)
-   return bssgp_tx_suspend_nack(msgb_nsei(msg), tlli, &raid, NULL);
+   return bssgp_tx_suspend_nack(nsei, tlli, &raid, NULL);

-   bssgp_tx_suspend_ack(msgb_nsei(msg), tlli, &raid, 0);
+   bssgp_tx_suspend_ack(nsei, tlli, &raid, 0);

return 0;
 }
@@ -460,7 +460,7 @@
struct gprs_ra_id raid;
uint32_t tlli;
uint8_t suspend_ref;
-   uint16_t ns_bvci = msgb_bvci(msg);
+   uint16_t ns_bvci = msgb_bvci(msg), nsei = msgb_ns

Change in libosmocore[master]: ipa: Fix ipa_ccm_id_resp_parse on big endian systems

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13432 )

Change subject: ipa: Fix ipa_ccm_id_resp_parse on big endian systems
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedc46ab53a4f76bbd98741c065fad3d9042a34a4
Gerrit-Change-Number: 13432
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 28 Mar 2019 09:00:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: BSSGP: use variable for NSEI

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13204 )

Change subject: BSSGP: use variable for NSEI
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I919a717ca22646849d6ec7f62c677c536db0ed31
Gerrit-Change-Number: 13204
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 09:00:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: Log protocol for which transaction is allocated

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13420 )

Change subject: Log protocol for which transaction is allocated
..


Patch Set 2:

fine with me, but liek with all msc patches: They should be based on neels' 
branch and not on master!


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If4a5f3ecaec568b3f8d5a57d864184d7af2b95cc
Gerrit-Change-Number: 13420
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:59:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-pcu[master]: TS alloc: expand tests log

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/3895 )

Change subject: TS alloc: expand tests log
..


Patch Set 28: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4b78951a79ddbc0745b39d091080a4e0e247d3c5
Gerrit-Change-Number: 3895
Gerrit-PatchSet: 28
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:58:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: build-old-tags: known error: osmo-bts-1.0.0

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13430 )

Change subject: build-old-tags: known error: osmo-bts-1.0.0
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
Gerrit-Change-Number: 13430
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:56:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: Avoid '/' in jenkins matrix labels

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13434 )

Change subject: Avoid '/' in jenkins matrix labels
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
Gerrit-Change-Number: 13434
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:56:02 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: Also build oc2g support for osmo-pcu

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13368 )

Change subject: Also build oc2g support for osmo-pcu
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
Gerrit-Change-Number: 13368
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-CC: André Boddenberg 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:55:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: vty_test_runner: Handle MGCP message recv len dynamically

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13435 )

Change subject: vty_test_runner: Handle MGCP message recv len dynamically
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I536d78a2a1962240e5e369cda9927d8c9955ab86
Gerrit-Change-Number: 13435
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:54:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

2019-03-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13433 )

Change subject: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones
..


Patch Set 2: Code-Review+1

looks good to me.  However, we should have at least some very basic bsc-nat 
tests in operation (Daniel?) before merging a change like this.


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
Gerrit-Change-Number: 13433
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-CC: Daniel Willmann 
Gerrit-Comment-Date: Thu, 28 Mar 2019 08:53:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes