[PATCH] osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig...

2017-12-11 Thread lynxis lazus

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

rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh

The split build script also initilize the repository if it's empty and doesn't
need any state of the osc repository.

It also downloads bumpversion and limesuite

Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774
---
M scripts/osmocom-nightly-packages.sh
1 file changed, 164 insertions(+), 69 deletions(-)


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

diff --git a/scripts/osmocom-nightly-packages.sh 
b/scripts/osmocom-nightly-packages.sh
index c2b603b..8db2d57 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -1,84 +1,179 @@
-#!/bin/sh
-
+#!/bin/bash
 # requirements
 # apt install devscripts git-buildpackage osc git
 
-# rather than including a dangerous 'rm -rf *' here, lets delegate to the user:
-if [ -n "$(ls)" ]; then
-  echo "ERROR: I need to run in an empty directory."
-  exit 1
-fi
+set -e
+set -x
 
 if ! which osc >/dev/null 2>/dev/null ; then
   echo "osc binary not found"
   exit 1
 fi
-
-set -x -e
-
-git clone git://git.osmocom.org/osmo-sip-connector
-git clone git://git.osmocom.org/libosmocore
-git clone git://git.osmocom.org/libosmo-sccp
-git clone git://git.osmocom.org/libosmo-abis
-git clone git://git.osmocom.org/libosmo-netif
-git clone git://git.osmocom.org/libsmpp34
-git clone git://git.osmocom.org/libasn1c
-git clone git://git.osmocom.org/libgtpnl
-git clone git://git.osmocom.org/osmo-iuh
-git clone git://git.osmocom.org/osmo-sgsn
-git clone git://git.osmocom.org/osmo-ggsn
-git clone git://git.osmocom.org/openbsc
-git clone git://git.osmocom.org/osmo-pcap
-git clone git://git.osmocom.org/osmo-trx
-git clone git://git.osmocom.org/osmo-bts
-git clone git://git.osmocom.org/osmo-pcu
-git clone git://git.osmocom.org/osmo-hlr
-git clone git://git.osmocom.org/osmo-mgw
-git clone git://git.osmocom.org/osmo-msc
-git clone git://git.osmocom.org/osmo-bsc
-
-
+DT=$(date +%Y%m%d)
 PROJ=network:osmocom:nightly
-osc co $PROJ
 
