Change in pysim[master]: utils.py: Fix for parsing MNC

2021-02-10 Thread herlesupreeth
herlesupreeth has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/22836 )


Change subject: utils.py: Fix for parsing MNC
..

utils.py: Fix for parsing MNC

This commit fixes the incorrect parsing of MNC from PLMN.
Previously its was parsing PLMN string 130062 as MCC 310 MNC 260,
whereas it should be MCC 310 MNC 026.

(The SIM was programmed with MCC 310 and MNC 026)

Change-Id: I799469206f87e930d367890babcb8ebe23a9
---
M pySim/utils.py
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/22836/1

diff --git a/pySim/utils.py b/pySim/utils.py
index 3838eff..c150184 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -137,9 +137,9 @@
 
 def dec_mnc_from_plmn(plmn):
ia = h2i(plmn)
-   digit1 = ia[2] & 0x0F   # 3rd byte, LSB
-   digit2 = (ia[2] & 0xF0) >> 4# 3rd byte, MSB
-   digit3 = (ia[1] & 0xF0) >> 4# 2nd byte, MSB
+   digit1 = (ia[1] & 0xF0) >>4 # 2nd byte, MSB
+   digit2 = ia[2] & 0x0F   # 3rd byte, LSB
+   digit3 = (ia[2] & 0xF0) >> 4# 3nd byte, MSB
if digit3 == 0xF and digit2 == 0xF and digit1 == 0xF:
return 0xFFF # 4095
return derive_mnc(digit1, digit2, digit3)

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I799469206f87e930d367890babcb8ebe23a9
Gerrit-Change-Number: 22836
Gerrit-PatchSet: 1
Gerrit-Owner: herlesupreeth 
Gerrit-MessageType: newchange


Build failure of network:osmocom:nightly/osmo-iuh in openSUSE_Leap_15.1_ARM/armv7l

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/openSUSE_Leap_15.1_ARM/armv7l

Package network:osmocom:nightly/osmo-iuh failed to build in 
openSUSE_Leap_15.1_ARM/armv7l

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

Last lines of build log:
[ 1082s] + exit 0
[ 1083s] ... checking for files with abuild user/group
[ 1083s] ... running 00-check-install-rpms
[ 1083s] ... installing all built rpms
[ 1083s] Preparing packages...
[ 1083s] libosmo-ranap3-0.6.0.42.e3f7-lp151.1.1.armv7hl
[ 1083s] libosmo-sabp0-0.6.0.42.e3f7-lp151.1.1.armv7hl
[ 1084s] libosmo-sabp-devel-0.6.0.42.e3f7-lp151.1.1.armv7hl
[ 1084s] libosmo-ranap-devel-0.6.0.42.e3f7-lp151.1.1.armv7hl
[ 1084s] osmo-iuh-0.6.0.42.e3f7-lp151.1.1.armv7hl
[ 1084s] ... running 50-check-binary-kernel-log
[ 1084s] ... running 50-check-core-files
[ 1084s] ... checking for core files
[ 1084s] ... running 50-check-debuginfo
[ 1084s] ... testing for empty debuginfo packages
[ 1084s] ... running 50-check-filelist
[ 1084s] ... checking filelist
[ 1085s] ... running 50-check-gcc-output
[ 1085s] ... testing for serious compiler warnings
[ 1085s] (using /usr/lib/build/checks-data/check_gcc_output)
[ 1085s] (using //.build.log)
[ 1085s] E: osmo-iuh 64bit-portability-issue ranap_msg_factory.c:235, 262
[ 1085s] ### VM INTERACTION START ###
[ 1088s] [ 1055.570797] sysrq: SysRq : Power Off
[ 1088s] [ 1055.589259] reboot: Power down
[ 1090s] ### VM INTERACTION END ###
[ 1090s] 
[ 1090s] obs-arm-5 failed "build osmo-iuh.spec" at Thu Feb 11 05:58:41 UTC 2021.
[ 1090s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in Debian_10/aarch64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_10/aarch64

Package network:osmocom:nightly/osmo-iuh failed to build in Debian_10/aarch64

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

Last lines of build log:
[ 2440s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[ 2440s]  ^
[ 2440s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[ 2440s]  int line, int cont, const char *format, ...)
[ 2440s]  ^~
[ 2440s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[ 2441s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[ 2441s]  ^~~~
[ 2441s] cc1: some warnings being treated as errors
[ 2441s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[ 2441s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[ 2441s] make[4]: *** [Makefile:690: all-recursive] Error 1
[ 2441s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[ 2441s] make[3]: *** [Makefile:490: all] Error 2
[ 2441s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[ 2441s] make[2]: *** [Makefile:468: all-recursive] Error 1
[ 2441s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[ 2441s] make[1]: *** [Makefile:390: all] Error 2
[ 2441s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[ 2441s] dh_auto_build: make -j1 returned exit code 2
[ 2441s] make: *** [debian/rules:9: build] Error 2
[ 2441s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[ 2441s] ### VM INTERACTION START ###
[ 2444s] [ 2390.768699] sysrq: Power Off
[ 2444s] [ 2390.776471] reboot: Power down
[ 2444s] ### VM INTERACTION END ###
[ 2444s] 
[ 2444s] obs-arm-1 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
03:39:29 UTC 2021.
[ 2444s] 

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


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

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/aarch64

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

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

Last lines of build log:
[ 1270s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[ 1270s]  ^~~~
[ 1270s] cc1: some warnings being treated as errors
[ 1270s] Makefile:656: recipe for target 'ranap_msg_factory.lo' failed
[ 1270s] make[5]: *** [ranap_msg_factory.lo] Error 1
[ 1270s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1270s] Makefile:671: recipe for target 'all-recursive' failed
[ 1270s] make[4]: *** [all-recursive] Error 1
[ 1270s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1270s] Makefile:477: recipe for target 'all' failed
[ 1270s] make[3]: *** [all] Error 2
[ 1270s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1270s] Makefile:468: recipe for target 'all-recursive' failed
[ 1270s] make[2]: *** [all-recursive] Error 1
[ 1270s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[ 1270s] Makefile:390: recipe for target 'all' failed
[ 1270s] make[1]: *** [all] Error 2
[ 1270s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[ 1270s] dh_auto_build: make -j1 returned exit code 2
[ 1270s] debian/rules:9: recipe for target 'build' failed
[ 1270s] make: *** [build] Error 2
[ 1270s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[ 1270s] ### VM INTERACTION START ###
[ 1274s] [ 1255.480224] sysrq: Power Off
[ 1274s] [ 1255.481791] reboot: Power down
[ 1274s] ### VM INTERACTION END ###
[ 1274s] 
[ 1274s] obs-arm-9 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
03:09:56 UTC 2021.
[ 1274s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_20.04/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_20.04/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_20.04/x86_64

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

Last lines of build log:
[ 1068s]   |
 |
[ 1068s]   |
 int
[ 1068s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[ 1068s]   361 | int line, int cont, const char *format, ...)
[ 1068s]   | ^~
[ 1068s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[ 1068s]   262 | LOGP(DRANAP, "Unsupported UEA algorithm UEA%d 
specified\n", i);
[ 1068s]   | ^~~~
[ 1068s] cc1: some warnings being treated as errors
[ 1068s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[ 1068s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1068s] make[4]: *** [Makefile:690: all-recursive] Error 1
[ 1068s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1068s] make[3]: *** [Makefile:490: all] Error 2
[ 1068s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[ 1068s] make[2]: *** [Makefile:468: all-recursive] Error 1
[ 1068s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[ 1068s] make[1]: *** [Makefile:390: all] Error 2
[ 1068s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[ 1068s] dh_auto_build: error: make -j1 returned exit code 2
[ 1068s] make: *** [debian/rules:9: build] Error 25
[ 1068s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[ 1068s] ### VM INTERACTION START ###
[ 1071s] [ 1001.954663] sysrq: Power Off
[ 1071s] [ 1001.998676] reboot: Power down
[ 1072s] ### VM INTERACTION END ###
[ 1072s] 
[ 1072s] cloud115 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
03:01:25 UTC 2021.
[ 1072s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in Debian_Unstable/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in 
Debian_Unstable/x86_64

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

Last lines of build log:
[  846s]   |
 |
[  846s]   |
 int
[  846s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  846s]   361 | int line, int cont, const char *format, ...)
[  846s]   | ^~
[  846s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  846s]   262 | LOGP(DRANAP, "Unsupported UEA algorithm UEA%d 
specified\n", i);
[  846s]   | ^~~~
[  846s] cc1: some warnings being treated as errors
[  846s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  846s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  846s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  846s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  846s] make[3]: *** [Makefile:490: all] Error 2
[  846s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  846s] make[2]: *** [Makefile:470: all-recursive] Error 1
[  846s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  846s] make[1]: *** [Makefile:392: all] Error 2
[  846s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  846s] dh_auto_build: error: make -j1 returned exit code 2
[  846s] make: *** [debian/rules:9: build] Error 25
[  846s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  847s] ### VM INTERACTION START ###
[  848s] Powering off.
[  848s] [  820.867272] reboot: Power down
[  848s] ### VM INTERACTION END ###
[  848s] 
[  848s] lamb52 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:56:57 UTC 2021.
[  848s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in Debian_10/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_10/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in Debian_10/x86_64

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

Last lines of build log:
[  637s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  637s]  ^
[  637s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  637s]  int line, int cont, const char *format, ...)
[  637s]  ^~
[  637s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  637s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  637s]  ^~~~
[  637s] cc1: some warnings being treated as errors
[  637s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  637s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  637s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  637s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  637s] make[3]: *** [Makefile:490: all] Error 2
[  637s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  637s] make[2]: *** [Makefile:468: all-recursive] Error 1
[  637s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  637s] make[1]: *** [Makefile:390: all] Error 2
[  637s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  637s] dh_auto_build: make -j1 returned exit code 2
[  637s] make: *** [debian/rules:9: build] Error 2
[  637s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  637s] ### VM INTERACTION START ###
[  640s] [  614.502959] sysrq: Power Off
[  640s] [  614.529436] reboot: Power down
[  640s] ### VM INTERACTION END ###
[  640s] 
[  640s] lamb22 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:56:29 UTC 2021.
[  640s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_19.10/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_19.10/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_19.10/x86_64

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

Last lines of build log:
[  619s]   |
 |
[  619s]   |
 int
[  619s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  619s]   361 | int line, int cont, const char *format, ...)
[  619s]   | ^~
[  619s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  619s]   262 | LOGP(DRANAP, "Unsupported UEA algorithm UEA%d 
specified\n", i);
[  619s]   | ^~~~
[  620s] cc1: some warnings being treated as errors
[  620s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  620s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  620s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  620s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  620s] make[3]: *** [Makefile:490: all] Error 2
[  620s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  620s] make[2]: *** [Makefile:468: all-recursive] Error 1
[  620s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  620s] make[1]: *** [Makefile:390: all] Error 2
[  620s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  620s] dh_auto_build: make -j1 returned exit code 2
[  620s] make: *** [debian/rules:9: build] Error 255
[  620s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  620s] ### VM INTERACTION START ###
[  623s] [  603.717545] sysrq: Power Off
[  623s] [  603.725081] reboot: Power down
[  623s] ### VM INTERACTION END ###
[  623s] 
[  623s] lamb14 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:56:14 UTC 2021.
[  623s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_18.04/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_18.04/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_18.04/x86_64

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

Last lines of build log:
[  991s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  991s]  ^~~~
[  991s] cc1: some warnings being treated as errors
[  991s] Makefile:656: recipe for target 'ranap_msg_factory.lo' failed
[  991s] make[5]: *** [ranap_msg_factory.lo] Error 1
[  991s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  991s] Makefile:671: recipe for target 'all-recursive' failed
[  991s] make[4]: *** [all-recursive] Error 1
[  991s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  991s] Makefile:477: recipe for target 'all' failed
[  991s] make[3]: *** [all] Error 2
[  991s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  991s] Makefile:468: recipe for target 'all-recursive' failed
[  991s] make[2]: *** [all-recursive] Error 1
[  991s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  991s] Makefile:390: recipe for target 'all' failed
[  991s] make[1]: *** [all] Error 2
[  991s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  991s] dh_auto_build: make -j1 returned exit code 2
[  991s] debian/rules:9: recipe for target 'build' failed
[  991s] make: *** [build] Error 2
[  991s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  992s] ### VM INTERACTION START ###
[  995s] [  975.616906] sysrq: Power Off
[  995s] [  975.623782] reboot: Power down
[  995s] ### VM INTERACTION END ###
[  995s] 
[  995s] lamb02 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:52:07 UTC 2021.
[  995s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_19.04/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_19.04/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_19.04/x86_64

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

Last lines of build log:
[  661s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  661s]  ^
[  661s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  661s]  int line, int cont, const char *format, ...)
[  661s]  ^~
[  661s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  661s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  661s]  ^~~~
[  661s] cc1: some warnings being treated as errors
[  661s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  661s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  661s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  661s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  661s] make[3]: *** [Makefile:490: all] Error 2
[  661s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  661s] make[2]: *** [Makefile:468: all-recursive] Error 1
[  661s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  661s] make[1]: *** [Makefile:390: all] Error 2
[  661s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  661s] dh_auto_build: make -j1 returned exit code 2
[  661s] make: *** [debian/rules:9: build] Error 2
[  661s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  661s] ### VM INTERACTION START ###
[  664s] [  645.244678] sysrq: Power Off
[  664s] [  645.250520] reboot: Power down
[  664s] ### VM INTERACTION END ###
[  664s] 
[  664s] lamb53 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:50:15 UTC 2021.
[  664s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_20.10/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_20.10/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_20.10/x86_64

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

Last lines of build log:
[  443s]   |
 |
[  443s]   |
 int
[  443s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  443s]   361 | int line, int cont, const char *format, ...)
[  443s]   | ^~
[  443s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  443s]   262 | LOGP(DRANAP, "Unsupported UEA algorithm UEA%d 
specified\n", i);
[  443s]   | ^~~~
[  444s] cc1: some warnings being treated as errors
[  444s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  444s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  444s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  444s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  444s] make[3]: *** [Makefile:490: all] Error 2
[  444s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  444s] make[2]: *** [Makefile:468: all-recursive] Error 1
[  444s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  444s] make[1]: *** [Makefile:390: all] Error 2
[  444s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  444s] dh_auto_build: error: make -j1 returned exit code 2
[  444s] make: *** [debian/rules:9: build] Error 25
[  444s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  444s] ### VM INTERACTION START ###
[  445s] Powering off.
[  445s] [  429.121904] reboot: Power down
[  445s] ### VM INTERACTION END ###
[  445s] 
[  445s] hci-cnode2-m0 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:48:58 UTC 2021.
[  445s] 

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


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

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/x86_64

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

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

Last lines of build log:
[  807s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  807s]  ^~~~
[  807s] cc1: some warnings being treated as errors
[  807s] Makefile:656: recipe for target 'ranap_msg_factory.lo' failed
[  807s] make[5]: *** [ranap_msg_factory.lo] Error 1
[  807s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  807s] Makefile:671: recipe for target 'all-recursive' failed
[  807s] make[4]: *** [all-recursive] Error 1
[  807s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  807s] Makefile:477: recipe for target 'all' failed
[  807s] make[3]: *** [all] Error 2
[  807s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  807s] Makefile:468: recipe for target 'all-recursive' failed
[  807s] make[2]: *** [all-recursive] Error 1
[  807s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  807s] Makefile:390: recipe for target 'all' failed
[  807s] make[1]: *** [all] Error 2
[  807s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  807s] dh_auto_build: make -j1 returned exit code 2
[  807s] debian/rules:9: recipe for target 'build' failed
[  807s] make: *** [build] Error 2
[  807s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  807s] ### VM INTERACTION START ###
[  810s] [  769.774399] sysrq: Power Off
[  810s] [  769.788776] reboot: Power down
[  810s] ### VM INTERACTION END ###
[  810s] 
[  810s] lamb52 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:47:18 UTC 2021.
[  810s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in Debian_Testing/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_Testing/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in 
Debian_Testing/x86_64

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

Last lines of build log:
[  804s]   |
 |
[  804s]   |
 int
[  804s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  804s]   361 | int line, int cont, const char *format, ...)
[  804s]   | ^~
[  804s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  804s]   262 | LOGP(DRANAP, "Unsupported UEA algorithm UEA%d 
specified\n", i);
[  804s]   | ^~~~
[  804s] cc1: some warnings being treated as errors
[  804s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  804s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  804s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  804s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  804s] make[3]: *** [Makefile:490: all] Error 2
[  804s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  804s] make[2]: *** [Makefile:470: all-recursive] Error 1
[  804s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  804s] make[1]: *** [Makefile:392: all] Error 2
[  804s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  804s] dh_auto_build: error: make -j1 returned exit code 2
[  804s] make: *** [debian/rules:9: build] Error 25
[  804s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  804s] ### VM INTERACTION START ###
[  805s] Powering off.
[  805s] [  774.302826] reboot: Power down
[  805s] ### VM INTERACTION END ###
[  805s] 
[  805s] lamb55 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:42:30 UTC 2021.
[  805s] 

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


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

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/x86_64

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

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

Last lines of build log:
[  365s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  365s]  ^
[  365s] cc1: some warnings being treated as errors
[  365s] Makefile:645: recipe for target 'ranap_msg_factory.lo' failed
[  365s] make[5]: *** [ranap_msg_factory.lo] Error 1
[  365s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  365s] Makefile:660: recipe for target 'all-recursive' failed
[  365s] make[4]: *** [all-recursive] Error 1
[  365s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  365s] Makefile:465: recipe for target 'all' failed
[  365s] make[3]: *** [all] Error 2
[  365s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  365s] Makefile:457: recipe for target 'all-recursive' failed
[  365s] make[2]: *** [all-recursive] Error 1
[  365s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  365s] Makefile:378: recipe for target 'all' failed
[  365s] make[1]: *** [all] Error 2
[  365s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  365s] dh_auto_build: make -j1 returned exit code 2
[  365s] debian/rules:9: recipe for target 'build' failed
[  365s] make: *** [build] Error 2
[  365s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  365s] ### VM INTERACTION START ###
[  366s] Powering off.
[  366s] [  350.164556] reboot: Power down
[  366s] ### VM INTERACTION END ###
[  366s] 
[  366s] lamb26 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:26:32 UTC 2021.
[  366s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in openSUSE_Leap_15.1_ARM/aarch64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/openSUSE_Leap_15.1_ARM/aarch64

Package network:osmocom:nightly/osmo-iuh failed to build in 
openSUSE_Leap_15.1_ARM/aarch64

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

Last lines of build log:
[  312s] + exit 0
[  313s] ... checking for files with abuild user/group
[  313s] ... running 00-check-install-rpms
[  313s] ... installing all built rpms
[  313s] Preparing packages...
[  313s] libosmo-ranap3-0.6.0.42.e3f7-lp151.1.1.aarch64
[  313s] libosmo-sabp0-0.6.0.42.e3f7-lp151.1.1.aarch64
[  313s] libosmo-sabp-devel-0.6.0.42.e3f7-lp151.1.1.aarch64
[  313s] osmo-iuh-0.6.0.42.e3f7-lp151.1.1.aarch64
[  313s] libosmo-ranap-devel-0.6.0.42.e3f7-lp151.1.1.aarch64
[  313s] ... running 50-check-binary-kernel-log
[  313s] ... running 50-check-core-files
[  313s] ... checking for core files
[  313s] ... running 50-check-debuginfo
[  313s] ... testing for empty debuginfo packages
[  313s] ... running 50-check-filelist
[  313s] ... checking filelist
[  314s] ... running 50-check-gcc-output
[  314s] ... testing for serious compiler warnings
[  314s] (using /usr/lib/build/checks-data/check_gcc_output)
[  314s] (using //.build.log)
[  314s] E: osmo-iuh 64bit-portability-issue ranap_msg_factory.c:235, 262
[  314s] ### VM INTERACTION START ###
[  317s] [  302.248661] sysrq: SysRq : Power Off
[  317s] [  302.250597] reboot: Power down
[  317s] ### VM INTERACTION END ###
[  317s] 
[  317s] obs-arm-8 failed "build osmo-iuh.spec" at Thu Feb 11 02:24:57 UTC 2021.
[  317s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in CentOS_8/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/CentOS_8/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in CentOS_8/x86_64

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

Last lines of build log:
[  192s] ../include/osmocom/sabp/SABP_MessageStructure.h:27:23: warning: 
'struct MemberA' declared inside parameter list will not be visible outside of 
this definition or declaration
[  192s]   A_SEQUENCE_OF(struct MemberA {
[  192s]^~~
[  192s] /usr/include/asn1c/asn_SET_OF.h:17:16: note: in definition of macro 
'A_SET_OF'
[  192s]void (*free)(type *);   \
[  192s] ^~~~
[  192s] ../include/osmocom/sabp/SABP_MessageStructure.h:27:2: note: in 
expansion of macro 'A_SEQUENCE_OF'
[  192s]   A_SEQUENCE_OF(struct MemberA {
[  192s]   ^
[  197s] make[4]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  197s] make[3]: *** [Makefile:689: all-recursive] Error 1
[  197s] make[3]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  197s] make[2]: *** [Makefile:489: all] Error 2
[  197s] make[2]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  197s] make[1]: *** [Makefile:467: all-recursive] Error 1
[  197s] make[1]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7'
[  197s] make: *** [Makefile:389: all] Error 2
[  197s] error: Bad exit status from /var/tmp/rpm-tmp.b1pOEU (%build)
[  197s] 
[  197s] 
[  197s] RPM build errors:
[  197s] Bad exit status from /var/tmp/rpm-tmp.b1pOEU (%build)
[  197s] ### VM INTERACTION START ###
[  198s] Powering off.
[  198s] [  178.485488] reboot: Power down
[  198s] ### VM INTERACTION END ###
[  199s] 
[  199s] lamb03 failed "build osmo-iuh.spec" at Thu Feb 11 02:20:35 UTC 2021.
[  199s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in CentOS_8/aarch64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/CentOS_8/aarch64

Package network:osmocom:nightly/osmo-iuh failed to build in CentOS_8/aarch64

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

Last lines of build log:
[  373s] /usr/include/libosmocore/osmocom/core/logging.h:361:37: note: expected 
'const char *' but argument is of type 'int'
[  373s]  int line, int cont, const char *format, ...)
[  373s]  ^~
[  373s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  373s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  373s]  ^~~~
[  373s] cc1: some warnings being treated as errors
[  373s] make[4]: *** [Makefile:674: ranap_msg_factory.lo] Error 1
[  373s] make[4]: *** Waiting for unfinished jobs
[  385s] make[4]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  385s] make[3]: *** [Makefile:689: all-recursive] Error 1
[  385s] make[3]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  385s] make[2]: *** [Makefile:489: all] Error 2
[  385s] make[2]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7/src'
[  385s] make[1]: *** [Makefile:467: all-recursive] Error 1
[  385s] make[1]: Leaving directory 
'/home/abuild/rpmbuild/BUILD/osmo-iuh-0.6.0.42.e3f7'
[  385s] make: *** [Makefile:389: all] Error 2
[  385s] error: Bad exit status from /var/tmp/rpm-tmp.clzRpe (%build)
[  385s] 
[  385s] 
[  385s] RPM build errors:
[  385s] Bad exit status from /var/tmp/rpm-tmp.clzRpe (%build)
[  385s] ### VM INTERACTION START ###
[  386s] Powering off.
[  386s] [  363.341389] reboot: Power down
[  386s] ### VM INTERACTION END ###
[  386s] 
[  386s] obs-arm-9 failed "build osmo-iuh.spec" at Thu Feb 11 02:20:18 UTC 2021.
[  386s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in Debian_10/i586

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_10/i586

Package network:osmocom:nightly/osmo-iuh failed to build in Debian_10/i586

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

Last lines of build log:
[  911s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  911s]  ^
[  911s] /usr/include/osmocom/core/logging.h:361:37: note: expected 'const char 
*' but argument is of type 'int'
[  911s]  int line, int cont, const char *format, ...)
[  911s]  ^~
[  911s] ranap_msg_factory.c:262:5: error: format not a string literal and no 
format arguments [-Werror=format-security]
[  911s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  911s]  ^~~~
[  911s] cc1: some warnings being treated as errors
[  911s] make[5]: *** [Makefile:675: ranap_msg_factory.lo] Error 1
[  911s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  911s] make[4]: *** [Makefile:690: all-recursive] Error 1
[  911s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  911s] make[3]: *** [Makefile:490: all] Error 2
[  911s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  911s] make[2]: *** [Makefile:468: all-recursive] Error 1
[  911s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  911s] make[1]: *** [Makefile:390: all] Error 2
[  911s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  911s] dh_auto_build: make -j1 returned exit code 2
[  911s] make: *** [debian/rules:9: build] Error 2
[  911s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  911s] ### VM INTERACTION START ###
[  914s] [  838.101787] sysrq: Power Off
[  914s] [  838.115723] reboot: Power down
[  914s] ### VM INTERACTION END ###
[  914s] 
[  914s] cloud117 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:15:08 UTC 2021.
[  914s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.04/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.04/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_20.04/x86_64

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

Last lines of build log:
[  168s] [COMPILING libboard/qmod/source/wwan_perst.c]
[  168s] [COMPILING libboard/qmod/source/card_pres.c]
[  168s] [COMPILING libboard/qmod/source/wwan_led.c]
[  168s] [COMPILING libboard/qmod/source/i2c.c]
[  168s] [COMPILING libboard/qmod/source/board_qmod.c]
[  168s] [COMPILING apps/dfu/main.c]
[  169s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  169s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  169s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  169s] Memory region Used Size  Region Size  %age Used
[  169s]  rom:   16588 B16 KB101.25%
[  169s]  ram:   11672 B48 KB 
23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom'
[  169s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 204 bytes
[  169s] collect2: error: ld returned 1 exit status
[  169s] %
[  169s] make[2]: *** [Makefile:234: flash] Error 1
[  169s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  169s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  169s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  169s] dh_auto_build: error: make -j1 returned exit code 2
[  169s] make: *** [debian/rules:16: build] Error 25
[  169s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  169s] ### VM INTERACTION START ###
[  172s] [  156.176104] sysrq: Power Off
[  172s] [  156.183007] reboot: Power down
[  172s] ### VM INTERACTION END ###
[  172s] 
[  172s] lamb60 failed "build simtrace2_0.7.0.70.657c.dsc" at Thu Feb 11 
02:13:45 UTC 2021.
[  172s] 

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


Build failure of network:osmocom:nightly/osmo-iuh in openSUSE_Leap_15.1/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/openSUSE_Leap_15.1/x86_64

Package network:osmocom:nightly/osmo-iuh failed to build in 
openSUSE_Leap_15.1/x86_64

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

Last lines of build log:
[  127s] + exit 0
[  127s] ... checking for files with abuild user/group
[  127s] ... running 00-check-install-rpms
[  127s] ... installing all built rpms
[  127s] Preparing packages...
[  127s] libosmo-ranap3-0.6.0.42.e3f7-lp151.1.1.x86_64
[  127s] libosmo-sabp0-0.6.0.42.e3f7-lp151.1.1.x86_64
[  127s] libosmo-sabp-devel-0.6.0.42.e3f7-lp151.1.1.x86_64
[  127s] libosmo-ranap-devel-0.6.0.42.e3f7-lp151.1.1.x86_64
[  127s] osmo-iuh-0.6.0.42.e3f7-lp151.1.1.x86_64
[  127s] ... running 50-check-binary-kernel-log
[  127s] ... running 50-check-core-files
[  127s] ... checking for core files
[  127s] ... running 50-check-debuginfo
[  127s] ... testing for empty debuginfo packages
[  127s] ... running 50-check-filelist
[  127s] ... checking filelist
[  128s] ... running 50-check-gcc-output
[  128s] ... testing for serious compiler warnings
[  128s] (using /usr/lib/build/checks-data/check_gcc_output)
[  128s] (using //.build.log)
[  128s] E: osmo-iuh 64bit-portability-issue ranap_msg_factory.c:235, 262
[  128s] ### VM INTERACTION START ###
[  131s] [  120.471802] sysrq: SysRq : Power Off
[  131s] [  120.478762] reboot: Power down
[  131s] ### VM INTERACTION END ###
[  131s] 
[  131s] sheep85 failed "build osmo-iuh.spec" at Thu Feb 11 02:06:41 UTC 2021.
[  131s] 

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


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

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/i586

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

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

Last lines of build log:
[  849s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  849s]  ^~~~
[  849s] cc1: some warnings being treated as errors
[  849s] Makefile:656: recipe for target 'ranap_msg_factory.lo' failed
[  849s] make[5]: *** [ranap_msg_factory.lo] Error 1
[  849s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  849s] Makefile:671: recipe for target 'all-recursive' failed
[  849s] make[4]: *** [all-recursive] Error 1
[  849s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  849s] Makefile:477: recipe for target 'all' failed
[  849s] make[3]: *** [all] Error 2
[  849s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  849s] Makefile:468: recipe for target 'all-recursive' failed
[  849s] make[2]: *** [all-recursive] Error 1
[  849s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  849s] Makefile:390: recipe for target 'all' failed
[  849s] make[1]: *** [all] Error 2
[  849s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  849s] dh_auto_build: make -j1 returned exit code 2
[  849s] debian/rules:9: recipe for target 'build' failed
[  849s] make: *** [build] Error 2
[  849s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  849s] ### VM INTERACTION START ###
[  852s] [  797.456675] sysrq: Power Off
[  852s] [  797.480021] reboot: Power down
[  852s] ### VM INTERACTION END ###
[  852s] 
[  852s] cloud126 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
02:05:56 UTC 2021.
[  852s] 

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


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

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/i586

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

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

Last lines of build log:
[  252s]  LOGP(DRANAP, "Unsupported UEA algorithm UEA%d specified\n", i);
[  252s]  ^
[  253s] cc1: some warnings being treated as errors
[  253s] Makefile:645: recipe for target 'ranap_msg_factory.lo' failed
[  253s] make[5]: *** [ranap_msg_factory.lo] Error 1
[  253s] make[5]: Leaving directory '/usr/src/packages/BUILD/src'
[  253s] Makefile:660: recipe for target 'all-recursive' failed
[  253s] make[4]: *** [all-recursive] Error 1
[  253s] make[4]: Leaving directory '/usr/src/packages/BUILD/src'
[  253s] Makefile:465: recipe for target 'all' failed
[  253s] make[3]: *** [all] Error 2
[  253s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  253s] Makefile:457: recipe for target 'all-recursive' failed
[  253s] make[2]: *** [all-recursive] Error 1
[  253s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  253s] Makefile:378: recipe for target 'all' failed
[  253s] make[1]: *** [all] Error 2
[  253s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  253s] dh_auto_build: make -j1 returned exit code 2
[  253s] debian/rules:9: recipe for target 'build' failed
[  253s] make: *** [build] Error 2
[  253s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  253s] ### VM INTERACTION START ###
[  254s] Powering off.
[  254s] [  239.441698] reboot: Power down
[  254s] ### VM INTERACTION END ###
[  254s] 
[  254s] build71 failed "build osmo-iuh_0.6.0.42.e3f7.dsc" at Thu Feb 11 
01:59:35 UTC 2021.
[  254s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.10/x86_64

2021-02-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.10/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_20.10/x86_64

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

Last lines of build log:
[  279s] [COMPILING apps/dfu/main.c]
[  280s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  280s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  280s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  280s] Memory region Used Size  Region Size  %age Used
[  280s]  rom:   16580 B16 KB101.20%
[  280s]  ram:   11672 B48 KB 
23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: 
changing start of section .stack by 4 bytes
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom'
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  280s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 196 bytes
[  280s] collect2: error: ld returned 1 exit status
[  280s] %
[  280s] make[2]: *** [Makefile:234: flash] Error 1
[  280s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  280s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  280s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  280s] dh_auto_build: error: make -j1 returned exit code 2
[  280s] make: *** [debian/rules:16: build] Error 25
[  280s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  280s] ### VM INTERACTION START ###
[  283s] [  242.241007] sysrq: Power Off
[  283s] [  242.248584] reboot: Power down
[  283s] ### VM INTERACTION END ###
[  283s] 
[  283s] lamb03 failed "build simtrace2_0.7.0.70.657c.dsc" at Thu Feb 11 
01:53:48 UTC 2021.
[  283s] 

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


Change in libosmocore[master]: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode

2021-02-10 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22800 )

Change subject: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode
..


Patch Set 2: -Code-Review

And the unit test(s) of course.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
Gerrit-Change-Number: 22800
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Thu, 11 Feb 2021 00:19:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode

2021-02-10 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22800 )

Change subject: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode
..


Patch Set 2: Code-Review+1

(3 comments)

https://gerrit.osmocom.org/c/libosmocore/+/22800/2/src/gsm/gsm48_rest_octets.c
File src/gsm/gsm48_rest_octets.c:

https://gerrit.osmocom.org/c/libosmocore/+/22800/2/src/gsm/gsm48_rest_octets.c@757
PS2, Line 757:  static unsigned int decode_t3192_tbl[8] = {500, 1000, 1500, 0, 
80, 120, 160, 200};
const


https://gerrit.osmocom.org/c/libosmocore/+/22800/2/src/gsm/gsm48_rest_octets.c@764
PS2, Line 764:  static unsigned int decode_drx_timer_tbl[8] = {0, 1, 2, 4, 8, 
16, 32, 64};
const


https://gerrit.osmocom.org/c/libosmocore/+/22800/2/src/gsm/gsm48_rest_octets.c@789
PS2, Line 789: bitvec_get_uint
I would be careful here, as this function may return a negative in case of 
error. It's not critical for most of the information fields, but length fields 
are special. We may end up past the buffer boundaries of something goes wrong.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
Gerrit-Change-Number: 22800
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Thu, 11 Feb 2021 00:17:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-{fr, gbproxy}-test: use ttcn3-docker-run too

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22823 )

Change subject: ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I2889abe94ed522a205890e5cb39e09cbebfbd820
Gerrit-Change-Number: 22823
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:53:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move shared run code to script

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22822 )

Change subject: ttcn3: move shared run code to script
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
Gerrit-Change-Number: 22822
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:50:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: prepare: start/stop links

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22821 )

Change subject: debian-stretch-titan: prepare: start/stop links
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
Gerrit-Change-Number: 22821
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:49:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: prepare: run 'make deps'

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22820 )

Change subject: debian-stretch-titan: prepare: run 'make deps'
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I9085203b27d310b63a035fd71f7c2a78d02710d4
Gerrit-Change-Number: 22820
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:48:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move prepare code to shared script

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22819 )

Change subject: ttcn3: move prepare code to shared script
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
Gerrit-Change-Number: 22819
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:47:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: update deps on change

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22818 )

Change subject: debian-stretch-titan: update deps on change
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I56673312cfb23375d67900016aaac1931f677275
Gerrit-Change-Number: 22818
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:43:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move initial clone to debian-stretch-titan

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22817 )

Change subject: ttcn3: move initial clone to debian-stretch-titan
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
Gerrit-Change-Number: 22817
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:41:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: gb_proxy: fix wrong usage of bssgp_rim_ri_name()

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22824 )

Change subject: gb_proxy: fix wrong usage of bssgp_rim_ri_name()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I8b6254a269770ddc141325d67d143f2a8130c519
Gerrit-Change-Number: 22824
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:38:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: sccp: Add Tests for SCMG SST procedure

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

Change subject: sccp: Add Tests for SCMG SST procedure
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If3f5f3144c0ed83d0bda5953522a9d73287c8ba2
Gerrit-Change-Number: 22831
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:36:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: SCCP_Templates: Make tr_SCCP_UDT work for unspecific templates

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

Change subject: SCCP_Templates: Make tr_SCCP_UDT work for unspecific templates
..


Patch Set 1:

Can you explain better? I don't see why Length shouldn't be lengthof(data)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic77f52f7ec6dc8e17d9cd0789ba790296a25bc50
Gerrit-Change-Number: 22830
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:31:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: xua_snm: Implement handling of DUPU messages

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22835 )

Change subject: xua_snm: Implement handling of DUPU messages
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/libosmo-sccp/+/22835/1/src/xua_snm.c
File src/xua_snm.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/22835/1/src/xua_snm.c@233
PS1, Line 233:  uint32_t rctx[32];
Is 32 the mac amount of routing contexts? I see this repeated over a nd over, 
may make sense to have a define with it.



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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I1559ed0f761a8495b222df48c6bd43798e220471
Gerrit-Change-Number: 22835
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:29:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: sccp: more SCMG handling: SSA and SSP message handling

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22834 )

Change subject: sccp: more SCMG handling: SSA and SSP message handling
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I149166a25113f5d3e3536f9297bf89ff3139b9e3
Gerrit-Change-Number: 22834
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:20:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: sua: per-ssn DUNA/DAVA notification

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22833 )

Change subject: sua: per-ssn DUNA/DAVA notification
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/libosmo-sccp/+/22833/1/src/xua_snm.c
File src/xua_snm.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/22833/1/src/xua_snm.c@278
PS1, Line 278:  const uint32_t *aff_pc = (const uint32_t 
*)ie_aff_pc->dat;
is this pointer properly aligned?



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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ie9a45b905bc17e7b695e15fe12ba4bbadcd032bf
Gerrit-Change-Number: 22833
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:17:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: xua: introduce xua_msg_get_u32p() helper

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22832 )

Change subject: xua: introduce xua_msg_get_u32p() helper
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Id7780074b82bc668ae148456750b1a01799decd1
Gerrit-Change-Number: 22832
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 22:01:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: GBProxy_Tests: fix TC_rim_info_pcu2pcu

2021-02-10 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825 )

Change subject: GBProxy_Tests: fix TC_rim_info_pcu2pcu
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG@10
PS1, Line 10: which uses the templates from Osmocom_Gb_Types.ttcn not as 
intended
> "[...] which doesn't use the templates [...] as intended. […]
Done


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG@11
PS1, Line 11: into timeout
> into a timeout
Done



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Gerrit-Change-Number: 22825
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 19:30:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: GBProxy_Tests: fix TC_rim_info_pcu2pcu

2021-02-10 Thread dexter
Hello Jenkins Builder, laforge, daniel,

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

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

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

Change subject: GBProxy_Tests: fix TC_rim_info_pcu2pcu
..

GBProxy_Tests: fix TC_rim_info_pcu2pcu

The testcase TC_rim_info_pcu2pcu calls a function f_TC_rim_info_pcu2pcu()
which doesn't use the templates from Osmocom_Gb_Types.ttcn as intended.
This eventually lets the altstep in f_rim_pcu2pcu() run into a timeout
since the templates never match.

Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Related: SYS#5103
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 22 insertions(+), 10 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Gerrit-Change-Number: 22825
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in libosmo-sccp[master]: xua_snm: Implement handling of DUPU messages

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22835 )


Change subject: xua_snm: Implement handling of DUPU messages
..

xua_snm: Implement handling of DUPU messages

A DUPU message in SUA and M3UA indicates the unavailability of
a (MTP-level) user, i.e. the entire SCCP, ISUP, ... is not available.

If we receive a DUPU (destination user part unavailable) message in ASP
role, then we must
 * distribute it to any other ASPs for which we operate in SG mode
 * pass it as MTP-STATUS.ind to SCCP, which can then generates
   N-PCSTATE.ind to the SCCP User

Change-Id: I1559ed0f761a8495b222df48c6bd43798e220471
---
M include/osmocom/sigtran/protocol/mtp.h
M src/m3ua.c
M src/osmo_ss7.c
M src/sccp_internal.h
M src/sccp_scmg.c
M src/sua.c
M src/xua_internal.h
M src/xua_snm.c
8 files changed, 222 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/22835/1

diff --git a/include/osmocom/sigtran/protocol/mtp.h 
b/include/osmocom/sigtran/protocol/mtp.h
index 8b990c0..2f0c7ac 100644
--- a/include/osmocom/sigtran/protocol/mtp.h
+++ b/include/osmocom/sigtran/protocol/mtp.h
@@ -22,3 +22,18 @@
 };

 extern const struct value_string mtp_si_vals[];
+
+
+/* Chapter 15.17.5 of Q.705 */
+enum mtp_unavail_cause {
+   MTP_UNAVAIL_C_UNKNOWN   = 0x0,
+   MTP_UNAVAIL_C_UNEQUIP_REM_USER  = 0x1,
+   MTP_UNAVAIL_C_INACC_REM_USER= 0x2,
+   /* reserved */
+};
+
+extern const struct value_string mtp_unavail_cause_vals[];
+
+static inline const char *mtp_unavail_cause_str(enum mtp_unavail_cause cs) {
+   return get_value_string(mtp_unavail_cause_vals, cs);
+}
diff --git a/src/m3ua.c b/src/m3ua.c
index 6639c28..77326e0 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -812,8 +812,29 @@
 }
 #endif

+/* 3.4.5 Destination User Part Unavailable (DUPU) */
+static struct xua_msg *m3ua_encode_dupu(const uint32_t *rctx, unsigned int 
num_rctx,
+   uint32_t dpc, uint16_t user, uint16_t 
cause,
+   const char *info_string)
+{
+   struct xua_msg *xua = xua_msg_alloc();
+   uint32_t user_cause = (user << 16) | cause;

-/* TODO: 3.4.5 Destination User Part Unavailable (DUPU) */
+   xua->hdr = XUA_HDR(M3UA_MSGC_SNM, M3UA_SNM_DUNA);
+   xua->hdr.version = M3UA_VERSION;
+   if (rctx)
+   xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, num_rctx * 
sizeof(*rctx), (const uint8_t *)rctx);
+
+   xua_msg_add_u32(xua, M3UA_IEI_AFFECTED_PC, dpc);
+   xua_msg_add_u32(xua, M3UA_IEI_USER_CAUSE, user_cause);
+
+   if (info_string) {
+   xua_msg_add_data(xua, M3UA_IEI_INFO_STRING,
+strlen(info_string)+1,
+(const uint8_t *) info_string);
+   }
+   return xua;
+}

 /*! Transmit SSNM DUNA/DAVA message indicating [un]availability of certain 
point code[s]
  *  \param[in] asp ASP through which to transmit message. Must be ACTIVE.
@@ -837,6 +858,21 @@
m3ua_tx_xua_asp(asp, xua);
 }

+/*! Transmit SSNM DUPU message indicating user unavailability.
+ *  \param[in] asp ASP through which to transmit message. Must be ACTIVE.
+ *  \param[in] rctx array of Routing Contexts in network byte order.
+ *  \param[in] num_rctx number of rctx
+ *  \param[in] dpc affected point code
+ *  \param[in] user the user (SI) that is unavailable
+ *  \param[in] cause the cause of the user unavailability
+ *  \param[in] info_string optional information string (can be NULL). */
+void m3ua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int 
num_rctx,
+ uint32_t dpc, uint16_t user, uint16_t cause, const char 
*info_str)
+{
+   struct xua_msg *xua = m3ua_encode_dupu(rctx, num_rctx, dpc, user, 
cause, info_str);
+   m3ua_tx_xua_asp(asp, xua);
+}
+
 /* received SNM message on ASP side */
 static int m3ua_rx_snm_asp(struct osmo_ss7_asp *asp, struct xua_msg *xua)
 {
@@ -857,6 +893,8 @@
xua_snm_rx_dava(asp, as, xua);
break;
case M3UA_SNM_DUPU:
+   xua_snm_rx_dupu(asp, as, xua);
+   break;
case M3UA_SNM_SCON:
case M3UA_SNM_DRST:
LOGPASP(asp, DLM3UA, LOGL_NOTICE, "Received unsupported M3UA 
SNM message type %u\n",
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index e549708..a801cc9 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -59,6 +59,13 @@
 static int32_t next_rctx = 1;
 static int32_t next_l_rk_id = 1;

+const struct value_string mtp_unavail_cause_vals[] = {
+   { MTP_UNAVAIL_C_UNKNOWN,"unknown" },
+   { MTP_UNAVAIL_C_UNEQUIP_REM_USER,   "unequipped-remote-user" },
+   { MTP_UNAVAIL_C_INACC_REM_USER, "inaccessible-remote-user" },
+   { 0, NULL }
+};
+
 struct value_string osmo_ss7_as_traffic_mode_vals[] = {
{ OSMO_SS7_AS_TMOD_BCAST, 

Change in libosmo-sccp[master]: sccp: more SCMG handling: SSA and SSP message handling

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22834 )


Change subject: sccp: more SCMG handling: SSA and SSP message handling
..

sccp: more SCMG handling: SSA and SSP message handling

When a SSP (Subsystem Prohibited) or SSA (Subsystem Available) SCMG
message is received, we must generate the respective primitives towards
the SCCP user.

Change-Id: I149166a25113f5d3e3536f9297bf89ff3139b9e3
---
M src/sccp_scmg.c
1 file changed, 31 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/34/22834/1

diff --git a/src/sccp_scmg.c b/src/sccp_scmg.c
index ed16fe7..49e09ca 100644
--- a/src/sccp_scmg.c
+++ b/src/sccp_scmg.c
@@ -167,6 +167,33 @@
 }


+/* Subsystem Allowed received */
+static int scmg_rx_ssa(struct osmo_sccp_user *scu, const struct osmo_sccp_addr 
*calling_addr,
+   const struct osmo_sccp_addr *called_addr, const struct 
sccp_scmg_msg *ssa)
+{
+   /* Q.714 5.3.3 */
+   if (ssa->affected_ssn == SCCP_SSN_MANAGEMENT)
+   return 0;
+
+   /* if the SSN is not marked as prohibited, ignore */
+
+   /* Q.714 5.3.2.2 a) */
+   sccp_scmg_rx_ssn_allowed(scu->inst, ssa->affected_pc, 
ssa->affected_ssn, ssa->smi);
+
+   /* If the remote SCCP, at which the subsystem reported in the SSA 
message resides, is marked
+* inaccessible, then the message is treated as an implicit indication 
of SCCP restart */
+   return 0;
+}
+
+/* Subsystem Prohibited received */
+static int scmg_rx_ssp(struct osmo_sccp_user *scu, const struct osmo_sccp_addr 
*calling_addr,
+   const struct osmo_sccp_addr *called_addr, const struct 
sccp_scmg_msg *ssp)
+{
+   /* Q.714 5.3.2.2 a) */
+   sccp_scmg_rx_ssn_prohibited(scu->inst, ssp->affected_pc, 
ssp->affected_ssn, ssp->smi);
+   return 0;
+}
+
 /* Subsystem Test received */
 static int scmg_rx_sst(struct osmo_sccp_user *scu, const struct osmo_sccp_addr 
*calling_addr,
const struct osmo_sccp_addr *called_addr, const struct 
sccp_scmg_msg *sst)
@@ -191,10 +218,12 @@
   const struct osmo_sccp_addr *called_addr, const struct 
sccp_scmg_msg *scmg)
 {
switch (scmg->msg_type) {
+   case SCCP_SCMG_MSGT_SSA:
+   return scmg_rx_ssa(scu, calling_addr, called_addr, scmg);
+   case SCCP_SCMG_MSGT_SSP:
+   return scmg_rx_ssp(scu, calling_addr, called_addr, scmg);
case SCCP_SCMG_MSGT_SST:
return scmg_rx_sst(scu, calling_addr, called_addr, scmg);
-   case SCCP_SCMG_MSGT_SSP:
-   case SCCP_SCMG_MSGT_SSA:
case SCCP_SCMG_MSGT_SOR:
case SCCP_SCMG_MSGT_SOG:
case SCCP_SCMG_MSGT_SSC:

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I149166a25113f5d3e3536f9297bf89ff3139b9e3
Gerrit-Change-Number: 22834
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmo-sccp[master]: sua: per-ssn DUNA/DAVA notification

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22833 )


Change subject: sua: per-ssn DUNA/DAVA notification
..

sua: per-ssn DUNA/DAVA notification

Unlike M3UA, in SUA a DUNA/DAVA message can contain not just the point
code that became available / unavailable, but it can also include a SSN.

In that case, it is just the SSN that became available/unavailable, and
not the entire point code.  Hence, a N-STATE.ind and not a N-PCSTATE.ind
must be delivered to the SCCP user.

Change-Id: Ie9a45b905bc17e7b695e15fe12ba4bbadcd032bf
---
M src/sccp_internal.h
M src/sccp_scmg.c
M src/xua_snm.c
3 files changed, 120 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/33/22833/1

diff --git a/src/sccp_internal.h b/src/sccp_internal.h
index 6bd2af9..a95b07d 100644
--- a/src/sccp_internal.h
+++ b/src/sccp_internal.h
@@ -137,6 +137,8 @@
   const struct osmo_scu_state_param *state);

 /* SCCP Management (SCMG) */
+void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, 
uint32_t ssn, uint32_t smi);
+void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t 
dpc, uint32_t ssn, uint32_t smi);
 void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc);
 void sccp_scmg_rx_mtp_resume(struct osmo_sccp_instance *inst, uint32_t dpc);
 int sccp_scmg_init(struct osmo_sccp_instance *inst);
diff --git a/src/sccp_scmg.c b/src/sccp_scmg.c
index 0e3905d..ed16fe7 100644
--- a/src/sccp_scmg.c
+++ b/src/sccp_scmg.c
@@ -36,6 +36,45 @@
 #include "xua_internal.h"
 #include "sccp_internal.h"

+/* ITU-T Q.714 5.3.3 Subsystem allowed */
+void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, 
uint32_t ssn, uint32_t smi)
+{
+   struct osmo_scu_state_param state;
+   /* 1) Instruct the translation function to update the translation 
tables */
+   /* 2) Mark as "allowed" the status of that subsystem. */
+   /* 3) Initiate a local broadcast of "User-in-service" information for 
the allowed subsystem */
+   state = (struct osmo_scu_state_param) {
+   .affected_pc = dpc,
+   .affected_ssn = ssn,
+   .user_in_service = true,
+   .ssn_multiplicity_ind = smi,
+   };
+   sccp_lbcs_local_bcast_state(inst, );
+   /* 4) Discontinue the subsystem status test if such a test was in 
progress */
+   /* 5) Initiate a broadcast of Subsystem-Allowed messages to concerned 
signalling points. */
+}
+
+/* ITU-T Q.714 5.3.2 Subsystem prohibited */
+void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t 
dpc, uint32_t ssn, uint32_t smi)
+{
+   struct osmo_scu_state_param state;
+   /* 1) instruct the translation function to update the translation 
tables */
+   /* 2) mark as "prohibited" the status of that subsystem */
+   /* 3) initiate a local broadcast of "User-out-of-service" information */
+   state = (struct osmo_scu_state_param) {
+   .affected_pc = dpc,
+   .affected_ssn = ssn,
+   .user_in_service = false,
+   .ssn_multiplicity_ind = smi,
+   };
+   sccp_lbcs_local_bcast_state(inst, );
+
+   /* 4) initiate the subsystem status test procedure if the prohibited 
subsystem is not local */
+   /* 5) initiate a broadcast of Subsystem-Prohibited messages to 
concerned SP */
+   /* 6) cancel "ignore subsystem status test" and the associated timer if 
in progress and if
+*the newly prohibited subsystem resides at the local node. */
+}
+
 /*! brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service 
Q.714 5.2.2 */
 void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc)
 {
diff --git a/src/xua_snm.c b/src/xua_snm.c
index e3efc8e..2a383c7 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -162,6 +162,53 @@
}
 }

+/* generate SS-PROHIBITED / SS-ALLOWED towards local SCCP users */
+static void sua_snm_ssn_available_to_sccp(struct osmo_sccp_instance *sccp, 
uint32_t aff_pc,
+ uint32_t aff_ssn, uint32_t smi, bool 
available)
+{
+   if (available)
+   sccp_scmg_rx_ssn_allowed(sccp, aff_pc, aff_ssn, smi);
+   else
+   sccp_scmg_rx_ssn_prohibited(sccp, aff_pc, aff_ssn, smi);
+}
+
+/* advertise availability of a single subsystem */
+static void sua_snm_ssn_available(struct osmo_ss7_as *as, uint32_t aff_pc, 
uint32_t aff_ssn,
+ const uint32_t *smi, const char *info_str, 
bool available)
+{
+   struct osmo_ss7_instance *s7i = as->inst;
+   struct osmo_ss7_asp *asp;
+   uint32_t rctx[32];
+   unsigned int num_rctx;
+   uint32_t _smi = smi ? *smi : 0; /* 0 == reserved/unknown in SUA */
+
+   if (s7i->sccp)
+   

Change in libosmo-sccp[master]: xua: introduce xua_msg_get_u32p() helper

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22832 )


Change subject: xua: introduce xua_msg_get_u32p() helper
..

xua: introduce xua_msg_get_u32p() helper

Change-Id: Id7780074b82bc668ae148456750b1a01799decd1
---
M include/osmocom/sigtran/xua_msg.h
M src/xua_msg.c
2 files changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/32/22832/1

diff --git a/include/osmocom/sigtran/xua_msg.h 
b/include/osmocom/sigtran/xua_msg.h
index 329ba96..11bce6f 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -91,6 +91,7 @@
 int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val);
 uint32_t xua_msg_part_get_u32(const struct xua_msg_part *part);
 uint32_t xua_msg_get_u32(const struct xua_msg *xua, uint16_t iei);
+const uint32_t *xua_msg_get_u32p(const struct xua_msg *xua, uint16_t iei, 
uint32_t *out);
 const char *xua_msg_part_get_str(const struct xua_msg_part *part);
 const char *xua_msg_get_str(const struct xua_msg *xua, uint16_t iei);
 void xua_part_add_gt(struct msgb *msg, const struct osmo_sccp_gt *gt);
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 42c580d..1df9abd 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -297,6 +297,16 @@
return xua_msg_part_get_u32(part);
 }

+/* get a U32 IE in host-byte-order, returning whether it exists (!= NULL) or 
not (== NULL) */
+const uint32_t *xua_msg_get_u32p(const struct xua_msg *xua, uint16_t iei, 
uint32_t *out)
+{
+   struct xua_msg_part *part = xua_msg_find_tag(xua, iei);
+   if (!part)
+   return NULL;
+   *out = xua_msg_part_get_u32(part);
+   return out;
+}
+
 const char *xua_msg_part_get_str(const struct xua_msg_part *part)
 {
static char __thread buf[256];

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Id7780074b82bc668ae148456750b1a01799decd1
Gerrit-Change-Number: 22832
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode

2021-02-10 Thread pespin
Hello Jenkins Builder,

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

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

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

Change subject: gsm: Introduce API osmo_gsm48_rest_octets_si13_decode
..

gsm: Introduce API osmo_gsm48_rest_octets_si13_decode

Related: SYS#5358
Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
---
M include/osmocom/gsm/gsm48_rest_octets.h
M src/gsm/gsm48_rest_octets.c
M src/gsm/libosmogsm.map
3 files changed, 110 insertions(+), 1 deletion(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
Gerrit-Change-Number: 22800
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: SCCP_Templates: Make tr_SCCP_UDT work for unspecific templates

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22830 )


Change subject: SCCP_Templates: Make tr_SCCP_UDT work for unspecific templates
..

SCCP_Templates: Make tr_SCCP_UDT work for unspecific templates

Change-Id: Ic77f52f7ec6dc8e17d9cd0789ba790296a25bc50
---
M library/SCCP_Templates.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index b0e6df7..ff4d745 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -143,7 +143,7 @@
calledPAddress := ConvertASPAddressToEncodedAddress_itu(called),
callingPAddress := 
ConvertASPAddressToEncodedAddress_itu(calling),
data := {
-   paramLength := lengthof(data),
+   paramLength := ?,
data := data
}
}

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

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


Change in osmo-ttcn3-hacks[master]: sccp: Add Tests for SCMG SST procedure

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22831 )


Change subject: sccp: Add Tests for SCMG SST procedure
..

sccp: Add Tests for SCMG SST procedure

The SST procedure can be used by any SCCP node to test the availability
of a remote SSN.  If the specified remote SSN is available at the
specified PC, a SCMG SSA is returned.  If not, there's a timeout.

Test for SSN=1 (SCMG), another non-SCMG SSN that exists, and for one
SSN that doesn't exist.

Change-Id: If3f5f3144c0ed83d0bda5953522a9d73287c8ba2
---
M deps/Makefile
M library/SCCP_Templates.ttcn
M sccp/SCCP_Tests_RAW.ttcn
3 files changed, 185 insertions(+), 2 deletions(-)



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

diff --git a/deps/Makefile b/deps/Makefile
index c5fd338..c9cc53d 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -44,7 +44,6 @@
titan.TestPorts.UNIX_DOMAIN_SOCKETasp

 ECLIPSEGIT2_REPOS= titan.ProtocolEmulations.M3UA \
-   titan.ProtocolEmulations.SCCP \
titan.ProtocolModules.GRE \
titan.ProtocolModules.M2PA \
titan.ProtocolModules.ROSE \
@@ -65,6 +64,7 @@
 OSMOGITHUB_REPOS=  titan.TestPorts.SCTPasp \
titan.TestPorts.MTP3asp \
titan.TestPorts.UDPasp \
+   titan.ProtocolEmulations.SCCP \
titan.ProtocolModules.BSSGP_v13.0.0

 OSMOGIT_REPOS= titan.ProtocolModules.MAP \
@@ -80,7 +80,7 @@
 # name of a local branch here (e.g. 'master').
 titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
 titan.ProtocolEmulations.M3UA_commit=  
f086e78d74defa044d864f17adaad9433fedc961
-titan.ProtocolEmulations.SCCP_commit=  R.7.A-10-g2ca1566
+titan.ProtocolEmulations.SCCP_commit=  R.7.A-11-gd4b7a6d
 titan.ProtocolModules.BSSAPP_v7.3.0_commit=R.2.A-4-g20cfaf8
 titan.ProtocolModules.BSSGP_v13.0.0_commit=
e97d92a8b66bec399babea52f593771b76cb175a
 titan.ProtocolModules.BSSMAP_commit=   master
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index ff4d745..9936dd0 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -215,5 +215,90 @@
}
 }

+private function f_pc_int2bit(template (present) integer pc)
+return template SCMG_param_AffectedPointCode {
+   if (istemplatekind(pc, "?")) {
+   return ?;
+   } else {
+   return int2bit(valueof(pc), 16);
+   }
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SSA(template (value) integer ssn,
+ integer pc,
+ template (value) BIT2 smi := 
'00'B) := {
+   messageType := sSAallowed,
+   affectedSSN := ssn,
+   affectedPC := int2bit(valueof(pc), 16),
+   smi := {
+   smi := smi,
+   reserved := '00'B
+   },
+   congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCMG_SSA(template (present) integer ssn 
:= ?,
+   template (present) integer pc 
:= ?,
+   template (present) BIT2 smi := 
?) := {
+   messageType := sSAallowed,
+   affectedSSN := ssn,
+   affectedPC := f_pc_int2bit(pc),
+   smi := {
+   smi := smi,
+   reserved := '00'B
+   },
+   congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SSP(template (value) integer ssn,
+ integer pc,
+ template (value) BIT2 smi := 
'00'B) := {
+   messageType := sSPprohib,
+   affectedSSN := ssn,
+   affectedPC := int2bit(valueof(pc), 16),
+   smi := {
+   smi := smi,
+   reserved := '00'B
+   },
+   congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCMG_SSP(template (present) integer ssn 
:= ?,
+   template (present) integer pc 
:= ?,
+   template (present) BIT2 smi := 
?) := {
+   messageType := sSPprohib,
+   affectedSSN := ssn,
+   affectedPC := f_pc_int2bit(pc),
+   smi := {
+   smi := smi,
+   reserved := '00'B
+   },
+   congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SST(template (value) integer ssn,
+ integer pc,
+ template (value) BIT2 smi := 
'00'B) := {
+   messageType := sSTstaTest,
+   affectedSSN := ssn,
+   affectedPC := int2bit(valueof(pc), 16),
+   smi := {
+   smi := smi,
+   reserved := '00'B
+   },
+   congLevel 

Change in osmo-ttcn3-hacks[master]: pcu: Introduce tests checking Pkt Cell Chg Notif dup retrans

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


Change subject: pcu: Introduce tests checking Pkt Cell Chg Notif dup retrans
..

pcu: Introduce tests checking Pkt Cell Chg Notif dup retrans

Tests verify dup retrans triggered by MS timer are ignored if the target
cell is still the same (and hence no logic/behavior change is required,
current process can proceed onwards).

Related: SYS#4909
Change-Id: I00e8c1a63392bf8753f58f7d9d2d0e903ac5c529
---
M pcu/PCU_Tests.ttcn
1 file changed, 219 insertions(+), 23 deletions(-)



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

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 0b887db..f7687f5 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -57,6 +57,7 @@
 import from StatsD_Checker all;

 import from IPA_Emulation all;
+import from Osmocom_CTRL_Types all;
 import from Osmocom_CTRL_Adapter all;
 import from Osmocom_CTRL_Functions all;

@@ -3611,6 +3612,55 @@
return;
 }

+private function f_outbound_nacc_rim_tx_resp(PCUIF_info_ind info_ind)
+runs on RAW_PCU_Test_CT {
+   var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_enc_BcdMccMnc(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1),
+   
info_ind.lac),
+info_ind.rac),
+ info_ind.cell_id));
+   var BssgpCellId dst := valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, 
/* Decided by test itself (emulating BSC) */
+   423),
+2),
+ 5));
+   var RIM_Routing_Address src_addr := 
valueof(t_RIM_Routing_Address_cid(src));
+   var RIM_Routing_Address dst_addr := 
valueof(t_RIM_Routing_Address_cid(dst));
+   var template (value) RAN_Information_RIM_Container res_cont :=
+   
ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ts_RIM_Sequence_Number(2),
+ts_RIM_PDU_Indications(false, 
RIM_PDU_TYPE_SING_REP),
+
ts_RIM_Protocol_Version_Number(1),
+
tsu_ApplContainer_or_ApplErrContainer_NACC(tsu_ApplContainer_NACC(dst, false, 
3, si_default)),
+omit);
+   
RIM.send(ts_PDU_BSSGP_RAN_INFORMATION(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 src_addr),
+ 
ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ res_cont));
+}
+
+altstep as_outbound_nacc_rim_resolve(PCUIF_info_ind info_ind, boolean 
do_answer := true, boolean do_repeat := false)
+runs on RAW_PCU_Test_CT {
+   /* RIM procedure: */
+   var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_enc_BcdMccMnc(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1),
+   
info_ind.lac),
+info_ind.rac),
+ info_ind.cell_id));
+   var BssgpCellId dst := valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, 
/* Decided by test itself (emulating BSC) */
+   423),
+2),
+ 5));
+   var RIM_Routing_Address src_addr := 
valueof(t_RIM_Routing_Address_cid(src));
+   var RIM_Routing_Address dst_addr := 
valueof(t_RIM_Routing_Address_cid(dst));
+   [] 
RIM.receive(tr_RAN_INFORMATION_REQUEST(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 dst_addr),
+  
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+  
tr_RAN_Information_Request_RIM_Container)) {
+   if (do_answer) {
+   f_outbound_nacc_rim_tx_resp(info_ind);
+   }
+   if (do_repeat) {
+   repeat;
+   }
+   }
+}
+
 /* Start NACC from MS side */
 private function f_outbound_nacc_success(inout GprsMS ms, PCUIF_info_ind 
info_ind,
 boolean exp_rac_ci_query := true, 
boolean exp_si_query := true,
@@ -3639,29 +3689,7 @@

if (exp_si_query == true) {
/* RIM procedure: */
-   var BssgpCellId src := 

Change in osmo-pcu[master]: nacc_fsm: Move code filling struct to helper function

2021-02-10 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22826 )


Change subject: nacc_fsm: Move code filling struct to helper function
..

nacc_fsm: Move code filling struct to helper function

Same filler will be needed in different places since that message can
arrive at different points of time (different states).
It also helps supporting newer key types in the future.

Change-Id: Idfd4db8408f767b1847b04c88047a1c4996e543e
---
M src/nacc_fsm.c
1 file changed, 19 insertions(+), 10 deletions(-)



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

diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c
index 6a92f83..f9dea98 100644
--- a/src/nacc_fsm.c
+++ b/src/nacc_fsm.c
@@ -268,6 +268,22 @@
return 0;
 }