-DT=`date +%Y%m%d`
+### common
+checkout() {
+  local name=$1
+  local branch=$2
+  local url="git://git.osmocom.org"
 
+  cd "$REPO"
 
-build() {
-  rm -rf data
-  cd $1
-  VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","",  | sed 
s,")","",`
-  dch -v $VER.$DT -m "Snapshot build"
-  git commit -m "$DT snapshot" debian/
-  gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data
-  cd ../$PROJ/$1
-  osc rm * || true
-  mv ../../data/*.dsc .
-  mv ../../data/*.tar* .
-  osc add *
-  cd ../../
+  if [ -n "$branch" ] ; then
+git clone "$url/$name" -b "$branch"
+  else
+git clone "$url/$name"
+  fi
+
+  cd -
 }
 
-build libosmocore
-build libosmo-sccp
-build libosmo-abis
-build libosmo-netif
-build libsmpp34
-build libasn1c
-build libgtpnl
-build osmo-iuh
-build osmo-ggsn
-build osmo-sgsn
-build openbsc
-build osmo-pcap
-build osmo-trx
-build osmo-sip-connector
-build osmo-bts
-build osmo-pcu
-build osmo-hlr
-build osmo-mgw
-build osmo-msc
-build osmo-bsc
+### OBS build
+prepare() {
+  # clean up the whole space
+  mkdir -p "$REPO/osc/"
+  cd "$REPO/osc"
+  osc co "$PROJ"
+}
 
-cd $PROJ
-osc ci -m "Snapshot $DT"
+build() {
+  local name=$1
+  local changelog=$2
+  local gitbpargs=$3
+  local repodir=$REPO/$name
+  local oscdir=$REPO/osc/$PROJ/$name
+
+  if [ -z "$changelog" ] ; then
+changelog=commit
+  fi
+
+  if [ -d "$oscdir" ] ; then
+# remove earlier version
+cd "$oscdir"
+osc rm -- * || true
+  else
+# new package
+mkdir -p "$oscdir/"
+cd "$REPO/osc/$PROJ/"
+osc add "$name"
+  fi
+
+  cd "$repodir"
+
+  if [ "$changelog" = "commit" ] ; then
+VER=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,'  | sed 
's,),,')
+dch -v "$VER.$DT" -m "Snapshot build"
+git commit -m "$DT snapshot" debian/
+  fi
+
+  mkdir -p "$DATA/$name"
+  # source code build without dependency checks and unsigned source and 
unsigned change log
+  gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$DATA/$name" $gitbpargs
+
+  mv "$DATA/$name/"*.tar* "$DATA/$name/"*.dsc "$oscdir/"
+
+  cd "$oscdir"
+  osc add -- *.tar* *.dsc
+  osc ci -m "Snapshot $name $DT"
+}
+
+post() {
+  cd "$REPO/osc/$PROJ/"
+  osc status
+}
+
+download_bumpversion() {
+  # bumpversion is required for debian < 9/stretch
+  local oscdir=$REPO/osc/$PROJ/bumpversion
+  local version=0.5.3
+  local release=3
+
+  if [ ! -d "$oscdir" ] ; then
+mkdir "$oscdir"
+cd "$oscdir"
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.dsc;
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version.orig.tar.gz;
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.debian.tar.xz;
+  fi
+}
+
+checkout_limesuite() {
+  TAG="v17.12.0"
+
+  cd "$REPO"
+  git clone https://github.com/myriadrf/LimeSuite limesuite
+  cd limesuite
+  git checkout "$TAG"
+}
+

Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l

2017-12-11 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l

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

Last lines of build log:
[  405s] | configure:14162: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c
[  405s] | conftest.c:27:21: fatal error: cdk/cdk.h: No such file or directory
[  405s] |  #include 
[  405s] |  ^
[  405s] | compilation terminated.
[  405s] | configure:14162: $? = 1
[  405s] | configure: failed program was:
[  405s] | | /* confdefs.h */
[  405s] | | #define PACKAGE_NAME "openbsc"
[  405s] | | #define PACKAGE_TARNAME "openbsc"
[  405s] | | #define PACKAGE_VERSION "UNKNOWN"
[  405s] | | #define PACKAGE_STRING "openbsc UNKNOWN"
[  405s] | | #define PACKAGE_BUGREPORT "open...@lists.osmocom.org"
[  405s] | | #define PACKAGE_URL ""
[  405s] | | #define PACKAGE "openbsc"
[  405s] | | #define VERSION "UNKNOWN"
[  405s] | | #define STDC_HEADERS 1
[  405s] | | #define HAVE_SYS_TYPES_H 1
[  405s] | | #define HAVE_SYS_STAT_H 1
[  405s] | | #define HAVE_STDLIB_H 1
[  405s] | | #define HAVE_STRING_H 1
[  405s] | | #define HAVE_MEMORY_H 1
[  405s] | | #define HAVE_STRINGS_H 1
[  407s] | | #defin[  386.669438] sysrq: SysRq : Power Off
[  407s] [  386.671945] reboot: Power down
[  407s] ### VM INTERACTION END ###
[  407s] 
[  407s] armbuild15 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
22:44:13 UTC 2017.
[  407s] 

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


osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index

2017-12-11 Thread Holger Freyther

Patch Set 1:

Why do we see ../../../ in the file names? We switched logging to __BASE_FILE__ 
to avoid this on src vs.  build dir builds..

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

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


libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field

2017-12-11 Thread Holger Freyther

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/3258/3/tests/lapd/lapd_test.c
File tests/lapd/lapd_test.c:

Line 365
Does the above assert hold true now?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64

2017-12-11 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64

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

Last lines of build log:
[ 1117s] | configure:7731: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c
[ 1117s] | configure:7731: $? = 0
[ 1117s] | configure:7745: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c
[ 1117s] | conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or 
directory
[ 1117s] |  #include 
[ 1117s] | ^
[ 1117s] | compilation terminated.
[ 1117s] | configure:7745: $? = 1
[ 1117s] | configure: failed program was:
[ 1117s] | | /* confdefs.h */
[ 1117s] | | #define PACKAGE_NAME "openbsc"
[ 1117s] | | #define PACKAGE_TARNAME "openbsc"
[ 1117s] | | #define PACKAGE_VERSION "UNKNOWN"
[ 1117s] | | #define PACKAGE_STRING "openbsc UNKNOWN"
[ 1117s] | | #define PACKAGE_BUGREPORT "open...@lists.osmocom.org"
[ 1117s] | | #define PACKAGE_URL ""
[ 1117s] | | #define PACKAGE "openbsc"
[ 1117s] | | #define VERSION "UNKNOWN"
[ 1117s] | | /* end confdefs.h.  */
[ 1117s] | | #include 
[ 1117s] | configure:7774: checking for ANSI C header files
[ 1117s] | configure:7794: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
[ 1117s] | configure:7794: $? = 0
[ 1119s] | conf[ 1058.733727] sysrq: SysRq : Power Off
[ 1119s] [ 1058.744922] reboot: Power down
[ 1120s] ### VM INTERACTION END ###
[ 1120s] 
[ 1120s] obs-arm-3 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
21:04:25 UTC 2017.
[ 1120s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586

2017-12-11 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586

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

Last lines of build log:
[  154s] + /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) 
[0xf720a276]
[  154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x4ea5) 
[0x56642ea5]
[  154s] +DBI: -6: An invalid or out-of-range index was passed to libdbi
[  154s] +backtrace() returned 8 addresses
[  154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x58df) 
[0x566438df]
[  154s] + /usr/lib/i386-linux-gnu/libdbi.so.1(_error_handler+0x86) 
[0xf73aef16]
[  154s] + /usr/lib/i386-linux-gnu/libdbi.so.1(dbi_result_next_row+0x68) 
[0xf73b0bd8]
[  154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x92dc) 
[0x566472dc]
[  154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(main+0x459) 
[0x56642919]
[  154s] + /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) 
[0xf720a276]
[  154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x4ea5) 
[0x56642ea5]
[  154s]  
[  154s] \ No newline at end of file
[  154s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  154s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  154s] make[1]: *** [override_dh_auto_test] Error 1
[  154s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  154s] debian/rules:13: recipe for target 'build' failed
[  154s] make: *** [build] Error 2
[  154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  154s] 
[  154s] lamb11 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
20:05:15 UTC 2017.
[  154s] 
[  154s] ### VM INTERACTION START ###
[  156s] [  148.342880] reboot: Power down
[  156s] ### VM INTERACTION END ###
[  156s] 
[  156s] lamb11 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
20:05:19 UTC 2017.
[  156s] 

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


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

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

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

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

Last lines of build log:
[  156s] | #define HAVE_STRINGS_H 1
[  156s] | #define HAVE_INTTYPES_H 1
[  156s] | #define HAVE_STDINT_H 1
[  156s] | #define HAVE_UNISTD_H 1
[  156s] | #define HAVE_DLFCN_H 1
[  156s] | #define LT_OBJDIR ".libs/"
[  156s] | #define BUILD_SMPP 1
[  156s] | #define STDC_HEADERS 1
[  156s] | #define HAVE_DBI_DBD_H 1
[  156s] | #define HAVE_PCAP_PCAP_H 1
[  156s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  156s] | 
[  156s] | configure: exit 0
[  156s] 
[  156s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  156s] make[1]: *** [override_dh_auto_test] Error 1
[  156s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  156s] debian/rules:13: recipe for target 'build' failed
[  156s] make: *** [build] Error 2
[  156s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  156s] 
[  156s] wildcard2 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
20:05:02 UTC 2017.
[  156s] 
[  156s] ### VM INTERACTION START ###
[  159s] [  146.474758] reboot: Power down
[  160s] ### VM INTERACTION END ###
[  160s] 
[  160s] wildcard2 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 
20:05:06 UTC 2017.
[  160s] 

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


[PATCH] osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual

2017-12-11 Thread dexter

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

osmo-mgw: Add vty reference manual

add missing vty reference manual for osmo-mgw

Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2
---
M Makefile
A OsmoMGW/Makefile
A OsmoMGW/osmomgw-vty-reference.xml
A OsmoMGW/vty/mgw_vty_additions.xml
A OsmoMGW/vty/mgw_vty_reference.xml
5 files changed, 1,789 insertions(+), 0 deletions(-)


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

diff --git a/Makefile b/Makefile
index 8261640..1fd0733 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@
cd OsmoHLR; $(MAKE)
cd OsmoSTP; $(MAKE)
cd OsmocomBB; $(MAKE)
+   cd OsmoMGW; $(MAKE)
 
 clean:
cd OsmoBTS; $(MAKE) clean
@@ -27,6 +28,7 @@
cd OsmoHLR; $(MAKE) clean
cd OsmoSTP; $(MAKE) clean
cd OsmocomBB; $(MAKE) clean
+   cd OsmoMGW; $(MAKE) clean
 
 upload:
cd OsmoBTS; $(MAKE) upload
@@ -42,6 +44,7 @@
cd OsmoHLR; $(MAKE) upload
cd OsmoSTP; $(MAKE) upload
cd OsmocomBB; $(MAKE) upload
+   cd OsmoMGW; $(MAKE) upload
 
 check:
cd OsmoBTS; $(MAKE) check
@@ -54,6 +57,7 @@
# These don't use asciidoc, so they have no 'make check' target:
#cd OsmoMGCP; $(MAKE) check
#cd OsmoNAT; $(MAKE) check
+   #cd OsmoMGW; $(MAKE) check
cd OsmoGSMTester; $(MAKE) check
cd OsmoMSC; $(MAKE) check
cd OsmoHLR; $(MAKE) check
diff --git a/OsmoMGW/Makefile b/OsmoMGW/Makefile
new file mode 100644
index 000..46c97e4
--- /dev/null
+++ b/OsmoMGW/Makefile
@@ -0,0 +1,6 @@
+TOPDIR = ..
+
+VTY_REFERENCE = osmomgw-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
+
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/OsmoMGW/osmomgw-vty-reference.xml 
b/OsmoMGW/osmomgw-vty-reference.xml
new file mode 100644
index 000..ad30dbd
--- /dev/null
+++ b/OsmoMGW/osmomgw-vty-reference.xml
@@ -0,0 +1,44 @@
+
+
+http://www.docbook.org/xml/5.0/dtd/docbook.dtd; [
+
+
+]>
+
+
+  
+
+
+v1
+13th August 2012
+hf
+Initial
+
+
+v2
+5th March 2014
+hf
+Update to match osmo-bsc version 0.13.0-305
+
+
+
+OsmoMGCP VTY Reference
+
+
+  2012-2014
+
+
+
+  This work is copyright by sysmocom - s.f.m.c. 
GmbH. All rights reserved.
+  
+
+  
+
+  
+  
+
+
diff --git a/OsmoMGW/vty/mgw_vty_additions.xml 
b/OsmoMGW/vty/mgw_vty_additions.xml
new file mode 100644
index 000..a4c675e
--- /dev/null
+++ b/OsmoMGW/vty/mgw_vty_additions.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/OsmoMGW/vty/mgw_vty_reference.xml 
b/OsmoMGW/vty/mgw_vty_reference.xml
new file mode 100644
index 000..28eba81
--- /dev/null
+++ b/OsmoMGW/vty/mgw_vty_reference.xml
@@ -0,0 +1,1733 @@
+
+  
+  
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
+  
+  
+  
+  
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+  

[PATCH] meta-telephony[201705]: osmo-sgsn: libosmo-sccp dep is only needed if building with ...

2017-12-11 Thread Pau Espin Pedrol

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

osmo-sgsn: libosmo-sccp dep is only needed if building with iu support

Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13
---
M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/93/5293/1

diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 
b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
index 8ed6a10..25c6a25 100644
--- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
+++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
@@ -3,14 +3,14 @@
 LICENSE = "AGPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
 
-DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn"
+DEPENDS = "c-ares libpcap libosmocore libosmo-netif osmo-ggsn"
 
 INC_PR="r4.${META_TELEPHONY_OSMO_INC}"
 
 inherit autotools pkgconfig systemd
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'iu', d)}"
-PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c osmo-iuh,"
+PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c libosmo-sccp osmo-iuh,"
 
 do_install_append() {
install -d ${D}${systemd_system_unitdir}/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] meta-telephony[201705]: Update PV for osmocom recipes

2017-12-11 Thread Pau Espin Pedrol

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

Update PV for osmocom recipes

Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078
---
M recipes-misc/libsmpp/libsmpp34_git.bb
M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
M recipes-osmocom/libosmocore/libosmocore_git.bb
M recipes-osmocom/openbsc/openbsc_git.bb
M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb
M recipes-osmocom/osmo-msc/osmo-msc_git.bb
M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb
12 files changed, 14 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/89/5289/1

diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb 
b/recipes-misc/libsmpp/libsmpp34_git.bb
index ce39cff..245cd43 100644
--- a/recipes-misc/libsmpp/libsmpp34_git.bb
+++ b/recipes-misc/libsmpp/libsmpp34_git.bb
@@ -17,4 +17,3 @@
 
 PACKAGES =+ "${PN}-apps"
 FILES_${PN}-apps = "${bindir}/*"
-
diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb 
b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
index a6f0e9b..094efbc 100644
--- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
+++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
@@ -5,5 +5,5 @@
 S = "${WORKDIR}/git"
 SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323"
 SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git"
-PV = "0.4.0+gitr${SRCPV}"
-PR = "${INC_PR}.0"
+PV = "0.1.1+gitr${SRCPV}"
+PR = "${INC_PR}.1"
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb 
b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
index c97ea1f..23a97eb 100644
--- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
@@ -3,8 +3,8 @@
 S = "${WORKDIR}/git"
 SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e"
 SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git"
-PV = "0.7.0+gitr${SRCPV}"
-PR = "${INC_PR}.2"
+PV = "0.8.1+gitr${SRCPV}"
+PR = "${INC_PR}.0"
 
 # we require the tests to link to the static libosmo-sigtran library to
 # access symbols not starting with osmo_*
diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb 
b/recipes-osmocom/libosmocore/libosmocore_git.bb
index f1d6bc0..3d731f5 100644
--- a/recipes-osmocom/libosmocore/libosmocore_git.bb
+++ b/recipes-osmocom/libosmocore/libosmocore_git.bb
@@ -3,7 +3,7 @@
 S = "${WORKDIR}/git"
 SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e"
 SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1"
-PV = "0.9.6+gitr${SRCPV}"
+PV = "0.10.2+gitr${SRCPV}"
 PR = "r0"
 
 DEPENDS += "libtalloc"
diff --git a/recipes-osmocom/openbsc/openbsc_git.bb 
b/recipes-osmocom/openbsc/openbsc_git.bb
index 1547b8c..59150d8 100644
--- a/recipes-osmocom/openbsc/openbsc_git.bb
+++ b/recipes-osmocom/openbsc/openbsc_git.bb
@@ -1,6 +1,6 @@
 require ${PN}.inc
 
-PV = "0.15.0+gitr${SRCPV}"
+PV = "1.0.0+gitr${SRCPV}"
 PRINC = "0"
 PR = "${INC_PR}.0"
 
diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb 
b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
index d061c05..d04c60f 100644
--- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
+++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
@@ -3,5 +3,5 @@
 S = "${WORKDIR}/git"
 SRCREV = "4bd710d107786ecf838f568171a0175d157e809d"
 SRC_URI = "git://git.osmocom.org/osmo-bsc.git;protocol=git"
-PV = "1.0.1+gitr${SRCPV}"
+PV = "1.1.2+gitr${SRCPV}"
 PR = "${INC_PR}.0"
diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb 
b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
index 597edd6..969c4bf 100644
--- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
+++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
@@ -2,8 +2,8 @@
 HOMEPAGE = "https://osmocom.org/projects/openggsn;
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-PV = "1.0.0+gitr${SRCPV}"
-PR = "r1"
+PV = "1.1.0+gitr${SRCPV}"
+PR = "r0"
 
 SRCREV = "4f0343233b83337afa1e1dfb4bcf9d076ecd4be2"
 SRC_URI = "git://git.osmocom.org/osmo-ggsn   \
diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb 
b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
index 5beedd6..dccb5b5 100644
--- a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
+++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
@@ -3,5 +3,5 @@
 S = "${WORKDIR}/git"
 SRCREV = "43bd6069e83ff034dcaff4780891d0468e899b07"
 SRC_URI = "git://git.osmocom.org/osmo-hlr.git;protocol=git"
-PV = "0.0.1+gitr${SRCPV}"
+PV = "0.1.0+gitr${SRCPV}"
 PR = "${INC_PR}.0"
diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb 
b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
index 8f694d3..16c36ed 100644
--- a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
+++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
@@ -3,5 +3,5 @@
 S = "${WORKDIR}/git"
 SRCREV = "accb78000b6161d5f76eae24e625c01533001b89"
 SRC_URI = "git://git.osmocom.org/osmo-iuh.git;protocol=git"
-PV = "0.1.0+gitr${SRCPV}"
+PV = "0.2.0+gitr${SRCPV}"
 PR = 

[PATCH] meta-telephony[201705]: osmo-mgw: Split packages and install osmo-mgw systemd service

2017-12-11 Thread Pau Espin Pedrol

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

osmo-mgw: Split packages and install osmo-mgw systemd service

Change-Id: I1b902842cf8766af1e58de76e46786213d222389
---
M recipes-osmocom/osmo-mgw/osmo-mgw.inc
1 file changed, 36 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/92/5292/1

diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc 
b/recipes-osmocom/osmo-mgw/osmo-mgw.inc
index 1b3362f..3294464 100644
--- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc
+++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc
@@ -17,7 +17,41 @@
 
install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg 
${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg
install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service 
${D}${systemd_system_unitdir}/
+
+   install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg 
${D}${sysconfdir}/osmocom/osmo-mgw.cfg
+   install -m 0644 ${S}/contrib/systemd/osmo-mgw.service 
${D}${systemd_system_unitdir}/
 }
 
-SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service"
-CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
+PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp 
libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp"
+SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service"
+SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service"
+
+FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}"
+FILES_libosmo-legacy-mgcp-dev = " \
+   ${includedir}/osmocom/legacy_mgcp \
+   ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \
+   ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \
+   "
+
+FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}"
+FILES_libosmo-mgcp-dev = " \
+${includedir}/osmocom/mgcp \
+${libdir}/pkgconfig/libosmo-mgcp.pc \
+${libdir}/libosmo-mgcp${SOLIBSDEV} \
+"
+
+FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}"
+FILES_libosmo-mgcp-client-dev = " \
+   ${includedir}/osmocom/mgcp_client \
+   ${libdir}/pkgconfig/libosmo-mgcp-client.pc \
+   ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \
+   "
+
+FILES_osmo-bsc-mgcp = " \
+   ${bindir}/osmo-bsc_mgcp \
+   ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
+   ${systemd_unitdir}/system/osmo-bsc-mgcp.service \
+   "
+CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
+
+CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-mgw.cfg"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] meta-telephony[201705]: Set up osmocom recipes to current git master

2017-12-11 Thread Pau Espin Pedrol

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

Set up osmocom recipes to current git master

This set of revisions together with next set of patches has been tested
in a sysmobts-v2 locally.

Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90
---
M recipes-misc/libsmpp/libsmpp34_git.bb
M recipes-osmocom/libasn1c/libasn1c_git.bb
M recipes-osmocom/libosmo-abis/libosmo-abis_git.bb
M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
M recipes-osmocom/libosmocore/libosmocore_git.bb
M recipes-osmocom/openbsc/openbsc_git.bb
M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb
M recipes-osmocom/osmo-msc/osmo-msc_git.bb
M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb
14 files changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/87/5287/1

diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb 
b/recipes-misc/libsmpp/libsmpp34_git.bb
index 235c908..ce39cff 100644
--- a/recipes-misc/libsmpp/libsmpp34_git.bb
+++ b/recipes-misc/libsmpp/libsmpp34_git.bb
@@ -6,7 +6,7 @@
 DEPENDS = "libxml2"
 
 S = "${WORKDIR}/git"
-SRCREV = "84f2905c5bfed2e1f5bae52a2bb9bc771fd8b895"
+SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8"
 SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git"
 PV = "1.10+gitr${SRCPV}"
 PR = "r1"
diff --git a/recipes-osmocom/libasn1c/libasn1c_git.bb 
b/recipes-osmocom/libasn1c/libasn1c_git.bb
index 0d4800a..8554d70 100644
--- a/recipes-osmocom/libasn1c/libasn1c_git.bb
+++ b/recipes-osmocom/libasn1c/libasn1c_git.bb
@@ -1,7 +1,7 @@
 require ${PN}.inc
 
 S = "${WORKDIR}/git"
-SRCREV = "aaae8c76496a97050264e4c49e539b0420496737"
+SRCREV = "bd2173796d90db181c22034e4acbe391d2cb57ce"
 SRC_URI = "git://git.osmocom.org/libasn1c.git;protocol=git"
 PV = "0.9.28+gitr${SRCPV}"
 PR = "${INC_PR}.0"
diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb 
b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb
index 6f9c2fd..4a07b20 100644
--- a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb
+++ b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb
@@ -3,7 +3,7 @@
 DEPENDS += "libtalloc"
 
 S = "${WORKDIR}/git"
-SRCREV = "01543a1ea392fa98974ea2f99cafbc28e9966656"
+SRCREV = "d1dd22c38e86f123c8f9a93c2789deafdfcb9265"
 SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git"
 PV = "0.4.0+gitr${SRCPV}"
 PR = "${INC_PR}.0"
diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb 
b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
index 0e55628..a6f0e9b 100644
--- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
+++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
@@ -3,7 +3,7 @@
 DEPENDS += "libtalloc lksctp-tools"
 
 S = "${WORKDIR}/git"
-SRCREV = "59941982083f7f0d6ab11f7bbb42c297a3fb8d69"
+SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323"
 SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git"
 PV = "0.4.0+gitr${SRCPV}"
 PR = "${INC_PR}.0"
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb 
b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
index a335993..c97ea1f 100644
--- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
@@ -1,7 +1,7 @@
 require ${PN}.inc
 
 S = "${WORKDIR}/git"
-SRCREV = "54fa75b85c91bb4bb79960942f63968f6423f6a5"
+SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e"
 SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git"
 PV = "0.7.0+gitr${SRCPV}"
 PR = "${INC_PR}.2"
diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb 
b/recipes-osmocom/libosmocore/libosmocore_git.bb
index 5d702a3..f1d6bc0 100644
--- a/recipes-osmocom/libosmocore/libosmocore_git.bb
+++ b/recipes-osmocom/libosmocore/libosmocore_git.bb
@@ -1,7 +1,7 @@
 require ${PN}.inc
 
 S = "${WORKDIR}/git"
-SRCREV = "657c5b6cadcef470c7ff9bffed3caab227026e6a"
+SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e"
 SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1"
 PV = "0.9.6+gitr${SRCPV}"
 PR = "r0"
diff --git a/recipes-osmocom/openbsc/openbsc_git.bb 
b/recipes-osmocom/openbsc/openbsc_git.bb
index 59667f7..1547b8c 100644
--- a/recipes-osmocom/openbsc/openbsc_git.bb
+++ b/recipes-osmocom/openbsc/openbsc_git.bb
@@ -4,7 +4,7 @@
 PRINC = "0"
 PR = "${INC_PR}.0"
 
-SRCREV = "3ae8682f974058970fa564f09a34a51e867b896b"
+SRCREV = "5d69fa52cf1e679e391519dd841da1579d640087"
 SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git"
 
 S = "${WORKDIR}/git/openbsc"
diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb 
b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
index 234e054..d061c05 100644
--- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
+++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
@@ -1,7 +1,7 @@
 require ${PN}.inc
 
 S = "${WORKDIR}/git"
-SRCREV = "00c22464a0c1b51bb4b29efecab39e993224949c"
+SRCREV = "4bd710d107786ecf838f568171a0175d157e809d"
 SRC_URI = 

[PATCH] meta-telephony[201705]: Remove libsmpp34_1.12.bb and use _git instead

2017-12-11 Thread Pau Espin Pedrol

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

Remove libsmpp34_1.12.bb and use _git instead

Same as we do for other osmocom recipes.

Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd
---
D recipes-misc/libsmpp/libsmpp34_1.12.bb
M recipes-misc/libsmpp/libsmpp34_git.bb
2 files changed, 2 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/90/5290/1

diff --git a/recipes-misc/libsmpp/libsmpp34_1.12.bb 
b/recipes-misc/libsmpp/libsmpp34_1.12.bb
deleted file mode 100644
index 406fa45..000
--- a/recipes-misc/libsmpp/libsmpp34_1.12.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "C Open SMPP library"
-HOMEPAGE = "http://osmocom.org/projects/libsmpp34/;
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-SECTION = "libs"
-DEPENDS = "libxml2"
-
-S = "${WORKDIR}/git"
-SRCREV = "6d47c170cccd8a72eae985c7ecffba3f07d3861a"
-SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git"
-PR = "r1"
-
-PARALLEL_MAKE = ""
-
-inherit autotools pkgconfig
-
-PACKAGES =+ "${PN}-apps"
-FILES_${PN}-apps = "${bindir}/*"
-
diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb 
b/recipes-misc/libsmpp/libsmpp34_git.bb
index 245cd43..73933c8 100644
--- a/recipes-misc/libsmpp/libsmpp34_git.bb
+++ b/recipes-misc/libsmpp/libsmpp34_git.bb
@@ -8,8 +8,8 @@
 S = "${WORKDIR}/git"
 SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8"
 SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git"
-PV = "1.10+gitr${SRCPV}"
-PR = "r1"
+PV = "1.12+gitr${SRCPV}"
+PR = "r0"
 
 PARALLEL_MAKE = ""
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 


osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR

2017-12-11 Thread Vadim Yanitskiy

Patch Set 3:

Thanks, Harald!

@dexter, just let me know if I can help you with that.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-bsc[master]: Reduce T3109 from 19s to 5s

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review-1

let's keep this on hold for some more testing

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

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


osmo-bsc[master]: paging: Stop all paging if MSC sends us BSSMAP RESET

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: paging: Remove obsolete paging call-back support

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: paging.c: add more documentation on what the functions actua...

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: Change T3101 default from 10s to 3s.

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR

2017-12-11 Thread Harald Welte

Patch Set 3:

I think if Vadim wants to use it on the MS side, then it should go into 
libosmocodec or the like, at elast the ecu_fr.[ch] code.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR

2017-12-11 Thread Vadim Yanitskiy

Patch Set 3:

> At least I think that would make a lot of sense.
> Also the enumwith the bit offsets could be put in
> a header file so others can use it.

Sure, I am a potential user of this feature for the MS side ;)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


[PATCH] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API

2017-12-11 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5275

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

OsmoBsc: Introduce bts_is_connected API

This can be used by tests to wait until bts is successfully connected to
BSC.

Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
---
M src/osmo_gsm_tester/osmo_bsc.py
1 file changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/75/5275/2

diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index 7424fb4..2c909bc 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -18,6 +18,7 @@
 # along with this program.  If not, see .
 
 import os
+import re
 import pprint
 
 from . import log, util, config, template, process, osmo_ctrl, pcap_recorder
@@ -108,7 +109,45 @@
 self.bts.append(bts)
 bts.set_bsc(self)
 
+def bts_num(self, bts):
+'Provide number id used by OsmoNITB to identify configured BTS'
+# We take advantage from the fact that VTY code assigns VTY in 
ascending
+# order through the bts nodes found. As we populate the config 
iterating
+# over this list, we have a 1:1 match in indexes.
+return self.bts.index(bts)
+
+def bts_is_connected(self, bts):
+return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts))
+
 def running(self):
 return not self.process.terminated()
 
+
+class OsmoBscCtrl(log.Origin):
+PORT = 4249
+BTS_OML_STATE_VAR = "bts.%d.oml-connection-state"
+BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) 
bts.\d+.oml-connection-state (?P\w+)")
+
+def __init__(self, bsc):
+self.bsc = bsc
+super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), 
OsmoBscCtrl.PORT))
+
+def ctrl(self):
+return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT)
+
+def bts_is_connected(self, bts_num):
+with self.ctrl() as ctrl:
+ctrl.do_get(OsmoBscCtrl.BTS_OML_STATE_VAR % bts_num)
+data = ctrl.receive()
+while (len(data) > 0):
+(answer, data) = ctrl.remove_ipa_ctrl_header(data)
+answer_str = answer.decode('utf-8')
+answer_str = answer_str.replace('\n', ' ')
+res = OsmoBscCtrl.BTS_OML_STATE_RE.match(answer_str)
+if res:
+oml_state = str(res.group('oml_state'))
+if oml_state == 'connected':
+return True
+return False
+
 # vim: expandtab tabstop=4 shiftwidth=4

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS...

2017-12-11 Thread Max

Patch Set 1: -Code-Review

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

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


[PATCH] osmo-bsc[master]: Reduce T3109 from 19s to 5s

2017-12-11 Thread Harald Welte

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

Reduce T3109 from 19s to 5s

T3109 is started when the BSS sends a RR CHAN REL to the MS and stops
downlink SACCH generation. Stopped when the MS successfully releases the
LAPDm link. After stop or timeout, the radio channel is released using
RSL RF CHAN REL.

Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or
5s, while we had the absurdly high 19s timeout.  This means we occupy
the radio channel way longer than needed in situations where the MS is
no longer able to properly release Layer2 (LAPDm DISC) due to loss of
signal or the like.

See also: https://osmocom.org/projects/osmobsc/wiki/Timers

Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a
Closes: OS#2734
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index a6c8198..ba3b217 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -266,7 +266,7 @@
 #define GSM_T3103_DEFAULT 5/* s */
 #define GSM_T3105_DEFAULT 100  /* ms */
 #define GSM_T3107_DEFAULT 5/* s */
-#define GSM_T3109_DEFAULT 19   /* s, must be 2s + radio_link_timeout*0.48 */
+#define GSM_T3109_DEFAULT 5/* s, must be 2s + radio_link_timeout*0.48 */
 #define GSM_T3111_DEFAULT 2/* s */
 #define GSM_T3113_DEFAULT 60
 #define GSM_T3115_DEFAULT 10

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

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


[PATCH] osmo-bsc[master]: paging.c: add more documentation on what the functions actua...

2017-12-11 Thread Harald Welte

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

paging.c: add more documentation on what the functions actually do

This was created during code review towards some upcoming fix for
OS#2736. However, it's not really related to that.

Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc
---
M src/libbsc/paging.c
1 file changed, 45 insertions(+), 4 deletions(-)


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

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index b8f9043..41e134d 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -121,6 +121,10 @@
paging_handle_pending_requests(paging_bts);
 }
 
+/*! count the number of free channels for given RSL channel type required
+ * \param[in] BTS on which we shall count
+ * \param[in] rsl_type the RSL channel needed type
+ * \returns number of free channels matching \a rsl_type in \a bts */
 static int can_send_pag_req(struct gsm_bts *bts, int rsl_type)
 {
struct pchan_load pl;
@@ -229,6 +233,7 @@
paging_handle_pending_requests(paging_bts);
 }
 
+/*! initialize the bts paging state, if it hasn't been initialized yet */
 static void paging_init_if_needed(struct gsm_bts *bts)
 {
if (bts->paging.bts)
@@ -243,6 +248,7 @@
bts->paging.available_slots = 20;
 }
 
+/*! do we have any pending paging requests for given subscriber? */
 static int paging_pending_request(struct gsm_bts_paging_state *bts,
  struct bsc_subscr *bsub)
 {
@@ -256,6 +262,7 @@
return 0;   
 }
 
+/*! Call-back once T3113 (paging timeout) expires for given paging_request */
 static void paging_T3113_expired(void *data)
 {
struct gsm_paging_request *req = (struct gsm_paging_request *)data;
@@ -285,6 +292,13 @@
 
 }
 
+/*! Start paging + paging timer for given subscriber on given BTS
+ * \param bts BTS on which to page
+ * \param[in] bsub subscriber we want to page
+ * \param[in] type type of radio channel we're requirign
+ * \param[in] cbfn call-back function to call once we see paging response
+ * \param[in] data user-data to pass to \a cbfn on paging response
+ * \returns 0 on success, negative on error */
 static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub,
   int type, gsm_cbfn *cbfn, void *data)
 {
@@ -300,6 +314,7 @@
LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %s on bts %d.\n",
 bsc_subscr_name(bsub), bts->nr);
req = talloc_zero(tall_paging_ctx, struct gsm_paging_request);
+   OSMO_ASSERT(req);
req->bsub = bsc_subscr_get(bsub);
req->bts = bts;
req->chan_type = type;
@@ -313,6 +328,13 @@
return 0;
 }
 
+/*! Handle PAGING request from MSC for one (matching) BTS
+ * \param bts BTS on which to page
+ * \param[in] bsub subscriber we want to page
+ * \param[in] type type of radio channel we're requirign
+ * \param[in] cbfn call-back function to call once we see paging response
+ * \param[in] data user-data to pass to \a cbfn on paging response
+ * returns 1 on success; 0 in case of error (e.g. TRX down) */
 int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub,
   int type, gsm_cbfn *cbfn, void *data)
 {
@@ -332,6 +354,13 @@
return 1;
 }
 
+/*! Receive a new PAGING request from the MSC
+ * \param network gsm_network we operate in
+ * \param[in] bsub subscriber we want to page
+ * \param[in] type type of radio channel we're requirign
+ * \param[in] cbfn call-back function to call once we see paging response
+ * \param[in] data user-data to pass to \a cbfn on paging response
+ * \returns number of BTSs on which we issued the paging */
 int paging_request(struct gsm_network *network, struct bsc_subscr *bsub,
   int type, gsm_cbfn *cbfn, void *data)
 {
@@ -364,6 +393,13 @@
 }
 
 
+/*! Stop paging a given subscriber on a given BTS.
+ *  If \a conn is non-NULL, we also call the paging call-back function
+ *  to notify the paging originator that paging has completed.
+ * \param[in] bts BTS on which we shall stop paging
+ * \param[in] bsub subscriber which we shall stop paging
+ * \param[in] conn connection to the subscriber (if any)
+ * \param[in] msg message received from subscrbier (if any) */
 /* we consciously ignore the type of the request here */
 static void _paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub,
 struct gsm_subscriber_connection *conn,
@@ -395,7 +431,11 @@
}
 }
 
-/* Stop paging on all other bts' */
+/*! Stop paging on all other bts'
+ * \param[in] bts_list list of BTSs to iterate
+ * \param[in] _bts BTS which has received a paging response
+ * \param[in] bsub subscriber
+ * \param[in] msgb L3 message that we have received from \a bsub on \a _bts */
 void paging_request_stop(struct llist_head *bts_list,
 struct gsm_bts *_bts, struct bsc_subscr *bsub,
 struct gsm_subscriber_connection 

[PATCH] osmo-bsc[master]: paging: Remove obsolete paging call-back support

2017-12-11 Thread Harald Welte

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

paging: Remove obsolete paging call-back support

The call-back was needed inside the NITB to determine which part (CC,
SMS, ...) had triggered a given paging.   A pure BSC doesn't need that
feature, so let's get rid of it.

The 'void *cbfn_data' is replaced with a 'struct bsc_msc_data *', as
all callers use it with that type.

Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab
---
M include/osmocom/bsc/paging.h
M src/libbsc/paging.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_grace.c
4 files changed, 28 insertions(+), 54 deletions(-)


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

diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h
index e917772..533f366 100644
--- a/include/osmocom/bsc/paging.h
+++ b/include/osmocom/bsc/paging.h
@@ -29,6 +29,8 @@
 #include 
 #include 
 
+struct bsc_msc_data;
+
 /**
  * A pending paging request
  */
@@ -49,16 +51,15 @@
/* How often did we ask the BTS to page? */
int attempts;
 
-   /* callback to be called in case paging completes */
-   gsm_cbfn *cbfn;
-   void *cbfn_param;
+   /* MSC that has issued this paging */
+   struct bsc_msc_data *msc;
 };
 
 /* schedule paging request */
-int paging_request(struct gsm_network *network, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
-int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
+int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int 
type,
+  struct bsc_msc_data *msc);
+int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type,
+   struct bsc_msc_data *msc);
 
 /* stop paging requests */
 void paging_request_stop(struct llist_head *bts_list,
@@ -72,6 +73,6 @@
 /* pending paging requests */
 unsigned int paging_pending_requests_nr(struct gsm_bts *bts);
 
-void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub);
+struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr 
*bsub);
 
 #endif
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 41e134d..f4679de 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -266,9 +266,6 @@
 static void paging_T3113_expired(void *data)
 {
struct gsm_paging_request *req = (struct gsm_paging_request *)data;
-   void *cbfn_param;
-   gsm_cbfn *cbfn;
-   int msg;
 
log_set_context(LOG_CTX_BSC_SUBSCR, req->bsub);
 
@@ -277,30 +274,19 @@
 
/* must be destroyed before calling cbfn, to prevent double free */
rate_ctr_inc(>bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]);
-   cbfn_param = req->cbfn_param;
-   cbfn = req->cbfn;
-
-   /* did we ever manage to page the subscriber */
-   msg = req->attempts > 0 ? GSM_PAGING_EXPIRED : GSM_PAGING_BUSY;
 
/* destroy it now. Do not access req afterwards */
paging_remove_request(>bts->paging, req);
-
-   if (cbfn)
-   cbfn(GSM_HOOK_RR_PAGING, msg, NULL, NULL,
- cbfn_param);
-
 }
 
 /*! Start paging + paging timer for given subscriber on given BTS
  * \param bts BTS on which to page
  * \param[in] bsub subscriber we want to page
  * \param[in] type type of radio channel we're requirign
- * \param[in] cbfn call-back function to call once we see paging response
- * \param[in] data user-data to pass to \a cbfn on paging response
+ * \param[in] msc MSC which has issue this paging
  * \returns 0 on success, negative on error */
-static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data)
+static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, int 
type,
+  struct bsc_msc_data *msc)
 {
struct gsm_bts_paging_state *bts_entry = >paging;
struct gsm_paging_request *req;
@@ -318,8 +304,7 @@
req->bsub = bsc_subscr_get(bsub);
req->bts = bts;
req->chan_type = type;
-   req->cbfn = cbfn;
-   req->cbfn_param = data;
+   req->msc = msc;
osmo_timer_setup(>T3113, paging_T3113_expired, req);
osmo_timer_schedule(>T3113, bts->network->T3113, 0);
llist_add_tail(>entry, _entry->pending_requests);
@@ -332,11 +317,10 @@
  * \param bts BTS on which to page
  * \param[in] bsub subscriber we want to page
  * \param[in] type type of radio channel we're requirign
- * \param[in] cbfn call-back function to call once we see paging response
- * \param[in] data user-data to pass to \a cbfn on paging response
+ * \param[in] msc MSC which has issue this paging
  * returns 1 on success; 0 in case of error (e.g. TRX down) */
-int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data)
+int paging_request_bts(struct gsm_bts *bts, struct 

[PATCH] osmo-bsc[master]: paging: Stop all paging if MSC sends us BSSMAP RESET

2017-12-11 Thread Harald Welte

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

paging: Stop all paging if MSC sends us BSSMAP RESET

When the MSC has lost its state and issues a RESET, we should not only
clear all ongoing radio connections, but we should also stop any paging.
There's no point in paging a subscriber if the MSC doesn't know about
this paging anymore.

Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700
Closes: OS#2736
---
M include/osmocom/bsc/paging.h
M src/libbsc/paging.c
M src/osmo-bsc/osmo_bsc_bssap.c
3 files changed, 29 insertions(+), 0 deletions(-)


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

diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h
index 533f366..2b1bc50 100644
--- a/include/osmocom/bsc/paging.h
+++ b/include/osmocom/bsc/paging.h
@@ -75,4 +75,7 @@
 
 struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr 
*bsub);
 
+void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc);
+void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc);
+
 #endif
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index f4679de..8d54d0a 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -467,3 +467,26 @@
 
return NULL;
 }
+
+/*! Flush all paging requests at a given BTS for a given MSC*/
+void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc)
+{
+   struct gsm_paging_request *req, *req2;
+
+   llist_for_each_entry_safe(req, req2, >paging.pending_requests, 
entry) {
+   if (msc && req->msc != msc)
+   continue;
+   /* now give up the data structure */
+   LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d (flush).\n", 
req->bsub->imsi, bts->nr);
+   paging_remove_request(>paging, req);
+   }
+}
+
+/*! Flush all paging requests issued by \a msc on any BTS in \a net */
+void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc)
+{
+   struct gsm_bts *bts;
+
+   llist_for_each_entry(bts, >bts_list, list)
+   paging_flush_bts(bts, msc);
+}
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 73776ad..051b74e 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -218,6 +218,9 @@
 * close all active channels on the BTS side as well */
osmo_bsc_sigtran_reset(msc);
 
+   /* Drop all ongoing paging requests that this MSC has created on any 
BTS */
+   paging_flush_network(msc->network, msc);
+
/* Inform the MSC that we have received the reset request and
 * that we acted accordingly */
osmo_bsc_sigtran_tx_reset_ack(msc);

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

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


osmo-pcu[master]: TBF: implement independent T31xx timers

2017-12-11 Thread Max

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/5158/5/src/tbf.cpp
File src/tbf.cpp:

Line 478:   tbf->stop_timers("freeing TBF");
> This is pretty confusing. Can we rename this one to "stop_all_timers" ? Fur
That's fixed in follow-up patches which remove stop_timer() entirely.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7
Gerrit-PatchSet: 5
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-pcu[master]: TBF: implement independent T31xx timers

2017-12-11 Thread Pau Espin Pedrol

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/5158/5/src/tbf.cpp
File src/tbf.cpp:

Line 478:   tbf->stop_timers("freeing TBF");
This is pretty confusing. Can we rename this one to "stop_all_timers" ? 
Furthermore, afaiu the line above "stop_timer" can be removed because this line 
is removing all of them.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7
Gerrit-PatchSet: 5
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


[ABANDON] libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node

2017-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: logging vty: add 'logging set-log-mask' command to log node
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node

2017-12-11 Thread Neels Hofmeyr

Patch Set 1:

ah ok. I saw it as a convenient shorthand to set a couple of categories in a 
single line...

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

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


python/osmo-python-tests[master]: Fix python3 compatibility

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


python/osmo-python-tests[master]: Use setuptools for packaging

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


python/osmo-python-tests[master]: Add python 3 support to jenkins tests

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5281/1/contrib/jenkins.sh
File contrib/jenkins.sh:

Line 12: python3 setup.py install --root build/install
install.py3?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


python/osmo-python-tests[master]: Use setuptools for packaging

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1:

Worth checking if there's any documenttion (README?) specifying dependencies 
required to build/install this repository. They may need updating.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


python/osmo-python-tests[master]: Move scripts to appropriate directory

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/5278/1/osmopy/__init__.py
File osmopy/__init__.py:

Line 4: __all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl']
Shouldn't osmo_ctrl be moved too? AFAIU it's a script and not a lib.


https://gerrit.osmocom.org/#/c/5278/1/setup.py
File setup.py:

Line 31:   "scripts/osmo_verify_transcript_ctrl.py"]
Do they end up installed in the same place as before? otherwise jobs using this 
scripts require changing some paths I guess.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-pcu[master]: TBF: implement independent T31xx timers

2017-12-11 Thread Max

Patch Set 5:

I've addressed the part regarding copy-pasted code. I can convert it to static 
c++ class if necessary although I'm no c++ expert - that's why I've opted for 
simple c-style array instead at first.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7
Gerrit-PatchSet: 5
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: Generate SI2bis Rest Octets

2017-12-11 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5272

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

Generate SI2bis Rest Octets

According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
accordingly.

Related: OS#2711
Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/5

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index ba25b6d..f7ad682 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -10,6 +10,7 @@
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
 int rest_octets_si2ter(uint8_t *data);
+int rest_octets_si2bis(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index b8a29ba..9f2b4c0 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -478,6 +478,20 @@
return bv.data_len;
 }
 
+/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */
+int rest_octets_si2bis(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 1;
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
+
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
 {
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 4575454..a04959d 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -739,7 +739,10 @@
 
si2b->rach_control = bts->si_common.rach_control;
 
-   return sizeof(*si2b);
+   /* SI2bis Rest Octets as per 3GPP TS 44.018 §10.5.2.33 */
+   rc = rest_octets_si2bis(si2b->rest_octets);
+
+   return sizeof(*si2b) + rc;
 }
 
 static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 868cd9b..536287c 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -203,7 +203,7 @@
 generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 
60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
 SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-ci[master]: Add osmo-python-tests to gerrit verification

2017-12-11 Thread Max

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

Add osmo-python-tests to gerrit verification

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


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

diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index a7df5f3..12269fc 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -157,6 +157,8 @@
 (with_vty == "yes" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="origin/nrw/litecell15-next") ||
 (with_vty == "no" && with_dsp == "none" && 
FIRMWARE_VERSION=="master")
 
+  - osmo-python-tests
+
   - osmo-sgsn:
   concurrent: true
   a1_name: IU

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] python/osmo-python-tests[master]: Add basic CI integration

2017-12-11 Thread Max

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

Add basic CI integration

Add jenkins.sh which perform trivial build/install tests with both
python 2 to make sure we do not break smth accidentially.

Note: python 3 tests require osmopy fixes so it will be implemented in
follow-up patches.

Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb
---
M .gitignore
A contrib/jenkins.sh
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/77/5277/1

diff --git a/.gitignore b/.gitignore
index 766f495..e78ea1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 osmopython.egg-info/
+build/
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
new file mode 100755
index 000..1bf22fc
--- /dev/null
+++ b/contrib/jenkins.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -ex
+
+rm -rf build
+
+python2 setup.py build
+python2 setup.py install --root build/install.py2
+
+# TODO: add more tests

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] python/osmo-python-tests[master]: Use setuptools for packaging

2017-12-11 Thread Max

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

Use setuptools for packaging

According to https://docs.python.org/3/library/distutils.html the
setuptools are used in place of distutils anyway. Using it directly
allows us to make packaging more flexible: specify dependencies,
automatically fin package name etc.

Change-Id: I39ee53f352001e47c6df055cbec52d638480253d
---
M osmopy/__init__.py
M setup.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/79/5279/1

diff --git a/osmopy/__init__.py b/osmopy/__init__.py
index 20a21c9..c94d70b 100644
--- a/osmopy/__init__.py
+++ b/osmopy/__init__.py
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
-__version__ = '0.0.3'
+__version__ = '0.0.4'
 
 __all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl']
diff --git a/setup.py b/setup.py
index 76886ae..533272e 100755
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see .
 
-from distutils.core import setup
+from setuptools import setup, find_packages
 from osmopy import __version__
 import sys
 
@@ -33,7 +33,7 @@
 setup(
 name = 'osmopython',
 version = __version__,
-packages = ["osmopy"],
+packages = find_packages(),
 scripts = scripts,
 license = "AGPLv3",
 description = "Osmopython: osmocom testing scripts",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] python/osmo-python-tests[master]: Add python 3 support to jenkins tests

2017-12-11 Thread Max

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

Add python 3 support to jenkins tests

Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1
---
M contrib/jenkins.sh
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/81/5281/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 1bf22fc..d04bc47 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -4,7 +4,11 @@
 
 rm -rf build
 
+# FIXME: remove once python 2 support is deprecated
 python2 setup.py build
 python2 setup.py install --root build/install.py2
 
+python3 setup.py build
+python3 setup.py install --root build/install
+
 # TODO: add more tests

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory

2017-12-11 Thread Max

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

Move scripts to appropriate directory

Having the scripts in the same directory with library code means that
it'll be installed unconditionally regardless of version check in
setup.py which makes it impossible to write proper version-specific
tests. Fix this by moving the scripts into separate directory and
adjusting init and setup files accordingly.

This is necessary for implementing proper CI tests in follow-up patches.

Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db
---
M osmopy/__init__.py
R scripts/osmo_interact_common.py
R scripts/osmo_interact_ctrl.py
R scripts/osmo_interact_vty.py
R scripts/osmo_verify_transcript_ctrl.py
R scripts/osmo_verify_transcript_vty.py
R scripts/osmodumpdoc.py
R scripts/osmotestconfig.py
R scripts/osmotestvty.py
R scripts/soap.py
R scripts/twisted_ipa.py
M setup.py
12 files changed, 10 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/78/5278/1

diff --git a/osmopy/__init__.py b/osmopy/__init__.py
index b760111..20a21c9 100644
--- a/osmopy/__init__.py
+++ b/osmopy/__init__.py
@@ -1,14 +1,4 @@
 #!/usr/bin/env python
-__version__ = '0.0.2'
+__version__ = '0.0.3'
 
-__all__ = ['obscvty',  'osmodumpdoc',  'osmotestconfig',  'osmotestvty',
-   'osmoutil',
-   'osmo_ipa',
-   'osmo_ctrl',
-   'soap',
-   'twisted_ipa',
-   'osmo_interact_common',
-   'osmo_interact_vty',
-   'osmo_interact_ctrl',
-   'osmo_verify_transcript_vty',
-   'osmo_verify_transcript_ctrl']
+__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl']
diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py
similarity index 100%
rename from osmopy/osmo_interact_common.py
rename to scripts/osmo_interact_common.py
diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py
similarity index 100%
rename from osmopy/osmo_interact_ctrl.py
rename to scripts/osmo_interact_ctrl.py
diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py
similarity index 100%
rename from osmopy/osmo_interact_vty.py
rename to scripts/osmo_interact_vty.py
diff --git a/osmopy/osmo_verify_transcript_ctrl.py 
b/scripts/osmo_verify_transcript_ctrl.py
similarity index 100%
rename from osmopy/osmo_verify_transcript_ctrl.py
rename to scripts/osmo_verify_transcript_ctrl.py
diff --git a/osmopy/osmo_verify_transcript_vty.py 
b/scripts/osmo_verify_transcript_vty.py
similarity index 100%
rename from osmopy/osmo_verify_transcript_vty.py
rename to scripts/osmo_verify_transcript_vty.py
diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py
similarity index 100%
rename from osmopy/osmodumpdoc.py
rename to scripts/osmodumpdoc.py
diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py
similarity index 100%
rename from osmopy/osmotestconfig.py
rename to scripts/osmotestconfig.py
diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py
similarity index 100%
rename from osmopy/osmotestvty.py
rename to scripts/osmotestvty.py
diff --git a/osmopy/soap.py b/scripts/soap.py
similarity index 100%
rename from osmopy/soap.py
rename to scripts/soap.py
diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py
similarity index 100%
rename from osmopy/twisted_ipa.py
rename to scripts/twisted_ipa.py
diff --git a/setup.py b/setup.py
index 3e147c4..76886ae 100755
--- a/setup.py
+++ b/setup.py
@@ -20,17 +20,15 @@
 import sys
 
 if sys.version_info.major == 2:
-   scripts = ["osmopy/osmodumpdoc.py",  "osmopy/osmotestconfig.py",
-  "osmopy/osmotestvty.py"]
+   scripts = ["scripts/osmodumpdoc.py",  "scripts/osmotestconfig.py",
+  "scripts/osmotestvty.py"]
 elif sys.version_info.major == 3:
-   scripts = ["osmopy/osmo_interact_vty.py",
-  "osmopy/osmo_interact_ctrl.py",
-  "osmopy/soap.py",
-  "osmopy/osmo_ctrl.py",
-  "osmopy/osmo_ipa.py",
-  "osmopy/twisted_ipa.py",
-  "osmopy/osmo_verify_transcript_vty.py",
-  "osmopy/osmo_verify_transcript_ctrl.py"]
+   scripts = ["scripts/osmo_interact_vty.py",
+  "scripts/osmo_interact_ctrl.py",
+  "scripts/soap.py",
+  "scripts/twisted_ipa.py",
+  "scripts/osmo_verify_transcript_vty.py",
+  "scripts/osmo_verify_transcript_ctrl.py"]
 
 setup(
 name = 'osmopython',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing

2017-12-11 Thread Pau Espin Pedrol

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

suites: Wait for BTS to connect to BSC before continuing

Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
---
M suites/aoip_debug/interactive.py
M suites/aoip_encryption/register_a5_0_authopt.py
M suites/aoip_encryption/register_a5_0_authreq.py
M suites/aoip_encryption/register_a5_1_authreq.py
M suites/aoip_smpp/esme_ms_sms_storeforward.py
M suites/aoip_smpp/esme_ms_sms_transaction.py
M suites/aoip_sms/mo_mt_sms.py
M suites/aoip_ussd/assert_extension.py
M suites/debug/interactive.py
M suites/gprs/ping.py
M suites/netreg/register.py
M suites/netreg/register_default.py
M suites/smpp/esme_ms_sms_storeforward.py
M suites/smpp/esme_ms_sms_transaction.py
M suites/sms/mo_mt_sms.py
M suites/ussd/assert_extension.py
M suites/voice/mo_mt_call.py
17 files changed, 18 insertions(+), 0 deletions(-)


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

diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py
index 312083a..b08bac1 100755
--- a/suites/aoip_debug/interactive.py
+++ b/suites/aoip_debug/interactive.py
@@ -26,6 +26,8 @@
 bsc.start()
 
 bts.start()
+print('Waiting for bts to connect to bsc...')
+wait(bsc.bts_is_connected, bts)
 print('Waiting for bts to be ready...')
 wait(bts.ready_for_pcu)
 pcu.start()
diff --git a/suites/aoip_encryption/register_a5_0_authopt.py 
b/suites/aoip_encryption/register_a5_0_authopt.py
index 75614e2..6a06078 100755
--- a/suites/aoip_encryption/register_a5_0_authopt.py
+++ b/suites/aoip_encryption/register_a5_0_authopt.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_encryption/register_a5_0_authreq.py 
b/suites/aoip_encryption/register_a5_0_authreq.py
index 07293d2..d6c67ea 100755
--- a/suites/aoip_encryption/register_a5_0_authreq.py
+++ b/suites/aoip_encryption/register_a5_0_authreq.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_encryption/register_a5_1_authreq.py 
b/suites/aoip_encryption/register_a5_1_authreq.py
index 190e5bb..b2c446f 100755
--- a/suites/aoip_encryption/register_a5_1_authreq.py
+++ b/suites/aoip_encryption/register_a5_1_authreq.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py 
b/suites/aoip_smpp/esme_ms_sms_storeforward.py
index 79c570e..9effe6d 100755
--- a/suites/aoip_smpp/esme_ms_sms_storeforward.py
+++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py
@@ -32,6 +32,7 @@
 mgw_bsc.start()
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 esme.connect()
 hlr.subscriber_add(ms)
diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py 
b/suites/aoip_smpp/esme_ms_sms_transaction.py
index e20b2b6..190879d 100755
--- a/suites/aoip_smpp/esme_ms_sms_transaction.py
+++ b/suites/aoip_smpp/esme_ms_sms_transaction.py
@@ -30,6 +30,7 @@
 mgw_bsc.start()
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 esme.connect()
 hlr.subscriber_add(ms)
diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py
index 76b7e51..6ce460f 100755
--- a/suites/aoip_sms/mo_mt_sms.py
+++ b/suites/aoip_sms/mo_mt_sms.py
@@ -21,6 +21,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 hlr.subscriber_add(ms_mo)
 hlr.subscriber_add(ms_mt)
diff --git a/suites/aoip_ussd/assert_extension.py 
b/suites/aoip_ussd/assert_extension.py
index 181f07f..5969b01 100755
--- a/suites/aoip_ussd/assert_extension.py
+++ b/suites/aoip_ussd/assert_extension.py
@@ -22,6 +22,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 hlr.subscriber_add(ms)
 
diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py
index 6df5b6d..595cfd9 100755
--- a/suites/debug/interactive.py
+++ b/suites/debug/interactive.py
@@ -10,6 +10,7 @@
 nitb.bts_add(bts)
 nitb.start()
 bts.start()
+wait(nitb.bts_is_connected, bts)
 
 for m in modems:
   nitb.subscriber_add(m)
diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
index 46ab540..b1113d6 100755
--- a/suites/gprs/ping.py
+++ b/suites/gprs/ping.py
@@ -27,6 +27,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 print('Waiting for bts to be ready...')
 wait(bts.ready_for_pcu)
 pcu.start()
diff --git a/suites/netreg/register.py b/suites/netreg/register.py
index 9807d2b..d5fbeb7 100755
--- a/suites/netreg/register.py
+++ b/suites/netreg/register.py
@@ -10,6 +10,7 @@
 nitb.bts_add(bts)
 nitb.start()
 bts.start()
+wait(nitb.bts_is_connected, bts)
 
 nitb.subscriber_add(ms)
 
diff --git a/suites/netreg/register_default.py 
b/suites/netreg/register_default.py
index 797b2c1..545525d 100755
--- a/suites/netreg/register_default.py
+++ b/suites/netreg/register_default.py
@@ -10,6 +10,7 @@
 nitb.bts_add(bts)
 nitb.start()
 bts.start()

[PATCH] osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API

2017-12-11 Thread Pau Espin Pedrol

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

OsmoNitb: Introduce bts_is_connected API

This can be used by tests to wait until bts is successfully connected to
NITB.

Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
---
M src/osmo_gsm_tester/osmo_nitb.py
1 file changed, 27 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py
index 6dd7342..48037a6 100644
--- a/src/osmo_gsm_tester/osmo_nitb.py
+++ b/src/osmo_gsm_tester/osmo_nitb.py
@@ -114,6 +114,13 @@
 def mcc_mnc(self):
 return (self.mcc(), self.mnc())
 
+def bts_num(self, bts):
+'Provide number id used by OsmoNITB to identify configured BTS'
+# We take advantage from the fact that VTY code assigns VTY in 
ascending
+# order through the bts nodes found. As we populate the config 
iterating
+# over this list, we have a 1:1 match in indexes.
+return self.bts.index(bts)
+
 def subscriber_add(self, modem, msisdn=None, algo=None):
 if msisdn is None:
 msisdn = self.suite_run.resources_pool.next_msisdn(modem)
@@ -148,6 +155,9 @@
 def imsi_list_attached(self):
 return OsmoNitbCtrl(self).subscriber_list_active()
 
+def bts_is_connected(self, bts):
+return OsmoNitbCtrl(self).bts_is_connected(self.bts_num(bts))
+
 def running(self):
 return not self.process.terminated()
 
@@ -159,6 +169,8 @@
 SUBSCR_DELETE_VAR = 'subscriber-delete-v1'
 SUBSCR_DELETE_REPLY_RE = re.compile("SET_REPLY (\d+) %s Removed" % 
SUBSCR_DELETE_VAR)
 SUBSCR_LIST_ACTIVE_VAR = 'subscriber-list-active-v1'
+BTS_OML_STATE_VAR = "bts.%d.oml-connection-state"
+BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) 
bts.\d+.oml-connection-state (?P\w+)")
 
 def __init__(self, nitb):
 self.nitb = nitb
@@ -210,4 +222,19 @@
 aslist_str = answer_str
 return aslist_str
 
+def bts_is_connected(self, bts_num):
+with self.ctrl() as ctrl:
+ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num)
+data = ctrl.receive()
+while (len(data) > 0):
+(answer, data) = ctrl.remove_ipa_ctrl_header(data)
+answer_str = answer.decode('utf-8')
+answer_str = answer_str.replace('\n', ' ')
+res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str)
+if res:
+oml_state = str(res.group('oml_state'))
+if oml_state == 'connected':
+return True
+return False
+
 # vim: expandtab tabstop=4 shiftwidth=4

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

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


[PATCH] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API

2017-12-11 Thread Pau Espin Pedrol

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

OsmoBsc: Introduce bts_is_connected API

This can be used by tests to wait until bts is successfully connected to
BSC.

Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
---
M src/osmo_gsm_tester/osmo_bsc.py
1 file changed, 39 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index 7424fb4..adea4ee 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -18,6 +18,7 @@
 # along with this program.  If not, see .
 
 import os
+import re
 import pprint
 
 from . import log, util, config, template, process, osmo_ctrl, pcap_recorder
@@ -108,7 +109,45 @@
 self.bts.append(bts)
 bts.set_bsc(self)
 
+def bts_num(self, bts):
+'Provide number id used by OsmoNITB to identify configured BTS'
+# We take advantage from the fact that VTY code assigns VTY in 
ascending
+# order through the bts nodes found. As we populate the config 
iterating
+# over this list, we have a 1:1 match in indexes.
+return self.bts.index(bts)
+
+def bts_is_connected(self, bts):
+return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts))
+
 def running(self):
 return not self.process.terminated()
 
+
+class OsmoBscCtrl(log.Origin):
+PORT = 4249
+BTS_OML_STATE_VAR = "bts.%d.oml-connection-state"
+BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) 
bts.\d+.oml-connection-state (?P\w+)")
+
+def __init__(self, bsc):
+self.bsc = bsc
+super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), 
OsmoBscCtrl.PORT))
+
+def ctrl(self):
+return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT)
+
+def bts_is_connected(self, bts_num):
+with self.ctrl() as ctrl:
+ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num)
+data = ctrl.receive()
+while (len(data) > 0):
+(answer, data) = ctrl.remove_ipa_ctrl_header(data)
+answer_str = answer.decode('utf-8')
+answer_str = answer_str.replace('\n', ' ')
+res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str)
+if res:
+oml_state = str(res.group('oml_state'))
+if oml_state == 'connected':
+return True
+return False
+
 # vim: expandtab tabstop=4 shiftwidth=4

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

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


[ABANDON] osmo-gsm-tester[master]: Verify that BTS successfully connects to NITB

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

Change subject: Verify that BTS successfully connects to NITB
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I1bbf9ac2b05d95a113ed4ad5e93093431496d44e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Pau Espin Pedrol
Hello Harald Welte,

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

https://gerrit.osmocom.org/5270

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

osmo_ctrl.py: Set shebang to use python v2

Nowadays bin/python usually points to python3, and this script is written
in python2, which means if run directly from terminal it will fail with
some print syntax errors.

Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
---
M osmopy/osmo_ctrl.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/70/5270/2

diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py
index 003f100..2b8c4be 100755
--- a/osmopy/osmo_ctrl.py
+++ b/osmopy/osmo_ctrl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 # -*- mode: python-mode; py-indent-tabs-mode: nil -*-
 """
 /*

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-bsc[master]: Change T3101 default from 10s to 3s.

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1:

> let's give this one some testing before it gets merged.  @pespin:
 > do you want to give it a shot in osmo-gsm-tester? Or should we just
 > mrge it and revert if we see unexpected trouble?

It's easier in terms of time for me to just merge it and revert if we see any 
problem. Otherwise I need to push it to a branch, build trials manually in a 
job, launch them in a job, etc.

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

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


python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] libosmocore[master]: Add functions for extended RACH coding

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

Change subject: Add functions for extended RACH coding
..


Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 17
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Harald Welte

Patch Set 1:

> > why?
 > 
 > Because thescript is writen in python v2, and "python" points to
 > "python3" in distros nowadays. Which means if I run it in the
 > terminal with "./osmo_ctrl.py" it will fail because it will use
 > python3 and it will find syntax errors in print.

I meant the reason should be in the commitlog. but nevermind.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-bts[master]: cosmetic: tests/power: remove unused var "ret"

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

Change subject: cosmetic: tests/power: remove unused var "ret"
..


cosmetic: tests/power: remove unused var "ret"

remove unused variable "ret" in unit test "power"

Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4
---
M tests/power/power_test.c
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index 3099217..295f638 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -39,7 +39,6 @@
struct gsm_bts_trx trx;
struct gsm_bts_trx_ts ts;
struct gsm_lchan *lchan;
-   int ret;
 
memset(, 0, sizeof(bts));
memset(, 0, sizeof(btsb));

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-bts[master]: cosmetic: tests/agch: remove unused var "static_ilv"

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

Change subject: cosmetic: tests/agch: remove unused var "static_ilv"
..


cosmetic: tests/agch: remove unused var "static_ilv"

remove unused const variable "static_ilv" from unit test "agch"

Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1
---
M tests/agch/agch_test.c
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c
index 7c4e6cd..b5094af 100644
--- a/tests/agch/agch_test.c
+++ b/tests/agch/agch_test.c
@@ -31,10 +31,6 @@
 static struct gsm_bts *bts;
 static struct gsm_bts_role_bts *btsb;
 
-static const uint8_t static_ilv[] = {
-   0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19
-};
-
 static int count_imm_ass_rej_refs(struct gsm48_imm_ass_rej *rej)
 {
int count = 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-bsc[master]: Change T3101 default from 10s to 3s.

2017-12-11 Thread Harald Welte

Patch Set 1:

let's give this one some testing before it gets merged.  @pespin: do you want 
to give it a shot in osmo-gsm-tester? Or should we just mrge it and revert if 
we see unexpected trouble?

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

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


python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Pau Espin Pedrol

Patch Set 1:

> why?

Because thescript is writen in python v2, and "python" points to "python3" in 
distros nowadays. Which means if I run it in the terminal with "./osmo_ctrl.py" 
it will fail because it will use python3 and it will find syntax errors in 
print.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmocore[master]: Add functions for extended RACH coding

2017-12-11 Thread Harald Welte

Patch Set 17: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 17
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: No


osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB

2017-12-11 Thread Harald Welte

Patch Set 1:

> ok hold on, the RNC ID identifies the HNB-GW, not the RNC inside
 > the hNodeB, right? Looking at 25.469 9.2.26
 > 
 > RNC-ID Uniquely identifies the HNB-GW towards the CN on a
 > particular Iu interface.
 
If that's what the spec states, then that's how it is.

 > I was pretty sure that each hNodeB has its own RNC Id and was a bit confused 
 > why the hnbgw has to deal one out.

I think that's unrealistic, as you potentially have hundreds of thousands of 
femtocells, and the point of the HNB-GW is exactly to make the entire 
population of femtocells look as a classic UTRAN with a single or a few RNCs.

 > So the real solution then is in the iu client code to be able to
 > manage several LACs per RNC Id, i.e. being able to connect multiple
 > HNBGW each having one RNC Id, each in turn being able to serve
 > multiple hNodeBs with a different LAC each...

I'm not sure they actually would need unique LAC's either.  But I think at 
least in our case that's ok.

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

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


osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB

2017-12-11 Thread Harald Welte

Patch Set 1: Code-Review-1

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

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


python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Harald Welte

Patch Set 1:

why?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-bsc[master]: Generate SI2ter Rest Octets

2017-12-11 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


[MERGED] osmo-bts[master]: Fix malformed Resource Indication packet

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

Change subject: Fix malformed Resource Indication packet
..


Fix malformed Resource Indication packet

Wireshark was showing a Malformed packet alert, and further
ivnestigation showed that "Resource Information" TLV was missing in the
packet. See GSM 08.58 sections 8.6.1 and 9.3.21 for more information.

Indicating interference level is not yet implemented, but at least now
we avoid sending a malformed packet.

Patch has been validated against a running setup with wireshark in my local PC.

Related: OS#2735

Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 60f964e..88e240a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -252,6 +252,7 @@
if (!nmsg)
return -ENOMEM;
// FIXME: add interference levels of TRX
+   msgb_tlv_put(nmsg, RSL_IE_RESOURCE_INFO, 0, NULL);
rsl_trx_push_hdr(nmsg, RSL_MT_RF_RES_IND);
nmsg->trx = trx;
 

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

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


osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB

2017-12-11 Thread Neels Hofmeyr

Patch Set 1:

> I think qthis is just a hack that clutters around the assumption
 > that there is always only one lac per RNC :/

ok hold on, the RNC ID identifies the HNB-GW, not the RNC inside the hNodeB, 
right? Looking at 25.469 9.2.26

  RNC-ID Uniquely identifies the HNB-GW towards the CN on a particular Iu 
interface.

I was pretty sure that each hNodeB has its own RNC Id and was a bit confused 
why the hnbgw has to deal one out.

So the real solution then is in the iu client code to be able to manage several 
LACs per RNC Id, i.e. being able to connect multiple HNBGW each having one RNC 
Id, each in turn being able to serve multiple hNodeBs with a different LAC 
each...

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

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


osmo-bts[master]: Fix malformed Resource Indication packet

2017-12-11 Thread Max

Patch Set 1: Code-Review+1

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

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


[PATCH] osmo-bts[master]: Fix malformed Resource Indication packet

2017-12-11 Thread Pau Espin Pedrol

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

Fix malformed Resource Indication packet

Wireshark was showing a Malformed packet alert, and further
ivnestigation showed that "Resource Information" TLV was missing in the
packet. See GSM 08.58 sections 8.6.1 and 9.3.21 for more information.

Indicating interference level is not yet implemented, but at least now
we avoid sending a malformed packet.

Patch has been validated against a running setup with wireshark in my local PC.

Related: OS#2735

Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 60f964e..88e240a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -252,6 +252,7 @@
if (!nmsg)
return -ENOMEM;
// FIXME: add interference levels of TRX
+   msgb_tlv_put(nmsg, RSL_IE_RESOURCE_INFO, 0, NULL);
rsl_trx_push_hdr(nmsg, RSL_MT_RF_RES_IND);
nmsg->trx = trx;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-bsc[master]: Generate SI2bis Rest Octets

2017-12-11 Thread Max

Generate SI2bis Rest Octets

According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
accordingly.

Related: OS#2711
Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/4

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index ba25b6d..f7ad682 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -10,6 +10,7 @@
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
 int rest_octets_si2ter(uint8_t *data);
+int rest_octets_si2bis(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index b8a29ba..c323e42 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -478,6 +478,20 @@
return bv.data_len;
 }
 
+/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */
+int rest_octets_si2bis(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 1;
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
+
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
 {
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 4575454..a04959d 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -739,7 +739,10 @@
 
si2b->rach_control = bts->si_common.rach_control;
 
-   return sizeof(*si2b);
+   /* SI2bis Rest Octets as per 3GPP TS 44.018 §10.5.2.33 */
+   rc = rest_octets_si2bis(si2b->rest_octets);
+
+   return sizeof(*si2b) + rc;
 }
 
 static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 868cd9b..536287c 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -203,7 +203,7 @@
 generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 
60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
 SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation

2017-12-11 Thread Max

Fix SI2bis Rest Octets generation

According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
accordingly.

Related: OS#2711
Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/3

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index ba25b6d..f7ad682 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -10,6 +10,7 @@
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
 int rest_octets_si2ter(uint8_t *data);
+int rest_octets_si2bis(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index b8a29ba..c323e42 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -478,6 +478,20 @@
return bv.data_len;
 }
 
+/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */
+int rest_octets_si2bis(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 1;
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
+
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
 {
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 4575454..a04959d 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -739,7 +739,10 @@
 
si2b->rach_control = bts->si_common.rach_control;
 
-   return sizeof(*si2b);
+   /* SI2bis Rest Octets as per 3GPP TS 44.018 §10.5.2.33 */
+   rc = rest_octets_si2bis(si2b->rest_octets);
+
+   return sizeof(*si2b) + rc;
 }
 
 static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 868cd9b..536287c 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -203,7 +203,7 @@
 generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 
60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
 SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation

2017-12-11 Thread Max

Fix SI2bis Rest Octets generation

According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
accordingly.

Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 20 insertions(+), 2 deletions(-)


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

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index ba25b6d..f7ad682 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -10,6 +10,7 @@
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
 int rest_octets_si2ter(uint8_t *data);
+int rest_octets_si2bis(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index b8a29ba..c323e42 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -478,6 +478,20 @@
return bv.data_len;
 }
 
+/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */
+int rest_octets_si2bis(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 1;
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
+
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
 {
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 4575454..a04959d 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -739,7 +739,10 @@
 
si2b->rach_control = bts->si_common.rach_control;
 
-   return sizeof(*si2b);
+   /* SI2bis Rest Octets as per 3GPP TS 44.018 §10.5.2.33 */
+   rc = rest_octets_si2bis(si2b->rest_octets);
+
+   return sizeof(*si2b) + rc;
 }
 
 static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 868cd9b..536287c 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -203,7 +203,7 @@
 generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 
60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
 SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-bsc[master]: fi

2017-12-11 Thread Max
Max has abandoned this change.

Change subject: fi
..


Abandoned

Mistake submission.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I02ba838a17e5da37529d84efc6520629c8e06c5f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Generate SI2ter Rest Octets

2017-12-11 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5269

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

Generate SI2ter Rest Octets

Previously we simply omitted SI2ter Rest Octets which is spec violation
which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix
this by generating empty 'no rest octets' with proper padding. Adjust
test output accordingly.

Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94
Fixes: OS#2711
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 22 insertions(+), 2 deletions(-)


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

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index 876e0ab..ba25b6d 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -9,6 +9,7 @@
 /* generate SI1 rest octets */
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
+int rest_octets_si2ter(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index 7c6d7cd..b8a29ba 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -461,6 +461,22 @@
bitvec_set_bit(bv, L);
 }
 
+/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */
+int rest_octets_si2ter(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 4;
+
+   /* No SI2ter_MP_CHANGE_MARK */
+   bitvec_set_bit(, L);
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
 
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index c1b0d49..4575454 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -764,7 +764,10 @@
if (!n)
bts->si_valid &= ~(1 << SYSINFO_TYPE_2ter);
 
-   return sizeof(*si2t);
+   /* SI2ter Rest Octets as per 3GPP TS 44.018 §10.5.2.33a */
+   rc = rest_octets_si2ter(si2t->rest_octets);
+
+   return sizeof(*si2t) + rc;
 }
 
 /* SI2quater messages are optional - we only generate them when neighbor 
UARFCNs or EARFCNs are configured */
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 889f001..868cd9b 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -204,7 +204,7 @@
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

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


[PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation

2017-12-11 Thread Max

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

Fix SI2bis Rest Octets generation

According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
accordingly.

Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 20 insertions(+), 2 deletions(-)


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

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index ba25b6d..f7ad682 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -10,6 +10,7 @@
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
 int rest_octets_si2ter(uint8_t *data);
+int rest_octets_si2bis(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index b8a29ba..c323e42 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -478,6 +478,20 @@
return bv.data_len;
 }
 
+/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */
+int rest_octets_si2bis(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 1;
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
+
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
 {
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 4575454..a04959d 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -739,7 +739,10 @@
 
si2b->rach_control = bts->si_common.rach_control;
 
-   return sizeof(*si2b);
+   /* SI2bis Rest Octets as per 3GPP TS 44.018 §10.5.2.33 */
+   rc = rest_octets_si2bis(si2b->rest_octets);
+
+   return sizeof(*si2b) + rc;
 }
 
 static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 868cd9b..536287c 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -203,7 +203,7 @@
 generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 
60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
 SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

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


[PATCH] python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2

2017-12-11 Thread Pau Espin Pedrol

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

osmo_ctrl.py: Set shebang to use python v2

Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
---
M osmopy/osmo_ctrl.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/70/5270/1

diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py
index 003f100..2b8c4be 100755
--- a/osmopy/osmo_ctrl.py
+++ b/osmopy/osmo_ctrl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 # -*- mode: python-mode; py-indent-tabs-mode: nil -*-
 """
 /*

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-bsc[master]: Generate SI2ter Rest Octets

2017-12-11 Thread Max

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

Generate SI2ter Rest Octets

Previously we simply omitted SI2ter Rest Octets which is spec violation
which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix
this by generating empty 'no rest octets' with proper padding. Adjust
test output accordingly.

Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94
Fixes: OS#2711
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
4 files changed, 22 insertions(+), 2 deletions(-)


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

diff --git a/include/osmocom/bsc/rest_octets.h 
b/include/osmocom/bsc/rest_octets.h
index 876e0ab..ba25b6d 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -9,6 +9,7 @@
 /* generate SI1 rest octets */
 int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
 int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
+int rest_octets_si2ter(uint8_t *data);
 int rest_octets_si6(uint8_t *data, bool is1800_net);
 
 struct gsm48_si_selection_params {
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index 7c6d7cd..05d8b2a 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -461,6 +461,22 @@
bitvec_set_bit(bv, L);
 }
 
+/* Generate SIeter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */
+int rest_octets_si2ter(uint8_t *data)
+{
+   struct bitvec bv;
+
+   memset(, 0, sizeof(bv));
+   bv.data = data;
+   bv.data_len = 4;
+
+   /* No SI2ter_MP_CHANGE_MARK */
+   bitvec_set_bit(, L);
+
+   bitvec_spare_padding(, (bv.data_len * 8) - 1);
+
+   return bv.data_len;
+}
 
 /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
 int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index c1b0d49..4575454 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -764,7 +764,10 @@
if (!n)
bts->si_valid &= ~(1 << SYSINFO_TYPE_2ter);
 
-   return sizeof(*si2t);
+   /* SI2ter Rest Octets as per 3GPP TS 44.018 §10.5.2.33a */
+   rc = rest_octets_si2ter(si2t->rest_octets);
+
+   return sizeof(*si2t) + rc;
 }
 
 /* SI2quater messages are optional - we only generate them when neighbor 
UARFCNs or EARFCNs are configured */
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 889f001..868cd9b 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -204,7 +204,7 @@
 Testing if BA-IND is set as expected in SI2xxx and SI5xxx
 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
+SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b 
 SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

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

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


[PATCH] osmo-ggsn[master]: Add support for IPv4v6 End User Addresses

2017-12-11 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5216

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

Add support for IPv4v6 End User Addresses

Before this commit, when an MS requested an ipv4v6 context osmo-ggsn
returned an error stating the type was unknown, and this text was
printed in the log:
Processing create PDP context request for APN 'ims'
Cannot decode EUA from MS/SGSN: f1 8d

This patch has been tested with an MS running the 3 types of addresses:
- IPv4 and IPv6: no regressions observed, the context is activated and
packets are sent to the ggsn.
- IPv4v6: Wireshark correctly parses request and reponse, and then
ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and
IPv6 DNS addresses advertised and TCP traffic over IPv4 (because
probably my IPv6 network setup is not correct). I also checked I can
disable/enable data (pdp ctx delete and activate) several times without
any issue.

Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5
---
M ggsn/ggsn.c
M ggsn/icmpv6.c
M gtp/pdp.h
M lib/in46_addr.c
M lib/in46_addr.h
M sgsnemu/sgsnemu.c
M tests/lib/in46a_test.c
M tests/lib/in46a_v6_test.ok
8 files changed, 231 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5216/3

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 1c1276f..fa3e20c 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -335,17 +335,20 @@
 static int delete_context(struct pdp_t *pdp)
 {
struct gsn_t *gsn = pdp->gsn;
-   struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer;
struct apn_ctx *apn = pdp->priv;
+   struct ippoolm_t *member;
+   int i;
 
LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n");
-   struct ippoolm_t *member = pdp->peer;
 
-   if (pdp->peer) {
-   send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP 
removal */
-   ippool_freeip(ipp->pool, ipp);
-   } else
-   LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n");
+   for (i = 0; i < 2; i++) {
+   if (pdp->peer[i]) {
+   member = pdp->peer[i];
+   send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP 
with IP removal */
+   ippool_freeip(member->pool, member);
+   } else if(i == 0)
+   LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool 
member\n");
+   }
 
if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) {
LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from 
kernel:%s\n",
@@ -512,10 +515,10 @@
static char name_buf[256];
struct gsn_t *gsn = pdp->gsn;
struct ggsn_ctx *ggsn = gsn->priv;
-   struct in46_addr addr;
-   struct ippoolm_t *member;
+   struct in46_addr addr[2];
+   struct ippoolm_t *member = NULL;
struct apn_ctx *apn;
-   int rc;
+   int rc, num_addr, i;
 
osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l);
 
@@ -550,55 +553,63 @@
memcpy(pdp->qos_neg.v, pdp->qos_req.v, pdp->qos_req.l); /* TODO */
pdp->qos_neg.l = pdp->qos_req.l;
 
-   if (in46a_from_eua(>eua, )) {
+   memset(addr, 0, sizeof(addr));
+   if ((num_addr = in46a_from_eua(>eua, addr)) < 0) {
LOGPPDP(LOGL_ERROR, pdp, "Cannot decode EUA from MS/SGSN: %s\n",
osmo_hexdump(pdp->eua.v, pdp->eua.l));
gtp_create_context_resp(gsn, pdp, GTPCAUSE_UNKNOWN_PDP);
return 0;
}
 
-   if (addr.len == sizeof(struct in_addr)) {
-   /* does this APN actually have an IPv4 pool? */
-   if (!apn_supports_ipv4(apn))
-   goto err_wrong_af;
+   /* Allocate dynamic addresses from the pool */
+   for (i = 0; i < num_addr; i++) {
+   if (addr[i].len == sizeof(struct in_addr)) {
+   /* does this APN actually have an IPv4 pool? */
+   if (!apn_supports_ipv4(apn))
+   goto err_wrong_af;
 
-   rc = ippool_newip(apn->v4.pool, , , 0);
-   if (rc < 0)
-   goto err_pool_full;
-   in46a_to_eua(>addr, >eua);
+   rc = ippool_newip(apn->v4.pool, , [i], 0);
+   if (rc < 0)
+   goto err_pool_full;
+   /* copy back */
+   memcpy([i].v4.s_addr, >addr.v4, 4);
 
+   } else if (addr[i].len == sizeof(struct in6_addr)) {
+
+   /* does this APN actually have an IPv6 pool? */
+   if (!apn_supports_ipv6(apn))
+   goto err_wrong_af;
+
+   rc = ippool_newip(apn->v6.pool, , [i], 0);
+   if (rc < 0)
+   goto err_pool_full;
+
+   /* IPv6 doesn't really send the real/allocated address 

osmo-bsc[master]: Change T3101 default from 10s to 3s.

2017-12-11 Thread Max

Patch Set 1: Code-Review+1

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

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