+static int fill_neigh_key_from_bts_pkt_cell_chg_not(struct 
neigh_cache_entry_key *neigh_key,
+   const struct 
gprs_rlcmac_bts *bts,
+   const 
Packet_Cell_Change_Notification_t *notif)
+{
+   switch (notif->Target_Cell.UnionType) {
+   case 0: /* GSM */
+   neigh_key->local_lac = bts->cgi_ps.rai.lac.lac;
+   neigh_key->local_ci = bts->cgi_ps.cell_identity;
+   neigh_key->tgt_arfcn = 
notif->Target_Cell.u.Target_Cell_GSM_Notif.ARFCN;
+   neigh_key->tgt_bsic = 
notif->Target_Cell.u.Target_Cell_GSM_Notif.BSIC;
+   return 0;
+   default:
+   return -ENOTSUP;
+   }
+}
+
 #define SI_HDR_LEN 2
 static void bts_fill_si_cache_value(const struct gprs_rlcmac_bts *bts, struct 
si_cache_value *val)
 {
@@ -303,19 +319,12 @@
switch (event) {
case NACC_EV_RX_CELL_CHG_NOTIFICATION:
notif = (Packet_Cell_Change_Notification_t *)data;
-   switch (notif->Target_Cell.UnionType) {
-   case 0: /* GSM */
-   ctx->neigh_key.local_lac = bts->cgi_ps.rai.lac.lac;
-   ctx->neigh_key.local_ci = bts->cgi_ps.cell_identity;
-   ctx->neigh_key.tgt_arfcn = 
notif->Target_Cell.u.Target_Cell_GSM_Notif.ARFCN;
-   ctx->neigh_key.tgt_bsic = 
notif->Target_Cell.u.Target_Cell_GSM_Notif.BSIC;
-   nacc_fsm_state_chg(fi, NACC_ST_WAIT_RESOLVE_RAC_CI);
-   break;
-   default:
+   if (fill_neigh_key_from_bts_pkt_cell_chg_not(>neigh_key, 
bts, notif) < 0) {
LOGPFSML(fi, LOGL_NOTICE, "TargetCell type=0x%x not 
supported\n",
 notif->Target_Cell.UnionType);
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
-   return;
+   } else {
+   nacc_fsm_state_chg(fi, NACC_ST_WAIT_RESOLVE_RAC_CI);
}
break;
default:

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idfd4db8408f767b1847b04c88047a1c4996e543e
Gerrit-Change-Number: 22826
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-gbproxy[master]: gb_proxy: fix wrong usage of bssgp_rim_ri_name()

2021-02-10 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22824 )

Change subject: gb_proxy: fix wrong usage of bssgp_rim_ri_name()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I8b6254a269770ddc141325d67d143f2a8130c519
Gerrit-Change-Number: 22824
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 18:12:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: GBProxy_Tests: fix TC_rim_info_pcu2pcu

2021-02-10 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825 )

Change subject: GBProxy_Tests: fix TC_rim_info_pcu2pcu
..


Patch Set 1: Code-Review+1

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG@10
PS1, Line 10: which uses the templates from Osmocom_Gb_Types.ttcn not as 
intended
"[...] which doesn't use the templates [...] as intended."


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825/1//COMMIT_MSG@11
PS1, Line 11: into timeout
into a timeout



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Gerrit-Change-Number: 22825
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 17:38:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: GBProxy_Tests: fix TC_rim_info_pcu2pcu

2021-02-10 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22825 )


Change subject: GBProxy_Tests: fix TC_rim_info_pcu2pcu
..

GBProxy_Tests: fix TC_rim_info_pcu2pcu

The testcase TC_rim_info_pcu2pcu calls a function f_TC_rim_info_pcu2pcu()
which uses the templates from Osmocom_Gb_Types.ttcn not as intended. This
eventually lets the altstep in f_rim_pcu2pcu() run into timeout since
the templates never match.

Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Related: SYS#5103
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 22 insertions(+), 10 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 0f3b4cb..af9646c 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -3122,22 +3122,34 @@
 {
var BssgpCellId cell_id_src := 
g_pcu[src_pcu_idx].cfg.bvc[src_bvc_idx].cell_id;
var BssgpCellId cell_id_dst := 
g_pcu[dst_pcu_idx].cfg.bvc[dst_bvc_idx].cell_id;
-   var template (value) RIM_Routing_Information ri_pcu_src;
-   var template (value) RIM_Routing_Information ri_pcu_dst;
-   var template (value) RAN_Information_RIM_Container cont;
+   var template (value) RIM_Routing_Information ri_pcu_src_tx;
+   var template (value) RIM_Routing_Information ri_pcu_dst_tx;
+   var template RIM_Routing_Information ri_pcu_src_rx;
+   var template RIM_Routing_Information ri_pcu_dst_rx;
+   var template (value) RAN_Information_RIM_Container cont_tx;
+   var template RAN_Information_RIM_Container cont_rx;

log("Testing RIM PCU2PCU from PCU[", src_pcu_idx, "][", src_bvc_idx, "] 
to PCU[",
dst_pcu_idx, "][", dst_bvc_idx, "]");

-   ri_pcu_src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
+   ri_pcu_src_tx := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 
t_RIM_Routing_Address_cid(cell_id_src));
-   ri_pcu_dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
+   ri_pcu_dst_tx := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 
t_RIM_Routing_Address_cid(cell_id_dst));
-   cont := 
ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
-ts_RIM_Sequence_Number(0),
-ts_RIM_PDU_Indications(false, 
RIM_PDU_TYPE_STOP));
-   f_rim_pcu2pcu(ts_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu_dst, src := 
ri_pcu_src, cont := cont),
-   tr_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu_dst, src := 
ri_pcu_src, cont := cont),
+   ri_pcu_src_rx := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
+
t_RIM_Routing_Address_cid(cell_id_src));
+   ri_pcu_dst_rx := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
+
t_RIM_Routing_Address_cid(cell_id_dst));
+
+   cont_tx := 
ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+   ts_RIM_Sequence_Number(0),
+   
ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+   cont_rx := 
tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+   tr_RIM_Sequence_Number(0),
+   
tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+
+   f_rim_pcu2pcu(ts_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu_dst_tx, src := 
ri_pcu_src_tx, cont := cont_tx),
+   tr_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu_dst_rx, src 
:= ri_pcu_src_rx, cont := cont_rx),
src_pcu_idx, dst_pcu_idx);
 }
 testcase TC_rim_info_pcu2pcu() runs on GlobalTest_CT

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I281dc53bb5dd7be86edc9db185618252ff1b9a21
Gerrit-Change-Number: 22825
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: Move bts_ident_key to bts.c

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22813 )

Change subject: Move bts_ident_key to bts.c
..


Patch Set 1:

So, what I meant is: In the end, to me it doesn't make sense to decide to put 
code in the incorrect file just because then on our build foo adding lots of 
*.o we have to put more churn (which should be fixed as expressed in my prev 
comment).


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
Gerrit-Change-Number: 22813
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 17:06:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Move bts_ident_key to bts.c

2021-02-10 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22813 )

Change subject: Move bts_ident_key to bts.c
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/22813/1/tests/handover/Makefile.am
File tests/handover/Makefile.am:

https://gerrit.osmocom.org/c/osmo-bsc/+/22813/1/tests/handover/Makefile.am@a125
PS1, Line 125: neighbor_ident_test_LDADD = \
> it's really ugly that you need to pull in all of this, and add all of the 
> stubs below now. […]
Well I'd say that's totally irrelevant, a different problem with regards to the 
change in code.

Thiss mess needs to be fixed by this proposal:
"""
we really need to do some libbsc.a target bundle in osmo-bsc.git/src/, each 
time that some stuff changes there I need to add around 20 lines of .o objects 
in some makefile.am...
"""

I can work on that later but not right now since I have more high-prio stuff to 
do atm.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
Gerrit-Change-Number: 22813
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 17:05:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: gb_proxy: fix wrong usage of bssgp_rim_ri_name()

2021-02-10 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22824 )


Change subject: gb_proxy: fix wrong usage of bssgp_rim_ri_name()
..

gb_proxy: fix wrong usage of bssgp_rim_ri_name()

In some logging statements the function bssgp_rim_ri_name() is used
twice. This is wrong since _name() functions use an internal buffer,
which can not be used twice in the same logging statement, so for the
affected log statements the function bssgp_rim_ri_name_buf() must be
used.

Change-Id: I8b6254a269770ddc141325d67d143f2a8130c519
Related: SYS#5103
---
M src/gb_proxy.c
1 file changed, 16 insertions(+), 6 deletions(-)



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

diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index 4147d86..43d819d 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -897,6 +897,8 @@
struct bssgp_rim_routing_info dest_ri;
struct bssgp_rim_routing_info src_ri;
int rc;
+   char ri_src_str[64];
+   char ri_dest_str[64];

rc = bssgp_parse_rim_ri(_ri, TLVP_VAL([0], 
BSSGP_IE_RIM_ROUTING_INFO),
TLVP_LEN([0], BSSGP_IE_RIM_ROUTING_INFO));
@@ -938,8 +940,10 @@
/* TODO: Also check if dest_cell->bss_bvc is 
RIM-capable (see also above). If not we should
 * respond with a BSSGP STATUS message as well because 
it also would make no sense to try
 * routing the RIM message to the next RIM-capable 
SGSN. */
-   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying to peer 
(nsei=%u) RIM-PDU: src=%s, dest=%s\n", log_pfx, pdut_name,
-dest_cell->bss_bvc->nse->nsei, 
bssgp_rim_ri_name(_ri), bssgp_rim_ri_name(_ri));
+   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying to peer 
(nsei=%u) RIM-PDU: src=%s, dest=%s\n",
+log_pfx, pdut_name, dest_cell->bss_bvc->nse->nsei,
+bssgp_rim_ri_name_buf(ri_src_str, 
sizeof(ri_src_str), _ri),
+bssgp_rim_ri_name_buf(ri_dest_str, 
sizeof(ri_dest_str), _ri));
return gbprox_relay2peer(msg, dest_cell->bss_bvc, 0);
}
}
@@ -954,8 +958,10 @@
 pdut_name, bssgp_rim_ri_name(_ri), 
bssgp_rim_ri_name(_ri));
return bssgp_tx_status(BSSGP_CAUSE_UNKN_RIM_AI, NULL, msg);
}
-   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying to SGSN(%05u/%s) RIM-PDU: 
src=%s, dest=%s\n", log_pfx, pdut_name,
-sgsn->nse->nsei, sgsn->name, bssgp_rim_ri_name(_ri), 
bssgp_rim_ri_name(_ri));
+   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying to SGSN(%05u/%s) RIM-PDU: 
src=%s, dest=%s\n",
+log_pfx, pdut_name, sgsn->nse->nsei, sgsn->name,
+bssgp_rim_ri_name_buf(ri_src_str, sizeof(ri_src_str), _ri),
+bssgp_rim_ri_name_buf(ri_dest_str, sizeof(ri_dest_str), _ri));

return gbprox_relay2nse(msg, sgsn->nse, 0);
 }
@@ -1216,6 +1222,8 @@
struct bssgp_rim_routing_info dest_ri;
struct bssgp_rim_routing_info src_ri;
int rc;
+   char ri_src_str[64];
+   char ri_dest_str[64];

/* TODO: Reply with STATUS if BSSGP didn't negotiate RIM feature, see 
also comments in
   gbprox_rx_rim_from_bss() */
@@ -1253,8 +1261,10 @@
sgsn = gbproxy_sgsn_by_nsei(nse->cfg, nse->nsei);
OSMO_ASSERT(sgsn);

-   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying from SGSN(%05u/%s) RIM-PDU: 
src=%s, dest=%s\n", log_pfx, pdut_name,
-sgsn->nse->nsei, sgsn->name, bssgp_rim_ri_name(_ri), 
bssgp_rim_ri_name(_ri));
+   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying from SGSN(%05u/%s) RIM-PDU: 
src=%s, dest=%s\n",
+log_pfx, pdut_name, sgsn->nse->nsei, sgsn->name,
+bssgp_rim_ri_name_buf(ri_src_str, sizeof(ri_src_str), _ri),
+bssgp_rim_ri_name_buf(ri_dest_str, sizeof(ri_dest_str), _ri));

return gbprox_relay2peer(msg, dest_cell->bss_bvc, 0);
 }

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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I8b6254a269770ddc141325d67d143f2a8130c519
Gerrit-Change-Number: 22824
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-MessageType: newchange


Change in osmo-gbproxy[master]: gb_proxy: add support for relaying BSSGP RIM messages

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804 )

Change subject: gb_proxy: add support for relaying BSSGP RIM messages
..

gb_proxy: add support for relaying BSSGP RIM messages

BSSGP RIM messages are routed from a source to a destination cell by a
RIM routing information IE. Add parsing for the routing information and
support for relaying RIM messages to the destination cell/PCU. If the
destination cell/PCU is not directly connected to osmo-gbproxy route the
rim message to the first connected SGSN.

Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Related: SYS#5103
---
M src/gb_proxy.c
1 file changed, 128 insertions(+), 5 deletions(-)

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



diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index 2d8b5e4..4147d86 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -886,6 +887,79 @@
return 0;
 }

+/* Receive an incoming RIM message from a BSS-side NS-VC */
+static int gbprox_rx_rim_from_bss(struct tlv_parsed *tp, struct gbproxy_nse 
*nse, struct msgb *msg, char *log_pfx,
+ const char *pdut_name)
+{
+   struct gbproxy_sgsn *sgsn;
+   struct gbproxy_cell *dest_cell;
+   struct gbproxy_cell *src_cell;
+   struct bssgp_rim_routing_info dest_ri;
+   struct bssgp_rim_routing_info src_ri;
+   int rc;
+
+   rc = bssgp_parse_rim_ri(_ri, TLVP_VAL([0], 
BSSGP_IE_RIM_ROUTING_INFO),
+   TLVP_LEN([0], BSSGP_IE_RIM_ROUTING_INFO));
+   if (rc < 0) {
+   LOGP(DGPRS, LOGL_ERROR, "%s %s cannot parse destination RIM 
routing info\n", log_pfx, pdut_name);
+   return bssgp_tx_status(BSSGP_CAUSE_INV_MAND_INF, NULL, msg);
+   }
+   rc = bssgp_parse_rim_ri(_ri, TLVP_VAL([1], 
BSSGP_IE_RIM_ROUTING_INFO),
+   TLVP_LEN([1], BSSGP_IE_RIM_ROUTING_INFO));
+   if (rc < 0) {
+   LOGP(DGPRS, LOGL_ERROR, "%s %s cannot parse source RIM routing 
info\n", log_pfx, pdut_name);
+   return bssgp_tx_status(BSSGP_CAUSE_INV_MAND_INF, NULL, msg);
+   }
+
+   /* Since gbproxy is 2G only we do not expect to get RIM messages only 
from GERAN cells. */
+   if (src_ri.discr != BSSGP_RIM_ROUTING_INFO_GERAN) {
+   LOGP(DGPRS, LOGL_ERROR, "%s %s source RIM routing info is not 
GERAN (%s)\n", log_pfx, pdut_name,
+bssgp_rim_ri_name(_ri));
+   return bssgp_tx_status(BSSGP_CAUSE_UNKN_RIM_AI, NULL, msg);
+   }
+
+   /* Lookup source cell to make sure that the source RIM routing 
information actually belongs
+* to a valid cell that we know */
+   src_cell = gbproxy_cell_by_cellid(nse->cfg, _ri.geran.raid, 
src_ri.geran.cid);
+   if (!src_cell) {
+   LOGP(DGPRS, LOGL_NOTICE, "%s %s cannot find cell for source RIM 
routing info (%s)\n", log_pfx,
+pdut_name, bssgp_rim_ri_name(_ri));
+   return bssgp_tx_status(BSSGP_CAUSE_UNKN_RIM_AI, NULL, msg);
+   }
+
+   /* TODO: Use bssgp_bvc_get_features_negotiated(src_cell->bss_bvc->fi) 
to check if the the BSS sided BVC actually
+* did negotiate RIM support. If not we should respond with a BSSGP 
STATUS message. The cause code should be
+* BSSGP_CAUSE_PDU_INCOMP_FEAT. */
+
+   /* If Destination is known by gbproxy, route directly */
+   if (dest_ri.discr == BSSGP_RIM_ROUTING_INFO_GERAN) {
+   dest_cell = gbproxy_cell_by_cellid(nse->cfg, 
_ri.geran.raid, dest_ri.geran.cid);
+   if (dest_cell) {
+   /* TODO: Also check if dest_cell->bss_bvc is 
RIM-capable (see also above). If not we should
+* respond with a BSSGP STATUS message as well because 
it also would make no sense to try
+* routing the RIM message to the next RIM-capable 
SGSN. */
+   LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying to peer 
(nsei=%u) RIM-PDU: src=%s, dest=%s\n", log_pfx, pdut_name,
+dest_cell->bss_bvc->nse->nsei, 
bssgp_rim_ri_name(_ri), bssgp_rim_ri_name(_ri));
+   return gbprox_relay2peer(msg, dest_cell->bss_bvc, 0);
+   }
+   }
+
+   /* Otherwise pass on to a RIM-capable SGSN */
+   /* TODO: We need to extend gbproxy_select_sgsn() so that it selects a 
RIM-capable SGSN, at the moment we just
+* get any SGSN and just assume that it is RIM-capable. */
+   sgsn = gbproxy_select_sgsn(nse->cfg, NULL);
+   if (!sgsn) {
+   LOGP(DGPRS, LOGL_NOTICE,
+"%s %s cannot route RIM message (%s to %s) since no RIM 
capable SGSN is found!\n", log_pfx,
+pdut_name, bssgp_rim_ri_name(_ri), 
bssgp_rim_ri_name(_ri));
+ 

Change in osmo-gbproxy[master]: gb_proxy: add support for relaying BSSGP RIM messages

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804 )

Change subject: gb_proxy: add support for relaying BSSGP RIM messages
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Gerrit-Change-Number: 22804
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:43:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Move bts_ident_key to bts.c

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22813 )

Change subject: Move bts_ident_key to bts.c
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/22813/1/tests/handover/Makefile.am
File tests/handover/Makefile.am:

https://gerrit.osmocom.org/c/osmo-bsc/+/22813/1/tests/handover/Makefile.am@a125
PS1, Line 125: neighbor_ident_test_LDADD = \
it's really ugly that you need to pull in all of this, and add all of the stubs 
below now.  Wouldn't really call that an improvement :/



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
Gerrit-Change-Number: 22813
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:43:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Fix neigh resolution service on local neighbours

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22814 )

Change subject: Fix neigh resolution service on local neighbours
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I217e3550aa6d7f3c3cab4e545641d790ae12b23f
Gerrit-Change-Number: 22814
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:42:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: Various comment/whitespace changes

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22809 )

Change subject: Various comment/whitespace changes
..

Various comment/whitespace changes

Change-Id: I0eeef3ec16c249d65e9358889d21cc4984b7b51f
---
M src/gb_proxy.c
M src/gb_proxy_peer.c
2 files changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index f773584..2d8b5e4 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -461,7 +461,6 @@
} else if (TLVP_PRESENT(, BSSGP_IE_IMSI)) {
/* FIXME: Use the IMSI as selector? */
rc = gbprox_bss2sgsn_tlli(bss_bvc->cell, msg, NULL, 
false);
-   /* rc = gbprox_bss2sgsn_hashed(bss_bvc->cell, msg, 
NULL); */
} else
LOGPBVC(bss_bvc, LOGL_ERROR, "Rx RADIO-STATUS without 
any of the conditional IEs\n");
break;
@@ -1392,7 +1391,7 @@
uint8_t cause = BSSGP_CAUSE_OML_INTERV;
bvc = gbproxy_bvc_by_bvci(sgsn_nse, 0);
if (bvc)
-   osmo_fsm_inst_dispatch(bvc->fi, 
BSSGP_BVCFSM_E_REQ_RESET, );
+   osmo_fsm_inst_dispatch(bvc->fi, 
BSSGP_BVCFSM_E_REQ_RESET, );
}
break;
case GPRS_NS2_AFF_CAUSE_FAILURE:
diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c
index 9ea00a9..27d73b8 100644
--- a/src/gb_proxy_peer.c
+++ b/src/gb_proxy_peer.c
@@ -93,8 +93,7 @@

/* We leave allocating the bvc->fi to the caller, as the FSM details 
depend
 * on the type of BVC (SIG/PTP) and role (SGSN/BSS) */
-
-return bvc;
+   return bvc;
 }

 void gbproxy_bvc_free(struct gbproxy_bvc *bvc)
@@ -711,7 +710,7 @@
return NULL;
 }

-/*! Seleect a pseudo-random SGSN for a given TLLI, ignoring any SGSN that is 
not accepting connections
+/*! Select a pseudo-random SGSN for a given TLLI, ignoring any SGSN that is 
not accepting connections
  *  \param[in] cfg The gbproxy configuration
  *  \param[in] sgsn_avoid If not NULL then avoid this SGSN when selecting a 
new one. Use for load redistribution
  *  \param[in] tlli The tlli to choose an SGSN for. The same tlli will map to 
the same SGSN as long as no SGSN is

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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I0eeef3ec16c249d65e9358889d21cc4984b7b51f
Gerrit-Change-Number: 22809
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-gbproxy[master]: gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22808 )

Change subject: gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc
..

gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc

The MSC-pooling chapter in OsmoBSC mentions that overlapping NRI ranges will
warn if configured though the VTY interface, but fail when started with
such a config.

The manual for OsmoGbProxy promises a similar behaviour, this patch implements
it.

Change-Id: Id3815ed8d1736ea3ba1e498b2bc3cf30b772551d
---
M src/gb_proxy_vty.c
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/src/gb_proxy_vty.c b/src/gb_proxy_vty.c
index 9240d2d..f069e88 100644
--- a/src/gb_proxy_vty.c
+++ b/src/gb_proxy_vty.c
@@ -283,6 +283,7 @@
struct gbproxy_sgsn *sgsn = vty->index;
struct gbproxy_sgsn *other_sgsn;
bool before;
+   bool overlaps = false;
int rc;
const char *message;
struct osmo_nri_range add_range;
@@ -307,13 +308,17 @@
if (osmo_nri_range_overlaps_ranges(_range, 
other_sgsn->pool.nri_ranges)) {
uint16_t nsei = sgsn->nse->nsei;
uint16_t other_nsei = other_sgsn->nse->nsei;
+   overlaps = true;
NRI_WARN(sgsn, "NRI range [%d..%d] overlaps between NSE 
%05d and NSE %05d."
 " For overlaps, NSE %05d has higher priority 
than NSE %05d",
 add_range.first, add_range.last, nsei, 
other_nsei,
 before ? other_nsei : nsei, before ? nsei : 
other_nsei);
}
}
-   return CMD_SUCCESS;
+   if (overlaps)
+   return CMD_WARNING;
+   else
+   return CMD_SUCCESS;
 }

 DEFUN_ATTR(cfg_sgsn_nri_del, cfg_sgsn_nri_del_cmd,

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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Id3815ed8d1736ea3ba1e498b2bc3cf30b772551d
Gerrit-Change-Number: 22808
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-gbproxy[master]: gbproxy_vty: Fix NRI VTY help MSC->SGSN

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22807 )

Change subject: gbproxy_vty: Fix NRI VTY help MSC->SGSN
..

gbproxy_vty: Fix NRI VTY help MSC->SGSN

Change-Id: I33a60578c7dc28ec50b98c9b67b5cdb0d821d3d1
---
M src/gb_proxy_vty.c
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/src/gb_proxy_vty.c b/src/gb_proxy_vty.c
index 9dbde58..9240d2d 100644
--- a/src/gb_proxy_vty.c
+++ b/src/gb_proxy_vty.c
@@ -276,7 +276,7 @@

 DEFUN_ATTR(cfg_sgsn_nri_add, cfg_sgsn_nri_add_cmd,
   "nri add <0-32767> [<0-32767>]",
-  NRI_STR "Add NRI value or range to the NRI mapping for this MSC\n"
+  NRI_STR "Add NRI value or range to the NRI mapping for this SGSN\n"
   NRI_FIRST_LAST_STR,
   CMD_ATTR_IMMEDIATE)
 {
@@ -318,7 +318,7 @@

 DEFUN_ATTR(cfg_sgsn_nri_del, cfg_sgsn_nri_del_cmd,
   "nri del <0-32767> [<0-32767>]",
-  NRI_STR "Remove NRI value or range from the NRI mapping for this 
MSC\n"
+  NRI_STR "Remove NRI value or range from the NRI mapping for this 
SGSN\n"
   NRI_FIRST_LAST_STR,
   CMD_ATTR_IMMEDIATE)
 {
@@ -348,10 +348,10 @@
 DEFUN_ATTR(cfg_sgsn_no_allow_attach, cfg_sgsn_no_allow_attach_cmd,
   "no allow-attach",
   NO_STR
-  "Do not assign new subscribers to this MSC."
-  " Useful if an MSC in an MSC pool is configured to off-load 
subscribers."
-  " The MSC will still be operational for already IMSI-Attached 
subscribers,"
-  " but the NAS node selection function will skip this MSC for new 
subscribers\n",
+  "Do not assign new subscribers to this SGSN."
+  " Useful if an SGSN in an SGSN pool is configured to off-load 
subscribers."
+  " The SGSN will still be operational for already IMSI-Attached 
subscribers,"
+  " but the NAS node selection function will skip this SGSN for new 
subscribers\n",
   CMD_ATTR_IMMEDIATE)
 {
struct gbproxy_sgsn *sgsn = vty->index;
@@ -442,7 +442,7 @@
 DEFUN_ATTR(cfg_gbproxy_nri_null_del,
   cfg_gbproxy_nri_null_del_cmd,
   "nri null del <0-32767> [<0-32767>]",
-  NRI_STR NULL_NRI_STR "Remove NRI value or range from the NRI mapping 
for this MSC\n"
+  NRI_STR NULL_NRI_STR "Remove NULL-NRI value (or range)\n"
   NRI_FIRST_LAST_STR,
   CMD_ATTR_IMMEDIATE)
 {

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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I33a60578c7dc28ec50b98c9b67b5cdb0d821d3d1
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-gbproxy[master]: Various comment/whitespace changes

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22809 )

Change subject: Various comment/whitespace changes
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I0eeef3ec16c249d65e9358889d21cc4984b7b51f
Gerrit-Change-Number: 22809
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:41:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22808 )

Change subject: gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Id3815ed8d1736ea3ba1e498b2bc3cf30b772551d
Gerrit-Change-Number: 22808
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:41:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: gbproxy_vty: Fix NRI VTY help MSC->SGSN

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22807 )

Change subject: gbproxy_vty: Fix NRI VTY help MSC->SGSN
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I33a60578c7dc28ec50b98c9b67b5cdb0d821d3d1
Gerrit-Change-Number: 22807
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:40:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-{fr, gbproxy}-test: use ttcn3-docker-run too

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22823 )

Change subject: ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I2889abe94ed522a205890e5cb39e09cbebfbd820
Gerrit-Change-Number: 22823
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:39:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move shared run code to script

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22822 )

Change subject: ttcn3: move shared run code to script
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
Gerrit-Change-Number: 22822
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:39:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: prepare: start/stop links

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22821 )

Change subject: debian-stretch-titan: prepare: start/stop links
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
Gerrit-Change-Number: 22821
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:38:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: prepare: run 'make deps'

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22820 )

Change subject: debian-stretch-titan: prepare: run 'make deps'
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I9085203b27d310b63a035fd71f7c2a78d02710d4
Gerrit-Change-Number: 22820
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:38:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move prepare code to shared script

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22819 )

Change subject: ttcn3: move prepare code to shared script
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
Gerrit-Change-Number: 22819
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:38:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: debian-stretch-titan: update deps on change

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22818 )

Change subject: debian-stretch-titan: update deps on change
..


Patch Set 1: Code-Review+1

ah, elgant solution to use the Makefile itself as trigger. I didn't think of 
that when I wrote the issue. great!


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I56673312cfb23375d67900016aaac1931f677275
Gerrit-Change-Number: 22818
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:37:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: move initial clone to debian-stretch-titan

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22817 )

Change subject: ttcn3: move initial clone to debian-stretch-titan
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
Gerrit-Change-Number: 22817
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:36:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: remove /root/projects/git symlink

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22816 )

Change subject: ttcn3: remove /root/projects/git symlink
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
Gerrit-Change-Number: 22816
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:36:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3: remove /root/projects/git symlink

2021-02-10 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22816 )

Change subject: ttcn3: remove /root/projects/git symlink
..


Patch Set 1: Verified-1

Please let me merge this patchset, after I've done some more testing. A smoke 
test with running ttcn3-mgw-test didn't show any breakage.


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
Gerrit-Change-Number: 22816
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:26:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gbproxy[master]: gb_proxy: add support for relaying BSSGP RIM messages

2021-02-10 Thread dexter
Hello Jenkins Builder, laforge, daniel,

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

https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804

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

Change subject: gb_proxy: add support for relaying BSSGP RIM messages
..

gb_proxy: add support for relaying BSSGP RIM messages

BSSGP RIM messages are routed from a source to a destination cell by a
RIM routing information IE. Add parsing for the routing information and
support for relaying RIM messages to the destination cell/PCU. If the
destination cell/PCU is not directly connected to osmo-gbproxy route the
rim message to the first connected SGSN.

Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Related: SYS#5103
---
M src/gb_proxy.c
1 file changed, 128 insertions(+), 5 deletions(-)


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Gerrit-Change-Number: 22804
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in docker-playground[master]: ttcn3-{fr, gbproxy}-test: use ttcn3-docker-run too

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22823 )


Change subject: ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too
..

ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too

Move the shared pipework script to the base image, and call it in
ttcn3-docker-run.sh if WAIT_FOR_NETDEV is set. Use ttcn3-docker-run.sh
as entrypoint in both Dockerfiles and remove the custom entrypoint
scripts (which are the same as ttcn3-docker-run.sh now).

Related: OS#5017
Change-Id: I2889abe94ed522a205890e5cb39e09cbebfbd820
---
M debian-stretch-titan/Dockerfile
R debian-stretch-titan/pipework
M debian-stretch-titan/ttcn3-docker-run.sh
M ttcn3-fr-test/Dockerfile
D ttcn3-fr-test/docker-entrypoint.sh
M ttcn3-gbproxy-test/Dockerfile
D ttcn3-gbproxy-test/docker-entrypoint.sh
D ttcn3-gbproxy-test/pipework
8 files changed, 7 insertions(+), 524 deletions(-)



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

diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index 512b4ac..6a70d6c 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/debian-stretch-titan/Dockerfile
@@ -64,3 +64,4 @@

 ADDttcn3-docker-prepare.sh /usr/local/bin/ttcn3-docker-prepare
 ADDttcn3-docker-run.sh /usr/local/bin/ttcn3-docker-run
+ADDpipework /usr/local/bin/pipework
diff --git a/ttcn3-fr-test/pipework b/debian-stretch-titan/pipework
similarity index 100%
rename from ttcn3-fr-test/pipework
rename to debian-stretch-titan/pipework
diff --git a/debian-stretch-titan/ttcn3-docker-run.sh 
b/debian-stretch-titan/ttcn3-docker-run.sh
index 0cda8a5..da3d314 100755
--- a/debian-stretch-titan/ttcn3-docker-run.sh
+++ b/debian-stretch-titan/ttcn3-docker-run.sh
@@ -13,6 +13,10 @@
 SUBDIR=$1
 SUITE=$2

+if [ -n "$WAIT_FOR_NETDEV" ]; then
+   pipework --wait -i "$WAIT_FOR_NETDEV"
+fi
+
 cd /data

 /osmo-ttcn3-hacks/start-testsuite.sh "/osmo-ttcn3-hacks/$SUBDIR/$SUITE"
diff --git a/ttcn3-fr-test/Dockerfile b/ttcn3-fr-test/Dockerfile
index 1f0e6e1..ae355d7 100644
--- a/ttcn3-fr-test/Dockerfile
+++ b/ttcn3-fr-test/Dockerfile
@@ -9,7 +9,5 @@

 COPY   FR_Tests.cfg /data/FR_Tests.cfg
 COPY   FRNET_Tests.cfg /data/FRNET_Tests.cfg
-COPY   pipework /usr/bin/pipework
-COPY   docker-entrypoint.sh /docker-entrypoint.sh

-ENTRYPOINT ["/docker-entrypoint.sh"]
+ENTRYPOINT ["ttcn3-docker-run"]
diff --git a/ttcn3-fr-test/docker-entrypoint.sh 
b/ttcn3-fr-test/docker-entrypoint.sh
deleted file mode 100755
index 132c73c..000
--- a/ttcn3-fr-test/docker-entrypoint.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -eou pipefail
-
-SUBDIR=$1
-SUITE=$2
-
-if [[ -n ${WAIT_FOR_NETDEV:-} ]]; then
-   /usr/bin/pipework --wait -i ${WAIT_FOR_NETDEV}
-fi
-
-cd /data && /osmo-ttcn3-hacks/start-testsuite.sh 
/osmo-ttcn3-hacks/$SUBDIR/$SUITE; \
-exit_code=$?
-
-/osmo-ttcn3-hacks/log_merge.sh $SUITE --rm
-
-exit $exit_code
diff --git a/ttcn3-gbproxy-test/Dockerfile b/ttcn3-gbproxy-test/Dockerfile
index 661ca07..aee22ff 100644
--- a/ttcn3-gbproxy-test/Dockerfile
+++ b/ttcn3-gbproxy-test/Dockerfile
@@ -8,7 +8,5 @@
 VOLUME /data

 COPY   GBProxy_Tests.cfg /data/GBProxy_Tests.cfg
-COPY   pipework /usr/bin/pipework
-COPY   docker-entrypoint.sh /docker-entrypoint.sh

-ENTRYPOINT ["/docker-entrypoint.sh"]
+ENTRYPOINT ["ttcn3-docker-run", "gbproxy", "GBProxy_Tests"]
diff --git a/ttcn3-gbproxy-test/docker-entrypoint.sh 
b/ttcn3-gbproxy-test/docker-entrypoint.sh
deleted file mode 100755
index cfdd898..000
--- a/ttcn3-gbproxy-test/docker-entrypoint.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-set -eou pipefail
-
-if [[ -n ${WAIT_FOR_NETDEV:-} ]]; then
-   /usr/bin/pipework --wait -i ${WAIT_FOR_NETDEV}
-fi
-
-cd /data && /osmo-ttcn3-hacks/start-testsuite.sh 
/osmo-ttcn3-hacks/gbproxy/GBProxy_Tests; \
-exit_code=$?
-
-/osmo-ttcn3-hacks/log_merge.sh GBProxy_Tests --rm
-
-exit $exit_code
diff --git a/ttcn3-gbproxy-test/pipework b/ttcn3-gbproxy-test/pipework
deleted file mode 100755
index 97ce66b..000
--- a/ttcn3-gbproxy-test/pipework
+++ /dev/null
@@ -1,489 +0,0 @@
-#!/bin/sh
-# This code should (try to) follow Google's Shell Style Guide
-# (https://google.github.io/styleguide/shell.xml)
-set -e
-
-case "$1" in
-  --wait)
-WAIT=1
-;;
-  --direct-phys)
-DIRECT_PHYS=1
-shift
-;;
-esac
-
-IFNAME=$1
-
-# default value set further down if not set here
-CONTAINER_IFNAME=
-if [ "$2" = "-i" ]; then
-  CONTAINER_IFNAME=$3
-  shift 2
-fi
-
-if [ "$2" = "-l" ]; then
-  LOCAL_IFNAME=$3
-  shift 2
-fi
-
-#inet or inet6
-FAMILY_FLAG="-4"
-if [ "$2" = "-a" ]; then
-  FAMILY_FLAG="-$3"
-  shift 2
-fi
-
-GUESTNAME=$2
-IPADDR=$3
-MACADDR=$4
-
-case "$MACADDR" in
-  *@*)
-VLAN="${MACADDR#*@}"
-VLAN="${VLAN%%@*}"
-MACADDR="${MACADDR%%@*}"
-;;
-  *)
-VLAN=
-;;
-esac
-
-# did they ask to generate a custom MACADDR?
-# generate the unique string
-case "$MACADDR" in
-  U:*)
-

Change in docker-playground[master]: ttcn3: move shared run code to script

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22822 )


Change subject: ttcn3: move shared run code to script
..

ttcn3: move shared run code to script

While I'm at it with tidying up the Dockerfiles, create a
ttcn3-docker-run.sh with shared run code.

Related: OS#5017
Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
---
M debian-stretch-titan/Dockerfile
A debian-stretch-titan/ttcn3-docker-run.sh
M ttcn3-bsc-test/Dockerfile
M ttcn3-bscnat-test/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-ggsn-test/Dockerfile
M ttcn3-hlr-test/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-msc-test/Dockerfile
M ttcn3-nitb-sysinfo/Dockerfile
M ttcn3-pcu-test/Dockerfile
M ttcn3-remsim-test/Dockerfile
M ttcn3-sccp-test/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sip-test/Dockerfile
M ttcn3-smlc-test/Dockerfile
M ttcn3-stp-test/Dockerfile
17 files changed, 39 insertions(+), 75 deletions(-)



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

diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index daa0f8c..512b4ac 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/debian-stretch-titan/Dockerfile
@@ -63,3 +63,4 @@
fi

 ADDttcn3-docker-prepare.sh /usr/local/bin/ttcn3-docker-prepare
+ADDttcn3-docker-run.sh /usr/local/bin/ttcn3-docker-run
diff --git a/debian-stretch-titan/ttcn3-docker-run.sh 
b/debian-stretch-titan/ttcn3-docker-run.sh
new file mode 100755
index 000..0cda8a5
--- /dev/null
+++ b/debian-stretch-titan/ttcn3-docker-run.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+if [ $# -lt 2 ]; then
+   echo
+   echo "usage: ttcn3-docker-run SUBDIR SUITE"
+   echo "arguments:"
+   echo "  SUBDIR: directory in osmo-ttcn3-hacks, e.g. 'msc'"
+   echo "  SUITE: name of the testsuite, e.g. 'MSC_Tests'"
+   echo
+   exit 1
+fi
+
+set -x
+SUBDIR=$1
+SUITE=$2
+
+cd /data
+
+/osmo-ttcn3-hacks/start-testsuite.sh "/osmo-ttcn3-hacks/$SUBDIR/$SUITE"
+exit_code=$?
+
+/osmo-ttcn3-hacks/log_merge.sh "$SUITE" --rm
+
+exit $exit_code
diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile
index c56f3a5..10b7267 100644
--- a/ttcn3-bsc-test/Dockerfile
+++ b/ttcn3-bsc-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   BSC_Tests.cfg /data/BSC_Tests.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc/BSC_Tests; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh BSC_Tests --rm; \
-   exit $exit_code
+CMDttcn3-docker-run bsc BSC_Tests
diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
index 405c0a6..d970482 100644
--- a/ttcn3-bscnat-test/Dockerfile
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh 
/osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh BSCNAT_Tests --rm; \
-   exit $exit_code
+CMDttcn3-docker-run bsc-nat BSCNAT_Tests
diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 4aa3825..7abf1a9 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   BTS_Tests.cfg /data/BTS_Tests.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bts/BTS_Tests; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh BTS_Tests --rm; \
-   exit $exit_code
+CMDttcn3-docker-run bts BTS_Tests
diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile
index 6c675b7..559857c 100644
--- a/ttcn3-ggsn-test/Dockerfile
+++ b/ttcn3-ggsn-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   GGSN_Tests.cfg /data/GGSN_Tests.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh 
/osmo-ttcn3-hacks/ggsn_tests/GGSN_Tests; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh GGSN_Tests --rm; \
-   exit $exit_code
+CMDttcn3-docker-run ggsn_tests GGSN_Tests
diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile
index b180567..36761a7 100644
--- a/ttcn3-hlr-test/Dockerfile
+++ b/ttcn3-hlr-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   HLR_Tests.cfg /data/HLR_Tests.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/hlr/HLR_Tests; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh HLR_Tests --rm; \
-   exit $exit_code
+CMDttcn3-docker-run hlr HLR_Tests
diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile
index b05fa21..bd74f79 100644
--- a/ttcn3-mgw-test/Dockerfile
+++ b/ttcn3-mgw-test/Dockerfile
@@ -9,8 +9,4 @@

 COPY   MGCP_Test.cfg /data/MGCP_Test.cfg

-CMDcd /data && \
-   /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/mgw/MGCP_Test; \
-   exit_code=$?; \
-   /osmo-ttcn3-hacks/log_merge.sh MGCP_Test --rm; \
-   exit $exit_code
+CMDttcn3-docker-run 

Change in docker-playground[master]: debian-stretch-titan: prepare: start/stop links

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22821 )


Change subject: debian-stretch-titan: prepare: start/stop links
..

debian-stretch-titan: prepare: start/stop links

Create symlinks to ttcn3-*-start.sh and ttcn3-*-stop.sh in the
prepare.sh script instead of in each of the ttcn3 Dockerfiles.

Related: OS#5017
Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
---
M debian-stretch-titan/ttcn3-docker-prepare.sh
M ttcn3-bsc-test/Dockerfile
M ttcn3-bscnat-test/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-fr-test/Dockerfile
M ttcn3-gbproxy-test/Dockerfile
M ttcn3-ggsn-test/Dockerfile
M ttcn3-hlr-test/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-msc-test/Dockerfile
M ttcn3-pcu-test/Dockerfile
M ttcn3-remsim-test/Dockerfile
M ttcn3-sccp-test/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sip-test/Dockerfile
M ttcn3-smlc-test/Dockerfile
M ttcn3-stp-test/Dockerfile
17 files changed, 5 insertions(+), 48 deletions(-)



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

diff --git a/debian-stretch-titan/ttcn3-docker-prepare.sh 
b/debian-stretch-titan/ttcn3-docker-prepare.sh
index 2b3cbd7..a5cbc91 100755
--- a/debian-stretch-titan/ttcn3-docker-prepare.sh
+++ b/debian-stretch-titan/ttcn3-docker-prepare.sh
@@ -32,4 +32,9 @@
make deps
 fi

+# Link start/stop scripts to /
+for i in ttcn3-*-start.sh ttcn3-*-stop.sh; do
+   ln -sv "/osmo-ttcn3-hacks/$i" "/$i"
+done
+
 make "$PROJECT"
diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile
index 80d3384..c56f3a5 100644
--- a/ttcn3-bsc-test/Dockerfile
+++ b/ttcn3-bsc-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   BSC_Tests.cfg /data/BSC_Tests.cfg

 CMDcd /data && \
diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
index 61f699d..405c0a6 100644
--- a/ttcn3-bscnat-test/Dockerfile
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg

 CMDcd /data && \
diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 685d99b..4aa3825 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   BTS_Tests.cfg /data/BTS_Tests.cfg

 CMDcd /data && \
diff --git a/ttcn3-fr-test/Dockerfile b/ttcn3-fr-test/Dockerfile
index dcee72d..1f0e6e1 100644
--- a/ttcn3-fr-test/Dockerfile
+++ b/ttcn3-fr-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-dumpcap-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-dumpcap-stop.sh /
-
 COPY   FR_Tests.cfg /data/FR_Tests.cfg
 COPY   FRNET_Tests.cfg /data/FRNET_Tests.cfg
 COPY   pipework /usr/bin/pipework
diff --git a/ttcn3-gbproxy-test/Dockerfile b/ttcn3-gbproxy-test/Dockerfile
index c0a8841..661ca07 100644
--- a/ttcn3-gbproxy-test/Dockerfile
+++ b/ttcn3-gbproxy-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-dumpcap-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-dumpcap-stop.sh /
-
 COPY   GBProxy_Tests.cfg /data/GBProxy_Tests.cfg
 COPY   pipework /usr/bin/pipework
 COPY   docker-entrypoint.sh /docker-entrypoint.sh
diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile
index 1ea2923..6c675b7 100644
--- a/ttcn3-ggsn-test/Dockerfile
+++ b/ttcn3-ggsn-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   GGSN_Tests.cfg /data/GGSN_Tests.cfg

 CMDcd /data && \
diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile
index 3d12234..b180567 100644
--- a/ttcn3-hlr-test/Dockerfile
+++ b/ttcn3-hlr-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   HLR_Tests.cfg /data/HLR_Tests.cfg

 CMDcd /data && \
diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile
index 860a06a..b05fa21 100644
--- a/ttcn3-mgw-test/Dockerfile
+++ b/ttcn3-mgw-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
-   ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
-
 COPY   MGCP_Test.cfg /data/MGCP_Test.cfg

 CMDcd /data && \
diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile
index 93b3e0a..06c07ca 100644
--- a/ttcn3-msc-test/Dockerfile
+++ b/ttcn3-msc-test/Dockerfile
@@ -7,9 +7,6 @@

 VOLUME /data

-RUNln -s 

Change in docker-playground[master]: ttcn3: remove /root/projects/git symlink

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22816 )


Change subject: ttcn3: remove /root/projects/git symlink
..

ttcn3: remove /root/projects/git symlink

Remove leftover from old TTCN-3 build scripts, before refactoring ttcn3
Dockerfiles. This line has already been removed in 357ec806 from 2017 for
ggsn-test.

In osmo-ttcn3-hacks.git, this is only referenced in the obsolete
bin/install.script (looks like we could remove that, together with the
rest of the bin dir?).

Related: OS#5017
Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
---
M ttcn3-bsc-test/Dockerfile
M ttcn3-bscnat-test/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-fr-test/Dockerfile
M ttcn3-gbproxy-test/Dockerfile
M ttcn3-hlr-test/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-msc-test/Dockerfile
M ttcn3-nitb-sysinfo/Dockerfile
M ttcn3-pcu-test/Dockerfile
M ttcn3-remsim-test/Dockerfile
M ttcn3-sccp-test/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sip-test/Dockerfile
M ttcn3-smlc-test/Dockerfile
M ttcn3-stp-test/Dockerfile
16 files changed, 0 insertions(+), 16 deletions(-)



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

diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile
index 9288469..8bdf87f 100644
--- a/ttcn3-bsc-test/Dockerfile
+++ b/ttcn3-bsc-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
index f927513..84928a7 100644
--- a/ttcn3-bscnat-test/Dockerfile
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 29185c8..30704cf 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-fr-test/Dockerfile b/ttcn3-fr-test/Dockerfile
index 2363f18..7b80504 100644
--- a/ttcn3-fr-test/Dockerfile
+++ b/ttcn3-fr-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-gbproxy-test/Dockerfile b/ttcn3-gbproxy-test/Dockerfile
index 9a92c4a..4e0c66f 100644
--- a/ttcn3-gbproxy-test/Dockerfile
+++ b/ttcn3-gbproxy-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile
index 0233035..78ff0ce 100644
--- a/ttcn3-hlr-test/Dockerfile
+++ b/ttcn3-hlr-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile
index 33183d0..9afef2e 100644
--- a/ttcn3-mgw-test/Dockerfile
+++ b/ttcn3-mgw-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile
index ee7e5f0..db73c8e 100644
--- a/ttcn3-msc-test/Dockerfile
+++ b/ttcn3-msc-test/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile
index 76fd630..44424b3 100644
--- a/ttcn3-nitb-sysinfo/Dockerfile
+++ b/ttcn3-nitb-sysinfo/Dockerfile
@@ -1,7 +1,6 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan

-RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

 RUNcd osmo-ttcn3-hacks && \
diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile
index b78fee2..2f3deff 100644
--- a/ttcn3-pcu-test/Dockerfile
+++ b/ttcn3-pcu-test/Dockerfile
@@ -1,7 +1,6 @@
 ARG

Change in docker-playground[master]: debian-stretch-titan: prepare: run 'make deps'

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22820 )


Change subject: debian-stretch-titan: prepare: run 'make deps'
..

debian-stretch-titan: prepare: run 'make deps'

Run 'make deps' in ttcn3-docker-prepare.sh, if needed.

Related: OS#5017
Change-Id: I9085203b27d310b63a035fd71f7c2a78d02710d4
---
M debian-stretch-titan/ttcn3-docker-prepare.sh
1 file changed, 7 insertions(+), 0 deletions(-)



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

diff --git a/debian-stretch-titan/ttcn3-docker-prepare.sh 
b/debian-stretch-titan/ttcn3-docker-prepare.sh
index d7363f5..2b3cbd7 100755
--- a/debian-stretch-titan/ttcn3-docker-prepare.sh
+++ b/debian-stretch-titan/ttcn3-docker-prepare.sh
@@ -25,4 +25,11 @@
 git rev-parse --abbrev-ref HEAD
 git rev-parse HEAD

+# Update deps if Makefile changed since last 'make deps' (e.g. because
+# OSMO_TTCN3_BRANCH is different). The Dockerfile does the initial 'make deps'
+# and downloads /tmp/deps-Makefile.
+if ! diff -q /tmp/deps-Makefile deps/Makefile; then
+   make deps
+fi
+
 make "$PROJECT"

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I9085203b27d310b63a035fd71f7c2a78d02710d4
Gerrit-Change-Number: 22820
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in docker-playground[master]: ttcn3: move prepare code to shared script

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22819 )


Change subject: ttcn3: move prepare code to shared script
..

ttcn3: move prepare code to shared script

Move the git fetch/checkout code and make call to build the testsuite,
to debian-stretch-titan/ttcn3-docker-prepare.sh. In the next patch, I
will extend the script to update deps right before building too (e.g.
because OSMO_TTCN3_BRANCH changed).

Related: OS#5017
Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
---
M debian-stretch-titan/Dockerfile
A debian-stretch-titan/ttcn3-docker-prepare.sh
M ttcn3-bsc-test/Dockerfile
M ttcn3-bscnat-test/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-fr-test/Dockerfile
M ttcn3-gbproxy-test/Dockerfile
M ttcn3-ggsn-test/Dockerfile
M ttcn3-hlr-test/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-msc-test/Dockerfile
M ttcn3-nitb-sysinfo/Dockerfile
M ttcn3-pcu-test/Dockerfile
M ttcn3-remsim-test/Dockerfile
M ttcn3-sccp-test/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sip-test/Dockerfile
M ttcn3-smlc-test/Dockerfile
M ttcn3-stp-test/Dockerfile
19 files changed, 47 insertions(+), 102 deletions(-)



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

diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index 39ff76f..daa0f8c 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/debian-stretch-titan/Dockerfile
@@ -61,3 +61,5 @@
git pull && \
make deps; \
fi
+
+ADDttcn3-docker-prepare.sh /usr/local/bin/ttcn3-docker-prepare
diff --git a/debian-stretch-titan/ttcn3-docker-prepare.sh 
b/debian-stretch-titan/ttcn3-docker-prepare.sh
new file mode 100755
index 000..d7363f5
--- /dev/null
+++ b/debian-stretch-titan/ttcn3-docker-prepare.sh
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+if [ $# -lt 2 ]; then
+   echo
+   echo "usage: ttcn3-docker-prepare OSMO_TTCN3_BRANCH PROJECT [PROJECT 
...]"
+   echo "arguments:"
+   echo "  OSMO_TTCN3_BRANCH: as passed from docker"
+   echo "  PROJECT: make target from osmo-ttcn3-hacks.git, e.g. 'msc'"
+   echo
+   exit 1
+fi
+
+set -x
+OSMO_TTCN3_BRANCH=$1
+PROJECT=$2
+
+cd /osmo-ttcn3-hacks
+
+git fetch
+git checkout "$OSMO_TTCN3_BRANCH"
+
+if git symbolic-ref -q HEAD; then
+   git reset --hard origin/"$OSMO_TTCN3_BRANCH"
+fi
+
+git rev-parse --abbrev-ref HEAD
+git rev-parse HEAD
+
+make "$PROJECT"
diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile
index c26247d..80d3384 100644
--- a/ttcn3-bsc-test/Dockerfile
+++ b/ttcn3-bsc-test/Dockerfile
@@ -3,12 +3,7 @@
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
-RUNcd osmo-ttcn3-hacks && \
-   git fetch && \
-   git checkout $OSMO_TTCN3_BRANCH && \
-   (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH 
|| exit 1); \
-   git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
-   make bsc
+RUNttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bsc

 VOLUME /data

diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
index dcf66d2..61f699d 100644
--- a/ttcn3-bscnat-test/Dockerfile
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -3,12 +3,7 @@
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
-RUNcd osmo-ttcn3-hacks && \
-   git fetch && \
-   git checkout $OSMO_TTCN3_BRANCH && \
-   (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH 
|| exit 1); \
-   git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
-   make bsc-nat
+RUNttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bsc-nat

 VOLUME /data

diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 48909aa..685d99b 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -3,12 +3,7 @@
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
-RUNcd osmo-ttcn3-hacks && \
-   git fetch && \
-   git checkout $OSMO_TTCN3_BRANCH && \
-   (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH 
|| exit 1); \
-   git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
-   make deps-update bts
+RUNttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bts

 VOLUME /data

diff --git a/ttcn3-fr-test/Dockerfile b/ttcn3-fr-test/Dockerfile
index 3941895..dcee72d 100644
--- a/ttcn3-fr-test/Dockerfile
+++ b/ttcn3-fr-test/Dockerfile
@@ -3,12 +3,7 @@
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
-RUNcd osmo-ttcn3-hacks && \
-   git fetch && \
-   git checkout $OSMO_TTCN3_BRANCH && \
-   (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH 
|| exit 1); \
-   git 

Change in docker-playground[master]: ttcn3: move initial clone to debian-stretch-titan

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22817 )


Change subject: ttcn3: move initial clone to debian-stretch-titan
..

ttcn3: move initial clone to debian-stretch-titan

Clone the osmo-ttcn3-hacks and all dependency repositories less often by
moving related commands to the shared debian-stretch-titan image.

Remove the 'git checkout -f -B master origin/master' line, because the
master branch is checked out by default.

While at it, move the shared "git config" commands too, and move them
before cloning the repositories, so they don't run again whenever the
deps change (logic to invalidate the cache if deps change will be added
in the next patch).

Related: OS#5017
Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
---
M debian-stretch-titan/Dockerfile
M ttcn3-bsc-test/Dockerfile
M ttcn3-bscnat-test/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-fr-test/Dockerfile
M ttcn3-gbproxy-test/Dockerfile
M ttcn3-ggsn-test/Dockerfile
M ttcn3-hlr-test/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-msc-test/Dockerfile
M ttcn3-nitb-sysinfo/Dockerfile
M ttcn3-pcu-test/Dockerfile
M ttcn3-remsim-test/Dockerfile
M ttcn3-sccp-test/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sip-test/Dockerfile
M ttcn3-smlc-test/Dockerfile
M ttcn3-stp-test/Dockerfile
18 files changed, 7 insertions(+), 161 deletions(-)



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

diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index 74bc420..0f4f17e 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/debian-stretch-titan/Dockerfile
@@ -48,3 +48,10 @@
dpkg -i ./libfftranscode0_0.3_${DPKG_ARCH}.deb 
./libfftranscode-dev_0.3_${DPKG_ARCH}.deb && \
apt install --fix-broken && \
rm libfftranscode*.deb
+
+RUNgit config --global user.email doc...@dock.er && \
+   git config --global user.name "Dock Er"
+
+# clone osmo-ttcn3-hacks and deps
+RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git && \
+   make -C /osmo-ttcn3-hacks deps
diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile
index 8bdf87f..c26247d 100644
--- a/ttcn3-bsc-test/Dockerfile
+++ b/ttcn3-bsc-test/Dockerfile
@@ -1,15 +1,5 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan
-
-RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git
-
-RUNcd osmo-ttcn3-hacks && \
-   git checkout -f -B master origin/master && \
-   make deps
-
-RUNgit config --global user.email doc...@dock.er && \
-   git config --global user.name "Dock Er"
-
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
index 84928a7..dcf66d2 100644
--- a/ttcn3-bscnat-test/Dockerfile
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -1,15 +1,5 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan
-
-RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git
-
-RUNcd osmo-ttcn3-hacks && \
-   git checkout -f -B master origin/master && \
-   make deps
-
-RUNgit config --global user.email doc...@dock.er && \
-   git config --global user.name "Dock Er"
-
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 30704cf..48909aa 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -1,15 +1,5 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan
-
-RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git
-
-RUNcd osmo-ttcn3-hacks && \
-   git checkout -f -B master origin/master && \
-   make deps
-
-RUNgit config --global user.email doc...@dock.er && \
-   git config --global user.name "Dock Er"
-
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
diff --git a/ttcn3-fr-test/Dockerfile b/ttcn3-fr-test/Dockerfile
index 7b80504..3941895 100644
--- a/ttcn3-fr-test/Dockerfile
+++ b/ttcn3-fr-test/Dockerfile
@@ -1,15 +1,5 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan
-
-RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git
-
-RUNcd osmo-ttcn3-hacks && \
-   git checkout -f -B master origin/master && \
-   make deps
-
-RUNgit config --global user.email doc...@dock.er && \
-   git config --global user.name "Dock Er"
-
 ARGOSMO_TTCN3_BRANCH="master"

 ADDhttp://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH 
/tmp/commit
diff --git a/ttcn3-gbproxy-test/Dockerfile b/ttcn3-gbproxy-test/Dockerfile
index 4e0c66f..2acd103 100644
--- a/ttcn3-gbproxy-test/Dockerfile
+++ b/ttcn3-gbproxy-test/Dockerfile
@@ -1,15 +1,5 @@
 ARGUSER
 FROM   $USER/debian-stretch-titan
-
-RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git
-
-RUNcd 

Change in docker-playground[master]: debian-stretch-titan: update deps on change

2021-02-10 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22818 )


Change subject: debian-stretch-titan: update deps on change
..

debian-stretch-titan: update deps on change

After the initial clone of osmo-ttcn3-hacks and deps, let docker
download deps/Makefile to invalidate the cache if the file changed.

Run "git pull" and "make deps" afterwards, but only if the Makefile is
different. The "if" saves time in the initial build of the image, it
avoids the "git fetch" on every dependency repository during "make deps".

Related: OS#5017
Change-Id: I56673312cfb23375d67900016aaac1931f677275
---
M debian-stretch-titan/Dockerfile
1 file changed, 7 insertions(+), 1 deletion(-)



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

diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index 0f4f17e..39ff76f 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/debian-stretch-titan/Dockerfile
@@ -52,6 +52,12 @@
 RUNgit config --global user.email doc...@dock.er && \
git config --global user.name "Dock Er"

-# clone osmo-ttcn3-hacks and deps
+# clone osmo-ttcn3-hacks and deps, invalidate cache if deps change (OS#5017)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git && \
make -C /osmo-ttcn3-hacks deps
+ADDhttps://git.osmocom.org/osmo-ttcn3-hacks/plain/deps/Makefile 
/tmp/deps-Makefile
+RUNif ! diff -q /tmp/deps-Makefile /osmo-ttcn3-hacks/deps/Makefile; then \
+   cd /osmo-ttcn3-hacks && \
+   git pull && \
+   make deps; \
+   fi

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I56673312cfb23375d67900016aaac1931f677275
Gerrit-Change-Number: 22818
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in osmo-gbproxy[master]: gb_proxy: add support for relaying BSSGP RIM messages

2021-02-10 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804 )

Change subject: gb_proxy: add support for relaying BSSGP RIM messages
..


Patch Set 3: Code-Review+1

(7 comments)

https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c
File src/gb_proxy.c:

https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@939
PS1, Line 939: shoud
> should
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@942
PS1, Line 942:  LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying 
RIM-PDU: src=%s, dest=%s\n", log_pfx, pdut_name,
> Could you vary the log lines so they indicate which path is taken? […]
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@946
PS1, Line 946:  LOGP(DGPRS, LOGL_NOTICE,
> I don't think we need this log at all and if we do it should be DEBUG. […]
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@961
PS1, Line 961:  LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying RIM-PDU: src=%s, 
dest=%s\n", log_pfx, pdut_name,
> "relaying RIM-PDU to SGSN(%05u/%s) "... […]
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@1236
PS1, Line 1236: target GERAN
> "target non-GERAN cells"
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@1243
PS1, Line 1243: /* TODO: Reply with STATUS if BSSGP didn't negotiate 
RIM feature, see also comments in
> When this is implemented it should be done as first step. […]
Done


https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804/1/src/gb_proxy.c@1256
PS1, Line 1256: LOGP(DLBSSGP, LOGL_DEBUG, "%s %s relaying RIM-PDU: 
src=%s, dest=%s\n", log_pfx, pdut_name,
> "relaying RIM-PDU from SGSN(%05u/%s) " ...
Done



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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Gerrit-Change-Number: 22804
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:04:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: xua: Implement SNM availability/unavailability messaging

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22777 )

Change subject: xua: Implement SNM availability/unavailability messaging
..

xua: Implement SNM availability/unavailability messaging

M3UA and SUA have one sub-protocol called [S]SNM, through which the
SG informs the ASP about certain destinations (point codes) becoming
available (DAVA) or unavailable (DUNA) in the SS7 network.

This patch adds support for
* generating DAVA/DUAN on a SGP when the AS FSM changes to/from AS-ACTIVE
* receiving DAVA/DUNA on an ASP and informing other "SG role" AS/ASP
* processing DAUD from ASP received by SG, generating relate DAVA/DUNA
  responses

Related: OS#2623
Change-Id: Id92be4691b0fd77598a6edb642c028bbd8c5b623
---
M src/Makefile.am
M src/m3ua.c
M src/sua.c
M src/xua_as_fsm.c
M src/xua_internal.h
A src/xua_snm.c
6 files changed, 554 insertions(+), 6 deletions(-)

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



diff --git a/src/Makefile.am b/src/Makefile.am
index 91084de..41d2a8d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,7 @@
 sccp2sua.c sccp_scrc.c sccp_sclc.c sccp_scoc.c \
 sccp_user.c sccp_types.c xua_rkm.c xua_shared.c 
xua_default_lm_fsm.c \
 osmo_ss7.c osmo_ss7_hmrt.c xua_asp_fsm.c 
xua_as_fsm.c \
-osmo_ss7_vty.c sccp_vty.c ipa.c
+xua_snm.c osmo_ss7_vty.c sccp_vty.c ipa.c
 libosmo_sigtran_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined 
-export-symbols-regex '^osmo_'
 libosmo_sigtran_la_LIBADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) 
$(LIBOSMOVTY_LIBS) \
$(LIBOSMONETIF_LIBS) $(LIBSCTP_LIBS)
diff --git a/src/m3ua.c b/src/m3ua.c
index bfb0c23..6639c28 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -677,6 +677,8 @@
return 0;
 }

+static int m3ua_rx_snm(struct osmo_ss7_asp *asp, struct xua_msg *xua);
+
 /*! \brief process M3UA message received from socket
  *  \param[in] asp Application Server Process receiving \ref msg
  *  \param[in] msg received message buffer
@@ -737,10 +739,7 @@
rc = m3ua_rx_rkm(asp, xua);
break;
case M3UA_MSGC_SNM:
-   /* FIXME */
-   LOGPASP(asp, DLM3UA, LOGL_NOTICE, "Received unsupported M3UA "
-   "Message Class %u\n", xua->hdr.msg_class);
-   err = m3ua_gen_error_msg(M3UA_ERR_UNSUPP_MSG_CLASS, msg);
+   rc = m3ua_rx_snm(asp, xua);
break;
default:
LOGPASP(asp, DLM3UA, LOGL_NOTICE, "Received unknown M3UA "
@@ -760,3 +759,146 @@

return rc;
 }
+
+/***
+ * SSNM msg generation
+ ***/
+
+/* 3.4.1 Destination Unavailable (DUNA) */
+static struct xua_msg *m3ua_encode_duna(const uint32_t *rctx, unsigned int 
num_rctx,
+   const uint32_t *aff_pc, unsigned int 
num_aff_pc,
+   const char *info_string)
+{
+   struct xua_msg *xua = xua_msg_alloc();
+
+   xua->hdr = XUA_HDR(M3UA_MSGC_SNM, M3UA_SNM_DUNA);
+   xua->hdr.version = M3UA_VERSION;
+   if (rctx)
+   xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, num_rctx * 
sizeof(*rctx), (const uint8_t *)rctx);
+
+   xua_msg_add_data(xua, M3UA_IEI_AFFECTED_PC, num_aff_pc * 
sizeof(*aff_pc), (const uint8_t *) aff_pc);
+
+   if (info_string) {
+   xua_msg_add_data(xua, M3UA_IEI_INFO_STRING,
+strlen(info_string)+1,
+(const uint8_t *) info_string);
+   }
+   return xua;
+}
+
+/* 3.4.2 Destination Available (DAVA) */
+static struct xua_msg *m3ua_encode_dava(const uint32_t *rctx, unsigned int 
num_rctx,
+   const uint32_t *aff_pc, unsigned int 
num_aff_pc,
+   const char *info_string)
+{
+   /* encoding is exactly identical to DUNA */
+   struct xua_msg *xua = m3ua_encode_duna(rctx, num_rctx, aff_pc, 
num_aff_pc, info_string);
+   if (xua)
+   xua->hdr.msg_type = M3UA_SNM_DAVA;
+   return xua;
+}
+
+#if 0 /* not used so far */
+/* 3.4.3 Destination Available (DAUD) */
+static struct xua_msg *m3ua_encode_daud(const uint32_t *rctx, unsigned int 
num_rctx,
+   const uint32_t *aff_pc, unsigned int 
num_aff_pc,
+   const char *info_string)
+{
+   /* encoding is exactly identical to DUNA */
+   struct xua_msg *xua = m3ua_encode_duna(rctx, num_rctx, aff_pc, 
num_aff_pc, info_string);
+   if (xua)
+   xua->hdr.msg_type 

Change in libosmo-sccp[master]: xua: Implement SNM availability/unavailability messaging

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/22777 )

Change subject: xua: Implement SNM availability/unavailability messaging
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Id92be4691b0fd77598a6edb642c028bbd8c5b623
Gerrit-Change-Number: 22777
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 16:02:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: redmine: Make changeset keywords work with OS# annotation

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22815 )

Change subject: redmine: Make changeset keywords work with OS# annotation
..


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

this has already been deployed and seems to be working.


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04a97434433a022f47a759a8219458e8772ae71e
Gerrit-Change-Number: 22815
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 15:58:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: redmine: Make changeset keywords work with OS# annotation

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22815 )

Change subject: redmine: Make changeset keywords work with OS# annotation
..

redmine: Make changeset keywords work with OS# annotation

In Osmocom we annotate osmocom issues as OS#1234 and not just as #1234,
in order to distinguish them from redmine or coverity issues.

Change-Id: I04a97434433a022f47a759a8219458e8772ae71e
Related: OS#5005, OS#3291
---
M redmine/Dockerfile
A redmine/commitlog-references-oshash.diff
2 files changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/redmine/Dockerfile b/redmine/Dockerfile
index 2dfb100..add01b3 100644
--- a/redmine/Dockerfile
+++ b/redmine/Dockerfile
@@ -11,3 +11,6 @@
 # no longer needed after ruby-openid-2.9.2 is used
 #ADD   hmac.diff /tmp/hmac.diff
 #RUN   cd / && patch -p0 < /tmp/hmac.diff
+
+ADDcommitlog-references-oshash.diff /tmp/commitlog-references-oshash.diff
+RUNcd /usr/src/redmine && patch -p1 < /tmp/commitlog-references-oshash.diff
diff --git a/redmine/commitlog-references-oshash.diff 
b/redmine/commitlog-references-oshash.diff
new file mode 100644
index 000..389ebe5
--- /dev/null
+++ b/redmine/commitlog-references-oshash.diff
@@ -0,0 +1,18 @@
+diff --git a/app/models/changeset.rb b/app/models/changeset.rb
+index 4256f0589..b5ef7b298 100644
+--- a/app/models/changeset.rb
 b/app/models/changeset.rb
+@@ -126,11 +126,11 @@ class Changeset < ActiveRecord::Base
+
+ referenced_issues = []
+
+-
comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i)
 do |match|
++
comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(OS#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i)
 do |match|
+   action, refs = match[2].to_s.downcase, match[3]
+   next unless action.present? || ref_keywords_any
+
+-  refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
++  refs.scan(/OS#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
+ issue, hours = find_referenced_issue_by_id(m[0].to_i), m[2]
+ if issue && !issue_linked_to_same_commit?(issue)
+   referenced_issues << issue

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04a97434433a022f47a759a8219458e8772ae71e
Gerrit-Change-Number: 22815
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in docker-playground[master]: redmine: Make changeset keywords work with OS# annotation

2021-02-10 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/22815 )


Change subject: redmine: Make changeset keywords work with OS# annotation
..

redmine: Make changeset keywords work with OS# annotation

In Osmocom we annotate osmocom issues as OS#1234 and not just as #1234,
in order to distinguish them from redmine or coverity issues.

Change-Id: I04a97434433a022f47a759a8219458e8772ae71e
Related: OS#5005, OS#3291
---
M redmine/Dockerfile
A redmine/commitlog-references-oshash.diff
2 files changed, 21 insertions(+), 0 deletions(-)



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

diff --git a/redmine/Dockerfile b/redmine/Dockerfile
index 2dfb100..add01b3 100644
--- a/redmine/Dockerfile
+++ b/redmine/Dockerfile
@@ -11,3 +11,6 @@
 # no longer needed after ruby-openid-2.9.2 is used
 #ADD   hmac.diff /tmp/hmac.diff
 #RUN   cd / && patch -p0 < /tmp/hmac.diff
+
+ADDcommitlog-references-oshash.diff /tmp/commitlog-references-oshash.diff
+RUNcd /usr/src/redmine && patch -p1 < /tmp/commitlog-references-oshash.diff
diff --git a/redmine/commitlog-references-oshash.diff 
b/redmine/commitlog-references-oshash.diff
new file mode 100644
index 000..389ebe5
--- /dev/null
+++ b/redmine/commitlog-references-oshash.diff
@@ -0,0 +1,18 @@
+diff --git a/app/models/changeset.rb b/app/models/changeset.rb
+index 4256f0589..b5ef7b298 100644
+--- a/app/models/changeset.rb
 b/app/models/changeset.rb
+@@ -126,11 +126,11 @@ class Changeset < ActiveRecord::Base
+
+ referenced_issues = []
+
+-
comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i)
 do |match|
++
comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(OS#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i)
 do |match|
+   action, refs = match[2].to_s.downcase, match[3]
+   next unless action.present? || ref_keywords_any
+
+-  refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
++  refs.scan(/OS#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
+ issue, hours = find_referenced_issue_by_id(m[0].to_i), m[2]
+ if issue && !issue_linked_to_same_commit?(issue)
+   referenced_issues << issue

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04a97434433a022f47a759a8219458e8772ae71e
Gerrit-Change-Number: 22815
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-gbproxy[master]: gb_proxy: add support for relaying BSSGP RIM messages

2021-02-10 Thread dexter
Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-gbproxy/+/22804

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

Change subject: gb_proxy: add support for relaying BSSGP RIM messages
..

gb_proxy: add support for relaying BSSGP RIM messages

BSSGP RIM messages are routed from a source to a destination cell by a
RIM routing information IE. Add parsing for the routing information and
support for relaying RIM messages to the destination cell/PCU. If the
destination cell/PCU is not directly connected to osmo-gbproxy route the
rim message to the first connected SGSN.

Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Related: SYS#5103
---
M src/gb_proxy.c
1 file changed, 128 insertions(+), 5 deletions(-)


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

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Idd1ea46832e044f0ade15af32250f90517d848d8
Gerrit-Change-Number: 22804
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: daniel 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: Move bts_ident_key to bts.c

2021-02-10 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22813 )


Change subject: Move bts_ident_key to bts.c
..

Move bts_ident_key to bts.c

The function is not really handover specific, and will be used in other
places in subsequent patches.

Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
---
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/handover.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/handover_logic.c
M tests/handover/Makefile.am
M tests/handover/neighbor_ident_test.c
6 files changed, 154 insertions(+), 13 deletions(-)



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

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 9a226f5..e1dd403 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -658,3 +658,5 @@

 enum gsm_bts_type_variant str2btsvariant(const char *arg);
 const char *btsvariant2str(enum gsm_bts_type_variant v);
+
+struct neighbor_ident_key *bts_ident_key(const struct gsm_bts *bts);
diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h
index d22ac86..a71bb98 100644
--- a/include/osmocom/bsc/handover.h
+++ b/include/osmocom/bsc/handover.h
@@ -86,8 +86,6 @@
  struct gsm_subscriber_connection *conn, const 
struct neighbor_ident_key *search_for,
  bool log_errors);

-struct neighbor_ident_key *bts_ident_key(const struct gsm_bts *bts);
-
 void handover_parse_inter_bsc_mt(struct gsm_subscriber_connection *conn,
 struct msgb *ho_request_msg);

diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 628d301..76da136 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -758,6 +758,17 @@
return 0;
 }

+struct neighbor_ident_key *bts_ident_key(const struct gsm_bts *bts)
+{
+   static struct neighbor_ident_key key;
+   key = (struct neighbor_ident_key){
+   .from_bts = NEIGHBOR_IDENT_KEY_ANY_BTS,
+   .arfcn = bts->c0->arfcn,
+   .bsic = bts->bsic,
+   };
+   return 
+}
+
 const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_CHREQ_TOTAL] = \
{ "chreq:total",
diff --git a/src/osmo-bsc/handover_logic.c b/src/osmo-bsc/handover_logic.c
index ade330d..b0d175a 100644
--- a/src/osmo-bsc/handover_logic.c
+++ b/src/osmo-bsc/handover_logic.c
@@ -322,17 +322,6 @@
return -ENODEV;
 }

-struct neighbor_ident_key *bts_ident_key(const struct gsm_bts *bts)
-{
-   static struct neighbor_ident_key key;
-   key = (struct neighbor_ident_key){
-   .from_bts = NEIGHBOR_IDENT_KEY_ANY_BTS,
-   .arfcn = bts->c0->arfcn,
-   .bsic = bts->bsic,
-   };
-   return 
-}
-
 static int ho_logic_sig_cb(unsigned int subsys, unsigned int signal,
   void *handler_data, void *signal_data)
 {
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 3951624..7ee4d10 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -123,10 +123,79 @@
$(NULL)

 neighbor_ident_test_LDADD = \
+   $(top_builddir)/src/osmo-bsc/a_reset.o \
+   $(top_builddir)/src/osmo-bsc/abis_nm.o \
+   $(top_builddir)/src/osmo-bsc/abis_nm_vty.o \
+   $(top_builddir)/src/osmo-bsc/abis_om2000.o \
+   $(top_builddir)/src/osmo-bsc/abis_om2000_vty.o \
+   $(top_builddir)/src/osmo-bsc/abis_rsl.o \
+   $(top_builddir)/src/osmo-bsc/acc.o \
+   $(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
+   $(top_builddir)/src/osmo-bsc/assignment_fsm.o \
+   $(top_builddir)/src/osmo-bsc/bsc_ctrl_commands.o \
+   $(top_builddir)/src/osmo-bsc/bsc_init.o \
+   $(top_builddir)/src/osmo-bsc/bsc_rf_ctrl.o \
+   $(top_builddir)/src/osmo-bsc/bsc_rll.o \
+   $(top_builddir)/src/osmo-bsc/bsc_subscr_conn_fsm.o \
+   $(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
+   $(top_builddir)/src/osmo-bsc/bsc_vty.o \
+   $(top_builddir)/src/osmo-bsc/bts.o \
+   $(top_builddir)/src/osmo-bsc/bts_sm.o \
+   $(top_builddir)/src/osmo-bsc/bts_trx.o \
+   $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
+   $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
+   $(top_builddir)/src/osmo-bsc/bts_unknown.o \
+   $(top_builddir)/src/osmo-bsc/chan_alloc.o \
+   $(top_builddir)/src/osmo-bsc/codec_pref.o \
+   $(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
+   $(top_builddir)/src/osmo-bsc/gsm_data.o \
+   $(top_builddir)/src/osmo-bsc/handover_cfg.o \
+   $(top_builddir)/src/osmo-bsc/handover_decision.o \
+   $(top_builddir)/src/osmo-bsc/handover_decision_2.o \
+   $(top_builddir)/src/osmo-bsc/handover_fsm.o \
+   $(top_builddir)/src/osmo-bsc/handover_logic.o \
+   $(top_builddir)/src/osmo-bsc/handover_vty.o \
+   $(top_builddir)/src/osmo-bsc/lchan_fsm.o \
+   

Change in osmo-bsc[master]: Fix neigh resolution service on local neighbours

2021-02-10 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22814 )


Change subject: Fix neigh resolution service on local neighbours
..

Fix neigh resolution service on local neighbours

Change-Id: I217e3550aa6d7f3c3cab4e545641d790ae12b23f
Related: SYS#4909
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/neighbor_ident.c
M tests/ctrl/osmo-bsc-neigh-test.cfg
M tests/ctrl_test_runner.py
5 files changed, 110 insertions(+), 6 deletions(-)



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

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index e1dd403..7d71991 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -660,3 +660,4 @@
 const char *btsvariant2str(enum gsm_bts_type_variant v);

 struct neighbor_ident_key *bts_ident_key(const struct gsm_bts *bts);
+int gsm_bts_get_cgi_ps(const struct gsm_bts *bts, struct 
osmo_cell_global_id_ps *cgi_ps);
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 76da136..af22561 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -769,6 +769,19 @@
return 
 }

+int gsm_bts_get_cgi_ps(const struct gsm_bts *bts, struct 
osmo_cell_global_id_ps *cgi_ps)
+{
+   if (bts->gprs.mode == BTS_GPRS_NONE)
+   return -ENOTSUP;
+
+   cgi_ps->rai.lac.plmn = bts->network->plmn;
+   cgi_ps->rai.lac.lac = bts->location_area_code;
+   cgi_ps->rai.rac = bts->gprs.rac;
+   cgi_ps->cell_identity = bts->cell_identity;
+
+   return 0;
+}
+
 const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_CHREQ_TOTAL] = \
{ "chreq:total",
diff --git a/src/osmo-bsc/neighbor_ident.c b/src/osmo-bsc/neighbor_ident.c
index 185cd0b..6f96033 100644
--- a/src/osmo-bsc/neighbor_ident.c
+++ b/src/osmo-bsc/neighbor_ident.c
@@ -273,7 +273,9 @@
char *tmp = NULL, *tok, *saveptr;
struct neighbor_ident_key ni;
unsigned lac, cell_id;
-   const struct osmo_cell_global_id_ps *cgi_ps;
+   struct osmo_cell_global_id_ps local_cgi_ps;
+   const struct osmo_cell_global_id_ps *cgi_ps = NULL;
+   struct gsm_bts_ref *neigh;

if (!cmd->variable)
goto fmt_err;
@@ -324,10 +326,26 @@
if (!neighbor_ident_key_valid())
goto fmt_err;

-   tgt_cell_li = neighbor_ident_get(net->neighbor_bss_cells, );
-   if (!tgt_cell_li || tgt_cell_li->id_discr != CELL_IDENT_WHOLE_GLOBAL_PS 
|| tgt_cell_li->id_list_len < 1)
-   goto notfound_err;
-   cgi_ps = _cell_li->id_list[0].global_ps;
+   /* Is there a local BTS that matches the key? */
+   llist_for_each_entry(neigh, _found->local_neighbors, entry) {
+   struct gsm_bts *neigh_bts = neigh->bts;
+   struct neighbor_ident_key *neigh_bts_key = 
bts_ident_key(neigh_bts);
+   neigh_bts_key->from_bts = ni.from_bts;
+   if (!neighbor_ident_key_match(neigh_bts_key, , true))
+   continue;
+   if (gsm_bts_get_cgi_ps(neigh->bts, _cgi_ps) < 0)
+   continue; /* Not supporting GPRS */
+   cgi_ps = _cgi_ps;
+   break;
+   }
+
+   /* No local neighbor found, looking for remote neighbors */
+   if (!cgi_ps) {
+   tgt_cell_li = neighbor_ident_get(net->neighbor_bss_cells, );
+   if (!tgt_cell_li || tgt_cell_li->id_discr != 
CELL_IDENT_WHOLE_GLOBAL_PS || tgt_cell_li->id_list_len < 1)
+   goto notfound_err;
+   cgi_ps = _cell_li->id_list[0].global_ps;
+   }

ctrl_cmd_reply_printf(cmd, "%s", osmo_cgi_ps_name(cgi_ps));
talloc_free(tmp);
diff --git a/tests/ctrl/osmo-bsc-neigh-test.cfg 
b/tests/ctrl/osmo-bsc-neigh-test.cfg
index f1e71b6..2fbc8f8 100644
--- a/tests/ctrl/osmo-bsc-neigh-test.cfg
+++ b/tests/ctrl/osmo-bsc-neigh-test.cfg
@@ -46,6 +46,8 @@
   oml ipa stream-id 255 line 0
   codec-support fr
   gprs mode gprs
+  gprs routing area 5
+  ! remote neigh:
   neighbor cgi-ps 23 42 423 2 5 arfcn 23 bsic 32
   trx 0
rf_locked 0
@@ -78,6 +80,63 @@
timeslot 7
 phys_chan_config TCH/F
 hopping enabled 0
+ bts 1
+  type sysmobts
+  band DCS1800
+  cell_identity 123
+  location_area_code 1
+  base_station_id_code 55
+  ms max power 15
+  cell reselection hysteresis 4
+  rxlev access min 0
+  radio-link-timeout 32
+  channel allocator ascending
+  rach tx integer 9
+  rach max transmission 7
+  channel-description attach 1
+  channel-description bs-pa-mfrms 5
+  channel-description bs-ag-blks-res 1
+  early-classmark-sending forbidden
+  ipa unit-id 55 0
+  oml ipa stream-id 255 line 0
+  codec-support fr
+  gprs mode gprs
+  gprs routing area 6
+  neighbor bts 0
+  trx 0
+   rf_locked 0
+   arfcn 880
+   nominal power 23
+   ! to use full TRX power, set max_power_red 0
+   max_power_red 20
+   rsl e1 tei 0
+   timeslot 0
+

Change in osmo-iuh[master]: ranap_msg_factory: Allow detailed control over UEA/UIA algorithm encoded

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/22756 )

Change subject: ranap_msg_factory: Allow detailed control over UEA/UIA 
algorithm encoded
..

ranap_msg_factory: Allow detailed control over UEA/UIA algorithm encoded

Change-Id: I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
Closes: OS#4143
---
M include/osmocom/ranap/ranap_msg_factory.h
M src/ranap_msg_factory.c
2 files changed, 51 insertions(+), 16 deletions(-)

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



diff --git a/include/osmocom/ranap/ranap_msg_factory.h 
b/include/osmocom/ranap/ranap_msg_factory.h
index f1f3fcc..d89a1ae 100644
--- a/include/osmocom/ranap/ranap_msg_factory.h
+++ b/include/osmocom/ranap/ranap_msg_factory.h
@@ -13,6 +13,9 @@
 struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int 
nas_len);

 /*! \brief generate RANAP SECURITY MODE COMMAND message */
+struct msgb *ranap_new_msg_sec_mod_cmd2(const uint8_t *ik, const uint8_t *ck, 
enum RANAP_KeyStatus status,
+   uint8_t uia_bitmask, uint8_t 
uea_bitmask);
+
 struct msgb *ranap_new_msg_sec_mod_cmd(const uint8_t *ik, const uint8_t *ck, 
enum RANAP_KeyStatus status);

 /*! \brief generate RANAP SECURITY MODE COMPLETE message */
diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 2ae2dbf..121514c 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -202,18 +202,15 @@
return msg;
 }

-static const enum RANAP_IntegrityProtectionAlgorithm ip_alg[2] = {
-   
RANAP_IntegrityProtectionAlgorithm_standard_UMTS_integrity_algorithm_UIA1,
-   
RANAP_IntegrityProtectionAlgorithm_standard_UMTS_integrity_algorithm_UIA2,
-};
-
-static const RANAP_EncryptionAlgorithm_t enc_alg[2] = {
-   RANAP_EncryptionAlgorithm_standard_UMTS_encryption_algorith_UEA1,
-   RANAP_EncryptionAlgorithm_standard_UMTS_encryption_algorithm_UEA2,
-};
-
-/*! \brief generate RANAP SECURITY MODE COMMAND message */
-struct msgb *ranap_new_msg_sec_mod_cmd(const uint8_t *ik, const uint8_t *ck, 
enum RANAP_KeyStatus status)
+/*! \brief generate RANAP SECURITY MODE COMMAND message.
+ *  \param[in] ik 128bit integrity protection key (mandatory)
+ *  \param[in] ck 128bit ciphering key (optional)
+ *  \param[in] status key status
+ *  \param[in] uia_bitmask bit-mask of UIA algorithms; Bit0 = UIA0 .. Bit2 = 
UIA2
+ *  \param[in] uea_bitmask bit-mask of UEA algorithms; Bit0 = UEA0 .. Bit2 = 
UEA2; ck required
+ *  \returns message buffer with encoded command message */
+struct msgb *ranap_new_msg_sec_mod_cmd2(const uint8_t *ik, const uint8_t *ck, 
enum RANAP_KeyStatus status,
+   uint8_t uia_bitmask, uint8_t 
uea_bitmask)
 {
RANAP_SecurityModeCommandIEs_t ies;
RANAP_SecurityModeCommand_t out;
@@ -223,11 +220,26 @@
memset(, 0, sizeof(ies));
memset(, 0, sizeof(out));

-   for (i = 0; i < ARRAY_SIZE(ip_alg); i++) {
+   for (i = 0; i < 8; i++) {
+   RANAP_IntegrityProtectionAlgorithm_t ialg;
+   if (!(uia_bitmask & (1 << i)))
+   continue;
+   switch (i) {
+   case 1:
+   ialg = 
RANAP_IntegrityProtectionAlgorithm_standard_UMTS_integrity_algorithm_UIA1;
+   break;
+   case 2:
+   ialg = 
RANAP_IntegrityProtectionAlgorithm_standard_UMTS_integrity_algorithm_UIA2;
+   break;
+   default:
+   LOGP(DRANAP, "Unsupported UIA algorithm UIA%d 
specified\n", i);
+   return NULL;
+   }
+
/* needs to be dynamically allocated, as
 * SET_OF_free() will call FREEMEM() on it */
RANAP_IntegrityProtectionAlgorithm_t *alg = CALLOC(1, 
sizeof(*alg));
-   *alg = ip_alg[i];
+   *alg = ialg;

ASN_SEQUENCE_ADD(, alg);
}
 
@@ -235,11 +247,27 @@

if (ck) {
ies.presenceMask = 
SECURITYMODECOMMANDIES_RANAP_ENCRYPTIONINFORMATION_PRESENT;
-   for (i = 0; i < ARRAY_SIZE(ip_alg); i++) {
+   for (i = 0; i < 8; i++) {
+   RANAP_EncryptionAlgorithm_t ealg;
+   if (!(uea_bitmask & (1 << i)))
+   continue;
+   switch (i) {
+   case 1:
+   ealg = 
RANAP_EncryptionAlgorithm_standard_UMTS_encryption_algorith_UEA1;
+   break;
+   case 2:
+   ealg = 
RANAP_EncryptionAlgorithm_standard_UMTS_encryption_algorithm_UEA2;
+   break;
+   default:
+   LOGP(DRANAP, 

Change in osmo-iuh[master]: ranap_msg_factory: Allow detailed control over UEA/UIA algorithm encoded

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/22756 )

Change subject: ranap_msg_factory: Allow detailed control over UEA/UIA 
algorithm encoded
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
Gerrit-Change-Number: 22756
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 15:07:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: oml: reuse the given msgb in oml_fom_ack_nack()

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/22763 )

Change subject: oml: reuse the given msgb in oml_fom_ack_nack()
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f61636e9a144017e2c46b1540d152c21529391
Gerrit-Change-Number: 22763
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 15:06:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: oml: ensure that IPA RSL Connect ACK/NACK contains all IEs

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/22765 )

Change subject: oml: ensure that IPA RSL Connect ACK/NACK contains all IEs
..

oml: ensure that IPA RSL Connect ACK/NACK contains all IEs

All IEs in the BSC originated message are optional, so we assume
default values for them.  Let's reflect them all in the ACK/NACK.

Change-Id: I5c73e83daad0cea07b9cb674c393e0bfc6268a61
Related: OS#3791
---
M src/common/oml.c
1 file changed, 14 insertions(+), 3 deletions(-)

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



diff --git a/src/common/oml.c b/src/common/oml.c
index d395d8f..c32260b 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -442,14 +442,15 @@
foh->msg_type += 2; /* nack */
/* add cause */
msgb_tv_put(msg, NM_ATT_NACK_CAUSES, cause);
-   /* update the length as we just made the message larger */
-   struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg);
-   omh->length = msgb_l3len(msg);
} else {
LOGPFOH(DOML, LOGL_DEBUG, foh, "Sending FOM ACK.\n");
foh->msg_type++; /* ack */
}

+   /* ensure that the message length is up to date */
+   struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg);
+   omh->length = msgb_l3len(msg);
+
/* we cannot use oml_send_msg() as we already have the OML header */
if (abis_oml_sendmsg(msg) != 0)
LOGPFOH(DOML, LOGL_ERROR, foh, "Failed to send ACK/NACK\n");
@@ -1406,6 +1407,16 @@
trx->rsl_tei = stream_id;
rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, 
inet_ntoa(in), port, trx->nr);
}
+
+   /* The ACK/NACK is expected to contain all IEs */
+   if (!TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP)) /* TV32 */
+   msgb_tv_fixed_put(msg, NM_ATT_IPACC_DST_IP, sizeof(in),
+ (const uint8_t *) );
+   if (!TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP_PORT)) /* TV16 */
+   msgb_tv16_put(msg, NM_ATT_IPACC_DST_IP_PORT, port);
+   if (!TLVP_PRESENT(tp, NM_ATT_IPACC_STREAM_ID)) /* TV */
+   msgb_tv_put(msg, NM_ATT_IPACC_STREAM_ID, stream_id);
+
if (rc < 0) {
LOGP(DOML, LOGL_ERROR, "%s: Error in abis_open(RSL): %d\n", 
trx_name, rc);
return oml_fom_ack_nack(msg, NM_NACK_CANT_PERFORM);

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I5c73e83daad0cea07b9cb674c393e0bfc6268a61
Gerrit-Change-Number: 22765
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bts[master]: oml: reuse the given msgb in oml_fom_ack_nack()

2021-02-10 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/22763 )

Change subject: oml: reuse the given msgb in oml_fom_ack_nack()
..

oml: reuse the given msgb in oml_fom_ack_nack()

This would allow to compose ACK/NACK messages with additional IEs
not present in the original message.  Also, this change basically
eliminates unnecessary msgb_copy() / free().

Change-Id: I17f61636e9a144017e2c46b1540d152c21529391
Related: OS#3791
---
M src/common/oml.c
1 file changed, 13 insertions(+), 13 deletions(-)

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



diff --git a/src/common/oml.c b/src/common/oml.c
index 9886fe4..d395d8f 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -424,23 +424,15 @@
return oml_mo_fom_ack_nack(mo, NM_MT_OPSTART, nack_cause);
 }

-/* Send an ACK or NACK response for 'msg' to BSC, deriving message
- * type, obj class, obj inst from 'msg' and copying all attributes
- * contained in 'msg'. ACK is sent if cause == 0; NACK otherwise */
-int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause)
+/* Send an ACK or NACK response to BSC for the given OML message,
+ * reusing it.  ACK is sent if cause == 0; NACK otherwise. */
+int oml_fom_ack_nack(struct msgb *msg, uint8_t cause)
 {
-   struct msgb *msg;
struct abis_om_fom_hdr *foh;

-   msg = msgb_copy(old_msg, "OML_fom_ack_nack");
-   if (!msg)
-   return -ENOMEM;
-
-   /* remove any l2/l1 that may be present in copy */
+   /* remove any l2/l1 that may be already present */
msgb_pull_to_l2(msg);

-   msg->trx = old_msg->trx;
-
foh = (struct abis_om_fom_hdr *) msg->l3h;

/* alter message type */
@@ -459,7 +451,11 @@
}

/* we cannot use oml_send_msg() as we already have the OML header */
-   return abis_oml_sendmsg(msg);
+   if (abis_oml_sendmsg(msg) != 0)
+   LOGPFOH(DOML, LOGL_ERROR, foh, "Failed to send ACK/NACK\n");
+
+   /* msgb was reused, do not free() */
+   return 1;
 }

 /*
@@ -1537,6 +1533,10 @@
ret = -EINVAL;
}

+   /* msgb was reused, do not free() */
+   if (ret == 1)
+   return 0;
+
msgb_free(msg);
 
return ret;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f61636e9a144017e2c46b1540d152c21529391
Gerrit-Change-Number: 22763
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-bts[master]: oml: reuse the given msgb in oml_fom_ack_nack()

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/22763 )

Change subject: oml: reuse the given msgb in oml_fom_ack_nack()
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f61636e9a144017e2c46b1540d152c21529391
Gerrit-Change-Number: 22763
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 10 Feb 2021 15:06:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: fix _gsm48_cc_trans_free(): send MNCC REL.ind on Clear Request

2021-02-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/22747 )

Change subject: fix _gsm48_cc_trans_free(): send MNCC REL.ind on Clear Request
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I3ad4a99757878de3796027325627c87d9a4e93f1
Gerrit-Change-Number: 22747
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Assignee: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 10 Feb 2021 15:04:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


  1   2   >