Change in osmo-hlr[master]: USSD: Fix "ussd default-route"

2018-08-07 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10400


Change subject: USSD: Fix "ussd default-route"
..

USSD: Fix "ussd default-route"

Before this patch, the default route logic was not implemented.  The
user could specify a default-route, but it wouldn't be used by the
actual routing logic.  Let's fix that.

Change-Id: I0b04a75dc297f088f13da413d08c52e0747e46e6
---
M src/hlr_ussd.c
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/10400/1

diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 4ec9825..c96f47c 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -507,6 +507,11 @@
ss->is_external = false;
ss->u.iuse = rt->u.iuse;
}
+   } else {
+   if (hlr->euse_default) {
+   ss->is_external = true;
+   ss->u.euse = hlr->euse_default;
+   }
}
}
/* dispatch unstructured SS to routing */

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b04a75dc297f088f13da413d08c52e0747e46e6
Gerrit-Change-Number: 10400
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-ci[master]: osmocom-latest-packages: Fix libusrp and other non-osmocom builds

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10399 )

Change subject: osmocom-latest-packages: Fix libusrp and other non-osmocom 
builds
..

osmocom-latest-packages: Fix libusrp and other non-osmocom builds

We're using the build() function not only to build osmocom projects
requiring a .tarball-version file, but also other projects such as
libusrp.  Let's make the related git-buildpackage arguments conditional
to whether or not a .tarball-version file exists at all.

Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
---
M scripts/osmocom-latest-packages.sh
1 file changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/scripts/osmocom-latest-packages.sh 
b/scripts/osmocom-latest-packages.sh
index 1d122aa..83ab084 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -34,10 +34,15 @@
   git fetch
   VER=$(git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 
1)
   git checkout -f -B "$VER" "refs/tags/$VER"
-  test -x ./git-version-gen && ./git-version-gen . > .tarball-version 
2>/dev/null
-  gbp buildpackage -d -S -uc -us "--git-export-dir=$output" 
"--git-debian-branch=$VER" \
-  --git-ignore-new \
-  --git-postexport='cp $GBP_GIT_DIR/../.tarball-version 
$GBP_TMP_DIR/'
+  if [ -x ./git-version-gen ]; then
+./git-version-gen . > .tarball-version 2>/dev/null
+gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$output" \
+"--git-debian-branch=$VER" --git-ignore-new \
+--git-postexport='cp $GBP_GIT_DIR/../.tarball-version 
$GBP_TMP_DIR/'
+  else
+gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$output" \
+"--git-debian-branch=$VER" --git-ignore-new
+  fi

   if [ ! -d "$TOP/$PROJ/$1" ] ; then
 # creating a new package is different from using old ones

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
Gerrit-Change-Number: 10399
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


Change in osmo-ci[master]: osmocom-latest-packages: Fix libusrp and other non-osmocom builds

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10399 )

Change subject: osmocom-latest-packages: Fix libusrp and other non-osmocom 
builds
..


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


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
Gerrit-Change-Number: 10399
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:29:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: osmocom-latest-packages: Fix libusrp and other non-osmocom builds

2018-08-07 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10399


Change subject: osmocom-latest-packages: Fix libusrp and other non-osmocom 
builds
..

osmocom-latest-packages: Fix libusrp and other non-osmocom builds

We're using the build() function not only to build osmocom projects
requiring a .tarball-version file, but also other projects such as
libusrp.  Let's make the related git-buildpackage arguments conditional
to whether or not a .tarball-version file exists at all.

Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
---
M scripts/osmocom-latest-packages.sh
1 file changed, 9 insertions(+), 4 deletions(-)



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

diff --git a/scripts/osmocom-latest-packages.sh 
b/scripts/osmocom-latest-packages.sh
index 1d122aa..83ab084 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -34,10 +34,15 @@
   git fetch
   VER=$(git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 
1)
   git checkout -f -B "$VER" "refs/tags/$VER"
-  test -x ./git-version-gen && ./git-version-gen . > .tarball-version 
2>/dev/null
-  gbp buildpackage -d -S -uc -us "--git-export-dir=$output" 
"--git-debian-branch=$VER" \
-  --git-ignore-new \
-  --git-postexport='cp $GBP_GIT_DIR/../.tarball-version 
$GBP_TMP_DIR/'
+  if [ -x ./git-version-gen ]; then
+./git-version-gen . > .tarball-version 2>/dev/null
+gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$output" \
+"--git-debian-branch=$VER" --git-ignore-new \
+--git-postexport='cp $GBP_GIT_DIR/../.tarball-version 
$GBP_TMP_DIR/'
+  else
+gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$output" \
+"--git-debian-branch=$VER" --git-ignore-new
+  fi

   if [ ! -d "$TOP/$PROJ/$1" ] ; then
 # creating a new package is different from using old ones

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
Gerrit-Change-Number: 10399
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-hlr[master]: hlr_ussd.c: avoid using CR and NL in IUSE responses

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10323 )

Change subject: hlr_ussd.c: avoid using CR and NL in IUSE responses
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
Gerrit-Change-Number: 10323
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:21:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr_ussd.c: avoid using CR and NL in IUSE responses

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10323 )

Change subject: hlr_ussd.c: avoid using CR and NL in IUSE responses
..

hlr_ussd.c: avoid using CR and NL in IUSE responses

According to GSM TS 03.38, section 6.1.2.1, CR symbol at the end
is optional, and moreover libosmogsm encoding API will carry
about the bit padding itself.

Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
---
M src/hlr_ussd.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 7b981bb..4ec9825 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -297,7 +297,7 @@
if (strlen(subscr.msisdn) == 0)
snprintf(buf, sizeof(buf), "You have no MSISDN!");
else
-   snprintf(buf, sizeof(buf), "Your extension is %s\r", 
subscr.msisdn);
+   snprintf(buf, sizeof(buf), "Your extension is %s", 
subscr.msisdn);
ss_tx_ussd_7bit(ss, true, req->invoke_id, buf);
break;
case -ENOENT:
@@ -315,7 +315,7 @@
const struct osmo_gsup_message *gsup, const 
struct ss_request *req)
 {
char buf[GSM0480_USSD_7BIT_STRING_LEN+1];
-   snprintf(buf, sizeof(buf), "Your IMSI is %s!\n", ss->imsi);
+   snprintf(buf, sizeof(buf), "Your IMSI is %s", ss->imsi);
ss_tx_ussd_7bit(ss, true, req->invoke_id, buf);
return 0;
 }

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
Gerrit-Change-Number: 10323
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


Change in docker-playground[master]: OsmocomBB/Dockerfile: drop unneeded dependencies

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10393 )

Change subject: OsmocomBB/Dockerfile: drop unneeded dependencies
..

OsmocomBB/Dockerfile: drop unneeded dependencies

Change-Id: I6804b4f6ee3b81e470d9e1514c34931a271a42bc
---
M osmo-virtphy-master/Dockerfile
M osmocom-bb-trxcon/Dockerfile
2 files changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/osmo-virtphy-master/Dockerfile b/osmo-virtphy-master/Dockerfile
index d433318..3b464b1 100644
--- a/osmo-virtphy-master/Dockerfile
+++ b/osmo-virtphy-master/Dockerfile
@@ -13,13 +13,7 @@
 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
apt-get install -y --no-install-recommends \
-   telnet \
-   libosmocore-dev \
-   libosmo-abis-dev \
-   libosmo-netif-dev \
-   libosmo-sccp-dev \
-   libsmpp34-dev \
-   libgtp-dev && \
+   libosmocore-dev && \
apt-get clean

 WORKDIR/tmp
diff --git a/osmocom-bb-trxcon/Dockerfile b/osmocom-bb-trxcon/Dockerfile
index 313b669..19cc772 100644
--- a/osmocom-bb-trxcon/Dockerfile
+++ b/osmocom-bb-trxcon/Dockerfile
@@ -15,7 +15,6 @@
 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
apt-get install -y --no-install-recommends \
-   tcpdump \
libosmocore-dev && \
apt-get clean


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6804b4f6ee3b81e470d9e1514c34931a271a42bc
Gerrit-Change-Number: 10393
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 


Change in docker-playground[master]: OsmocomBB: remove unused 'osmo-virtphy-master'

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10395 )

Change subject: OsmocomBB: remove unused 'osmo-virtphy-master'
..


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


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
Gerrit-Change-Number: 10395
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:19:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: OsmocomBB: remove unused 'osmo-virtphy-master'

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10395 )

Change subject: OsmocomBB: remove unused 'osmo-virtphy-master'
..

OsmocomBB: remove unused 'osmo-virtphy-master'

There is no need to keep an additional Docker image with the same
project, because virt_phy can be compiled as a part of the main
image ('osmocom-bb-host-master'). Moreover, virt_phy is not used
at the moment, so let's remove this.

Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
---
D osmo-virtphy-master/.release
D osmo-virtphy-master/Dockerfile
D osmo-virtphy-master/Makefile
D osmo-virtphy-master/Release.key
4 files changed, 0 insertions(+), 62 deletions(-)

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



diff --git a/osmo-virtphy-master/.release b/osmo-virtphy-master/.release
deleted file mode 100644
index 8be66cb..000
--- a/osmo-virtphy-master/.release
+++ /dev/null
@@ -1,2 +0,0 @@
-release=0.0.0
-tag=osmo-virtphy-master-0.0.0
diff --git a/osmo-virtphy-master/Dockerfile b/osmo-virtphy-master/Dockerfile
deleted file mode 100644
index 3b464b1..000
--- a/osmo-virtphy-master/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-FROM laforge/debian-jessie-build
-
-MAINTAINER Harald Welte 
-
-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/";
-
-COPY   Release.key /tmp/Release.key
-
-RUNapt-key add /tmp/Release.key && \
-   rm /tmp/Release.key && \
-   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-nightly.list
-
-ADD$OSMOCOM_REPO/Release /tmp/Release
-RUNapt-get update && \
-   apt-get install -y --no-install-recommends \
-   libosmocore-dev && \
-   apt-get clean
-
-WORKDIR/tmp
-
-ARGOSMO_BB_BRANCH="master"
-
-RUNgit clone git://git.osmocom.org/osmocom-bb.git
-ADDhttp://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit
-
-RUNcd osmocom-bb/src/host/virt_phy && \
-   git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH 
&& \
-   autoreconf -fi && \
-   ./configure && \
-   make -j8 install
-
-VOLUME /data
-
-WORKDIR/data
-CMD["/usr/local/sbin/virtphy","-s","/data/osmocom_l2"]
-
-#EXPOSE3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp
diff --git a/osmo-virtphy-master/Makefile b/osmo-virtphy-master/Makefile
deleted file mode 100644
index 2aba67b..000
--- a/osmo-virtphy-master/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-RUN_ARGS?=--rm --network sigtran --ip 172.18.0.231 -v virtphy-vol:/data
-
-include ../make/Makefile
diff --git a/osmo-virtphy-master/Release.key b/osmo-virtphy-master/Release.key
deleted file mode 100644
index e656238..000
--- a/osmo-virtphy-master/Release.key
+++ /dev/null
@@ -1,20 +0,0 @@
--BEGIN PGP PUBLIC KEY BLOCK-
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
-a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
-CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
-5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
-S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
-CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
-b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc
-aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI
-ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw
-8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI
-L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb
-/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I
-ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi
-8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
-d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
-=Gvly
--END PGP PUBLIC KEY BLOCK-

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
Gerrit-Change-Number: 10395
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 


Change in docker-playground[master]: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10394 )

Change subject: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'
..

Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

At the moment, this Docker image does contain not only trxcon,
but also FakeTRX, virt_phy, and other host applications, so
let's name it properly...

Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
---
M Makefile
A osmocom-bb-host-master/.release
R osmocom-bb-host-master/Dockerfile
R osmocom-bb-host-master/Makefile
R osmocom-bb-host-master/Release.key
D osmocom-bb-trxcon/.release
M ttcn3-bts-test/jenkins.sh
7 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/Makefile b/Makefile
index eca64be..2cdbc58 100644
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,9 @@
 osmo-stp-master: debian-jessie-build
$(MAKE) -C osmo-stp-master

-.PHONY: osmocom-bb-trxcon
-osmocom-bb-trxcon: debian-jessie-build
-   $(MAKE) -C osmocom-bb-trxcon
+.PHONY: osmocom-bb-host-master
+osmocom-bb-host-master: debian-jessie-build
+   $(MAKE) -C osmocom-bb-host-master

 .PHONY: osmo-ggsn-master
 osmo-ggsn-master: debian-jessie-build
@@ -38,7 +38,7 @@
$(MAKE) -C ttcn3-bsc-test

 .PHONY: ttcn3-bts-test
-ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-trxcon ttcn3-bts-test
+ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-host-master ttcn3-bts-test
$(MAKE) -C ttcn3-bts-test

 .PHONY: ttcn3-msc-test
diff --git a/osmocom-bb-host-master/.release b/osmocom-bb-host-master/.release
new file mode 100644
index 000..0432acd
--- /dev/null
+++ b/osmocom-bb-host-master/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=osmocom-bb-host-master-0.0.0
diff --git a/osmocom-bb-trxcon/Dockerfile b/osmocom-bb-host-master/Dockerfile
similarity index 100%
rename from osmocom-bb-trxcon/Dockerfile
rename to osmocom-bb-host-master/Dockerfile
diff --git a/osmocom-bb-trxcon/Makefile b/osmocom-bb-host-master/Makefile
similarity index 100%
rename from osmocom-bb-trxcon/Makefile
rename to osmocom-bb-host-master/Makefile
diff --git a/osmocom-bb-trxcon/Release.key b/osmocom-bb-host-master/Release.key
similarity index 100%
rename from osmocom-bb-trxcon/Release.key
rename to osmocom-bb-host-master/Release.key
diff --git a/osmocom-bb-trxcon/.release b/osmocom-bb-trxcon/.release
deleted file mode 100644
index a6e882a..000
--- a/osmocom-bb-trxcon/.release
+++ /dev/null
@@ -1,2 +0,0 @@
-release=0.0.0
-tag=osmocombb-bb-trxcon-0.0.0
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index e8c77f3..1cd06e7 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -38,7 +38,7 @@
 docker run --rm \
--network $NET_NAME --ip 172.18.9.21 \
--name ${BUILD_TAG}-fake_trx -d \
-   $REPO_USER/osmocom-bb-trxcon \
+   $REPO_USER/osmocom-bb-host-master \
/tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py -R 
172.18.9.20 -r 172.18.9.22

 echo Starting container with trxcon
@@ -46,7 +46,7 @@
--network $NET_NAME --ip 172.18.9.22 \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-trxcon -d \
-   $REPO_USER/osmocom-bb-trxcon \
+   $REPO_USER/osmocom-bb-host-master \
/usr/local/bin/trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2



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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
Gerrit-Change-Number: 10394
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 


Change in docker-playground[master]: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10394 )

Change subject: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'
..


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


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
Gerrit-Change-Number: 10394
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:18:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: OsmocomBB/Dockerfile: drop unneeded dependencies

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10393 )

Change subject: OsmocomBB/Dockerfile: drop unneeded dependencies
..


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


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6804b4f6ee3b81e470d9e1514c34931a271a42bc
Gerrit-Change-Number: 10393
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:18:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10397 )

Change subject: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc
..

jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc

osmo-msc now needs libosmo-gsup-client, which is built during omso-hlr
compilation.

Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
---
M contrib/jenkins-build-osmo-msc.sh
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/contrib/jenkins-build-osmo-msc.sh 
b/contrib/jenkins-build-osmo-msc.sh
index 28d327b..5b5d1f6 100755
--- a/contrib/jenkins-build-osmo-msc.sh
+++ b/contrib/jenkins-build-osmo-msc.sh
@@ -10,6 +10,7 @@
 build_repo libsmpp34 --enable-sanitize
 build_repo libosmo-sccp --enable-sanitize
 build_repo osmo-mgw --enable-sanitize
+build_repo osmo-hlr --enable-sanitize
 build_repo osmo-msc --enable-sanitize --enable-smpp --disable-iu

 create_bin_tgz osmo-msc

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
Gerrit-Change-Number: 10397
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-gsm-tester[master]: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10397 )

Change subject: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
Gerrit-Change-Number: 10397
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 08 Aug 2018 06:17:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: osmo-gsm-tester: Add OSMO_GSM_TESTER_BUILD_osmo_hlr parameter

2018-08-07 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10398


Change subject: osmo-gsm-tester: Add OSMO_GSM_TESTER_BUILD_osmo_hlr parameter
..

osmo-gsm-tester: Add OSMO_GSM_TESTER_BUILD_osmo_hlr parameter

For some reason almost all projects allow to permit building a
specific non-master branch, only osmo-hlr was missing that parameter.
Untested.

Change-Id: Ia4199aa5cfd1f39d34ed7c6104881c68d00dcffa
---
M jobs/osmo-gsm-tester-builder.yml
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/jobs/osmo-gsm-tester-builder.yml b/jobs/osmo-gsm-tester-builder.yml
index ac1e868..748062d 100644
--- a/jobs/osmo-gsm-tester-builder.yml
+++ b/jobs/osmo-gsm-tester-builder.yml
@@ -83,6 +83,8 @@
   - add_param_build_branch:
  name: OSMO_GSM_TESTER_BUILD_osmo_msc
   - add_param_build_branch:
+ name: OSMO_GSM_TESTER_BUILD_osmo_hlr
+  - add_param_build_branch:
  name: OSMO_GSM_TESTER_BUILD_osmo_pcu
   - add_param_build_branch:
  name: OSMO_GSM_TESTER_BUILD_osmo_trx

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4199aa5cfd1f39d34ed7c6104881c68d00dcffa
Gerrit-Change-Number: 10398
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-gsm-tester[master]: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10397


Change subject: jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc
..

jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc

osmo-msc now needs libosmo-gsup-client, which is built during omso-hlr
compilation.

Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
---
M contrib/jenkins-build-osmo-msc.sh
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/contrib/jenkins-build-osmo-msc.sh 
b/contrib/jenkins-build-osmo-msc.sh
index 28d327b..5b5d1f6 100755
--- a/contrib/jenkins-build-osmo-msc.sh
+++ b/contrib/jenkins-build-osmo-msc.sh
@@ -10,6 +10,7 @@
 build_repo libsmpp34 --enable-sanitize
 build_repo libosmo-sccp --enable-sanitize
 build_repo osmo-mgw --enable-sanitize
+build_repo osmo-hlr --enable-sanitize
 build_repo osmo-msc --enable-sanitize --enable-smpp --disable-iu

 create_bin_tgz osmo-msc

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
Gerrit-Change-Number: 10397
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-ci[master]: coverity: Re-order builds to ensure osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10396 )

Change subject: coverity: Re-order builds to ensure osmo-hlr before osmo-msc
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
Gerrit-Change-Number: 10396
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 05:56:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: coverity: Re-order builds to ensure osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10396 )

Change subject: coverity: Re-order builds to ensure osmo-hlr before osmo-msc
..

coverity: Re-order builds to ensure osmo-hlr before osmo-msc

osmo-msc now needs libosmo-gsup-client, which is built+installed
as part of osmo-hlr

Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
---
M coverity/build_Osmocom.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh
index 18c9b0b..920c0b9 100755
--- a/coverity/build_Osmocom.sh
+++ b/coverity/build_Osmocom.sh
@@ -79,8 +79,8 @@
 build_osmobts
 build_default osmo-mgw
 build_default osmo-bsc
-build_default osmo-msc
 build_default osmo-hlr
+build_default osmo-msc
 build_default osmo-sgsn

 # GMR

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
Gerrit-Change-Number: 10396
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


Change in osmo-ci[master]: coverity: Re-order builds to ensure osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10396 )

Change subject: coverity: Re-order builds to ensure osmo-hlr before osmo-msc
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
Gerrit-Change-Number: 10396
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 08 Aug 2018 05:56:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: coverity: Re-order builds to ensure osmo-hlr before osmo-msc

2018-08-07 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10396


Change subject: coverity: Re-order builds to ensure osmo-hlr before osmo-msc
..

coverity: Re-order builds to ensure osmo-hlr before osmo-msc

osmo-msc now needs libosmo-gsup-client, which is built+installed
as part of osmo-hlr

Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
---
M coverity/build_Osmocom.sh
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh
index 18c9b0b..920c0b9 100755
--- a/coverity/build_Osmocom.sh
+++ b/coverity/build_Osmocom.sh
@@ -79,8 +79,8 @@
 build_osmobts
 build_default osmo-mgw
 build_default osmo-bsc
-build_default osmo-msc
 build_default osmo-hlr
+build_default osmo-msc
 build_default osmo-sgsn

 # GMR

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
Gerrit-Change-Number: 10396
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in docker-playground[master]: OsmocomBB: remove unused 'osmo-virtphy-master'

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/10395 )

Change subject: OsmocomBB: remove unused 'osmo-virtphy-master'
..

OsmocomBB: remove unused 'osmo-virtphy-master'

There is no need to keep an additional Docker image with the same
project, because virt_phy can be compiled as a part of the main
image ('osmocom-bb-host-master'). Moreover, virt_phy is not used
at the moment, so let's remove this.

Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
---
D osmo-virtphy-master/.release
D osmo-virtphy-master/Dockerfile
D osmo-virtphy-master/Makefile
D osmo-virtphy-master/Release.key
4 files changed, 0 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/95/10395/2
--
To view, visit https://gerrit.osmocom.org/10395
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
Gerrit-Change-Number: 10395
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 


Change in docker-playground[master]: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/10394 )

Change subject: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'
..

Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

At the moment, this Docker image does contain not only trxcon,
but also FakeTRX, virt_phy, and other host applications, so
let's name it properly...

Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
---
M Makefile
A osmocom-bb-host-master/.release
R osmocom-bb-host-master/Dockerfile
R osmocom-bb-host-master/Makefile
R osmocom-bb-host-master/Release.key
D osmocom-bb-trxcon/.release
M ttcn3-bts-test/jenkins.sh
7 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/94/10394/2
--
To view, visit https://gerrit.osmocom.org/10394
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
Gerrit-Change-Number: 10394
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 


Change in docker-playground[master]: OsmocomBB/Dockerfile: drop unneeded dependencies

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10393


Change subject: OsmocomBB/Dockerfile: drop unneeded dependencies
..

OsmocomBB/Dockerfile: drop unneeded dependencies

Change-Id: I6804b4f6ee3b81e470d9e1514c34931a271a42bc
---
M osmo-virtphy-master/Dockerfile
M osmocom-bb-trxcon/Dockerfile
2 files changed, 1 insertion(+), 8 deletions(-)



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

diff --git a/osmo-virtphy-master/Dockerfile b/osmo-virtphy-master/Dockerfile
index d433318..3b464b1 100644
--- a/osmo-virtphy-master/Dockerfile
+++ b/osmo-virtphy-master/Dockerfile
@@ -13,13 +13,7 @@
 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
apt-get install -y --no-install-recommends \
-   telnet \
-   libosmocore-dev \
-   libosmo-abis-dev \
-   libosmo-netif-dev \
-   libosmo-sccp-dev \
-   libsmpp34-dev \
-   libgtp-dev && \
+   libosmocore-dev && \
apt-get clean

 WORKDIR/tmp
diff --git a/osmocom-bb-trxcon/Dockerfile b/osmocom-bb-trxcon/Dockerfile
index 313b669..19cc772 100644
--- a/osmocom-bb-trxcon/Dockerfile
+++ b/osmocom-bb-trxcon/Dockerfile
@@ -15,7 +15,6 @@
 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
apt-get install -y --no-install-recommends \
-   tcpdump \
libosmocore-dev && \
apt-get clean


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6804b4f6ee3b81e470d9e1514c34931a271a42bc
Gerrit-Change-Number: 10393
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in docker-playground[master]: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10394


Change subject: Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'
..

Rename 'osmocom-bb-trxcon' to 'osmocom-bb-host-master'

At the moment, this Docker image does contain not only trxcon,
but also FakeTRX, virt_phy, and other host applications, so
let's name it properly...

Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
---
M Makefile
R osmocom-bb-host-master/.release
R osmocom-bb-host-master/Dockerfile
R osmocom-bb-host-master/Makefile
R osmocom-bb-host-master/Release.key
M ttcn3-bts-test/jenkins.sh
6 files changed, 6 insertions(+), 6 deletions(-)



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

diff --git a/Makefile b/Makefile
index eca64be..2cdbc58 100644
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,9 @@
 osmo-stp-master: debian-jessie-build
$(MAKE) -C osmo-stp-master

-.PHONY: osmocom-bb-trxcon
-osmocom-bb-trxcon: debian-jessie-build
-   $(MAKE) -C osmocom-bb-trxcon
+.PHONY: osmocom-bb-host-master
+osmocom-bb-host-master: debian-jessie-build
+   $(MAKE) -C osmocom-bb-host-master

 .PHONY: osmo-ggsn-master
 osmo-ggsn-master: debian-jessie-build
@@ -38,7 +38,7 @@
$(MAKE) -C ttcn3-bsc-test

 .PHONY: ttcn3-bts-test
-ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-trxcon ttcn3-bts-test
+ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-host-master ttcn3-bts-test
$(MAKE) -C ttcn3-bts-test

 .PHONY: ttcn3-msc-test
diff --git a/osmocom-bb-trxcon/.release b/osmocom-bb-host-master/.release
similarity index 100%
rename from osmocom-bb-trxcon/.release
rename to osmocom-bb-host-master/.release
diff --git a/osmocom-bb-trxcon/Dockerfile b/osmocom-bb-host-master/Dockerfile
similarity index 100%
rename from osmocom-bb-trxcon/Dockerfile
rename to osmocom-bb-host-master/Dockerfile
diff --git a/osmocom-bb-trxcon/Makefile b/osmocom-bb-host-master/Makefile
similarity index 100%
rename from osmocom-bb-trxcon/Makefile
rename to osmocom-bb-host-master/Makefile
diff --git a/osmocom-bb-trxcon/Release.key b/osmocom-bb-host-master/Release.key
similarity index 100%
rename from osmocom-bb-trxcon/Release.key
rename to osmocom-bb-host-master/Release.key
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index e8c77f3..1cd06e7 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -38,7 +38,7 @@
 docker run --rm \
--network $NET_NAME --ip 172.18.9.21 \
--name ${BUILD_TAG}-fake_trx -d \
-   $REPO_USER/osmocom-bb-trxcon \
+   $REPO_USER/osmocom-bb-host-master \
/tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py -R 
172.18.9.20 -r 172.18.9.22

 echo Starting container with trxcon
@@ -46,7 +46,7 @@
--network $NET_NAME --ip 172.18.9.22 \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-trxcon -d \
-   $REPO_USER/osmocom-bb-trxcon \
+   $REPO_USER/osmocom-bb-host-master \
/usr/local/bin/trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2



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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieba2411230efdedc13afcd62b8b3a2153fbaf0cb
Gerrit-Change-Number: 10394
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in docker-playground[master]: OsmocomBB: remove unused 'osmo-virtphy-master'

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10395


Change subject: OsmocomBB: remove unused 'osmo-virtphy-master'
..

OsmocomBB: remove unused 'osmo-virtphy-master'

There is no need to keep an additional Docker image with the same
project, and virt_phy can be compiled as a part of the main image
('osmocom-bb-host-master'). Moreover, virt_phy is not used at the
moment, so let's remove this.

Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
---
D osmo-virtphy-master/.release
D osmo-virtphy-master/Dockerfile
D osmo-virtphy-master/Makefile
D osmo-virtphy-master/Release.key
4 files changed, 0 insertions(+), 62 deletions(-)



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

diff --git a/osmo-virtphy-master/.release b/osmo-virtphy-master/.release
deleted file mode 100644
index 8be66cb..000
--- a/osmo-virtphy-master/.release
+++ /dev/null
@@ -1,2 +0,0 @@
-release=0.0.0
-tag=osmo-virtphy-master-0.0.0
diff --git a/osmo-virtphy-master/Dockerfile b/osmo-virtphy-master/Dockerfile
deleted file mode 100644
index 3b464b1..000
--- a/osmo-virtphy-master/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-FROM laforge/debian-jessie-build
-
-MAINTAINER Harald Welte 
-
-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/";
-
-COPY   Release.key /tmp/Release.key
-
-RUNapt-key add /tmp/Release.key && \
-   rm /tmp/Release.key && \
-   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-nightly.list
-
-ADD$OSMOCOM_REPO/Release /tmp/Release
-RUNapt-get update && \
-   apt-get install -y --no-install-recommends \
-   libosmocore-dev && \
-   apt-get clean
-
-WORKDIR/tmp
-
-ARGOSMO_BB_BRANCH="master"
-
-RUNgit clone git://git.osmocom.org/osmocom-bb.git
-ADDhttp://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit
-
-RUNcd osmocom-bb/src/host/virt_phy && \
-   git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH 
&& \
-   autoreconf -fi && \
-   ./configure && \
-   make -j8 install
-
-VOLUME /data
-
-WORKDIR/data
-CMD["/usr/local/sbin/virtphy","-s","/data/osmocom_l2"]
-
-#EXPOSE3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp
diff --git a/osmo-virtphy-master/Makefile b/osmo-virtphy-master/Makefile
deleted file mode 100644
index 2aba67b..000
--- a/osmo-virtphy-master/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-RUN_ARGS?=--rm --network sigtran --ip 172.18.0.231 -v virtphy-vol:/data
-
-include ../make/Makefile
diff --git a/osmo-virtphy-master/Release.key b/osmo-virtphy-master/Release.key
deleted file mode 100644
index e656238..000
--- a/osmo-virtphy-master/Release.key
+++ /dev/null
@@ -1,20 +0,0 @@
--BEGIN PGP PUBLIC KEY BLOCK-
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
-a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
-CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
-5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
-S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
-CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
-b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc
-aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI
-ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw
-8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI
-L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb
-/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I
-ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi
-8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
-d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
-=Gvly
--END PGP PUBLIC KEY BLOCK-

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifafb044e8350177e60b479b77c8aad78505eabbc
Gerrit-Change-Number: 10395
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmo-hlr[master]: hlr_ussd.c: avoid using CR and NL in IUSE responses

2018-08-07 Thread Harald Welte
Harald Welte has uploaded a new patch set (#2) to the change originally created 
by Vadim Yanitskiy. ( https://gerrit.osmocom.org/10323 )

Change subject: hlr_ussd.c: avoid using CR and NL in IUSE responses
..

hlr_ussd.c: avoid using CR and NL in IUSE responses

According to GSM TS 03.38, section 6.1.2.1, CR symbol at the end
is optional, and moreover libosmogsm encoding API will carry
about the bit padding itself.

Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
---
M src/hlr_ussd.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
Gerrit-Change-Number: 10323
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-hlr[master]: hlr_ussd.c: avoid using CR and NL in IUSE responses

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10323 )

Change subject: hlr_ussd.c: avoid using CR and NL in IUSE responses
..


Set Ready For Review


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I09e8a67758698f3b7a578eab956311e269d091ee
Gerrit-Change-Number: 10323
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 Aug 2018 21:06:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: bssgp: introduce flush queue functions

2018-08-07 Thread lynxis lazus
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/10371

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

Change subject: bssgp: introduce flush queue functions
..

bssgp: introduce flush queue functions

To reset the state of BSSGP allow to flush the BSSGP queues.
When testing (with TTCN3) the test object should be resetted between
each test.

Introduce the functions:
bssgp_fc_flush_queue() - flushs a single flow control object
bssgp_flush_all_queues() - flushs queues of all BSSGP connections

Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
---
M include/osmocom/gprs/gprs_bssgp.h
M src/gb/gprs_bssgp.c
M src/gb/libosmogb.map
3 files changed, 33 insertions(+), 0 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in libosmocore[master]: bssgp: introduce flush queue functions

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10371 )

Change subject: bssgp: introduce flush queue functions
..


Patch Set 2: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/10371/2/src/gb/gprs_bssgp.c
File src/gb/gprs_bssgp.c:

https://gerrit.osmocom.org/#/c/10371/2/src/gb/gprs_bssgp.c@1282
PS2, Line 1282: connections
contexts



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:22:30 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: increase the timeout of some TC

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10389 )

Change subject: sgsn: increase the timeout of some TC
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
Gerrit-Change-Number: 10389
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:19:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: fix TC_attach_check_complete_resend

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10390 )

Change subject: sgsn: fix TC_attach_check_complete_resend
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3fa5c100b8389e184acf1e71e2792e5474c22dec
Gerrit-Change-Number: 10390
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:19:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: introduce TC_attach_rau_a_b

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10387 )

Change subject: sgsn: introduce TC_attach_rau_a_b
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie636778628c216e315bd6f5bc11e0e5bd9c218a5
Gerrit-Change-Number: 10387
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:18:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli f_bssgp_clien...

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10386 )

Change subject: sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli 
f_bssgp_client_llgmm_assign f_process_rau_accept
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a65f0d09d3689911843a1b40e2a4114710e5b5
Gerrit-Change-Number: 10386
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:17:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: move LLC layer out of BSSGP

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10383 )

Change subject: BSSGP_Emulation: move LLC layer out of BSSGP
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/10383/1/sgsn/SGSN_Tests.ttcn
File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/#/c/10383/1/sgsn/SGSN_Tests.ttcn@341
PS1, Line 341: function f_send_llc(template PDU_L3_MS_SGSN l3_mo, integer 
gb_index := 0) runs on BSSGP_ConnHdlr {
naming could include some mention of "l3" or "gmm" as it is not a function to 
be e.g. used to send user plane LLC messages.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
Gerrit-Change-Number: 10383
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:17:21 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10384 )

Change subject: BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
Gerrit-Change-Number: 10384
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:15:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: add f_cellid_to_RAI()

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10381 )

Change subject: sgsn: add f_cellid_to_RAI()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide96213ab2f210590b86deaf370486c8a0a78058
Gerrit-Change-Number: 10381
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:15:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: dont fail when removing a non-exitent client

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10385 )

Change subject: BSSGP_Emulation: dont fail when removing a non-exitent client
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
Gerrit-Change-Number: 10385
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:15:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: add type record LLC_Entities

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10382 )

Change subject: BSSGP_Emulation: add type record LLC_Entities
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
Gerrit-Change-Number: 10382
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:14:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: introduce f_routing_area_update()

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10379 )

Change subject: sgsn: introduce f_routing_area_update()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
Gerrit-Change-Number: 10379
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:14:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: add TC_attach_gmm_attach_req_while_gmm_attach

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10392 )

Change subject: sgsn: add TC_attach_gmm_attach_req_while_gmm_attach
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bac50dc5a72ba8f9010b05bcb98aa7ff0b81cf6
Gerrit-Change-Number: 10392
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:13:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdow...

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10374 )

Change subject: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround 
shutdown problems
..

sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdown problems

When introducing multiple BSSGP instances, this
tests has problem when shutting down the test.

Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 0a20dd6..ce796e8 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -979,11 +979,20 @@
} else {
GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, 
apars.nsapi, '1'B));
}
+
+   timer T := 5.0;
+   T.start;
+
alt {
[] BSSGP.receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, 
true))) {
BSSGP.send(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
}
-   [not error_ind] GTP.receive(tr_GTPC_MsgType(?, 
deletePDPContextResponse, apars.ggsn_tei_c)) { }
+   [not error_ind] GTP.receive(tr_GTPC_MsgType(?, 
deletePDPContextResponse, apars.ggsn_tei_c)) {
+   repeat;
+   }
+   [] T.timeout {
+   setverdict(fail, "Waiting for SM_DEACT_PDP_REQ_MT");
+   }
}
 }


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
Gerrit-Change-Number: 10374
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-ttcn3-hacks[master]: sgsn: create 3 instances of BSSGP at the same time

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10378 )

Change subject: sgsn: create 3 instances of BSSGP at the same time
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/10378/1/sgsn/SGSN_Tests.ttcn
File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/#/c/10378/1/sgsn/SGSN_Tests.ttcn@222
PS1, Line 222:  f_init_gb(g_gb[1], "SGSN_Test-Gb0", 1);
shouldn't that be SGSN_Test-Gb1 and Gb2 in the name?



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I01d7f264a0a52e248d6e754485c807266c0b14bf
Gerrit-Change-Number: 10378
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:12:33 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: introduce TC_attach_rau_a_a()

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10380 )

Change subject: sgsn: introduce TC_attach_rau_a_a()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id76b4792c07816bcbe5e965f23c2b526df0923c3
Gerrit-Change-Number: 10380
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:11:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: NS_Emulation: support multiple instances at the same time

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10376 )

Change subject: NS_Emulation: support multiple instances at the same time
..


Patch Set 1:

I would prefer if the NS_Emulation would get passed a record containing 
specific configuration values, like we do in the various other TTCN3 test 
suites.  The magic with the "offset" an computing the various identifiers from 
that could then be done from the user/caller side when generating the 
configuration structure before creating the respective NS instances


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
Gerrit-Change-Number: 10376
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:10:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: sgsn: fill g_gb configs for the remaining Gb interfaces

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10375 )

Change subject: sgsn: fill g_gb configs for the remaining Gb interfaces
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
Gerrit-Change-Number: 10375
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:08:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: bssgp: introduce flush queue functions

2018-08-07 Thread lynxis lazus
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10371

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

Change subject: bssgp: introduce flush queue functions
..

bssgp: introduce flush queue functions

To reset the state of BSSGP allow to flush the BSSGP queues.
When testing (with TTCN3) the test object should be resetted between
each test.

Introduce the functions:
bssgp_fc_flush_queue() - flushs a single flow control object
bssgp_flush_all_queues() - flushs queues of all BSSGP connections

Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
---
M include/osmocom/gprs/gprs_bssgp.h
M src/gb/gprs_bssgp.c
M src/gb/libosmogb.map
3 files changed, 32 insertions(+), 0 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 


Change in osmo-ttcn3-hacks[master]: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdow...

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10374 )

Change subject: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround 
shutdown problems
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
Gerrit-Change-Number: 10374
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:08:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in simtrace2[master]: jenkins: add simtrace/trace to the builds

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10373 )

Change subject: jenkins: add simtrace/trace to the builds
..

jenkins: add simtrace/trace to the builds

trace is now stable enough on simtrace to be built and uploaded.

Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
---
M contrib/jenkins.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index bdf2b39..99a6f00 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -25,7 +25,7 @@
 export LD_LIBRARY_PATH="$inst/lib"

 BUILDS=""
-BUILDS+="simtrace/dfu simtrace/cardem " # simtrace/trace simtrace/triple_play
+BUILDS+="simtrace/dfu simtrace/cardem simtrace/trace " # simtrace/triple_play
 BUILDS+="qmod/dfu qmod/cardem "
 BUILDS+="owhw/dfu owhw/cardem "


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
Gerrit-Change-Number: 10373
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in simtrace2[master]: jenkins: add simtrace/trace to the builds

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10373 )

Change subject: jenkins: add simtrace/trace to the builds
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
Gerrit-Change-Number: 10373
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:04:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: Add initial OsmoMGW manual

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10279 )

Change subject: Add initial OsmoMGW manual
..

Add initial OsmoMGW manual

Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
---
M OsmoMGW/Makefile
A OsmoMGW/chapters/configuration.adoc
A OsmoMGW/chapters/counters.adoc
A OsmoMGW/chapters/counters_generated.adoc
A OsmoMGW/chapters/overview.adoc
A OsmoMGW/chapters/running.adoc
A OsmoMGW/osmomgw-usermanual-docinfo.xml
A OsmoMGW/osmomgw-usermanual.adoc
8 files changed, 282 insertions(+), 0 deletions(-)

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



diff --git a/OsmoMGW/Makefile b/OsmoMGW/Makefile
index 46c97e4..b092e66 100644
--- a/OsmoMGW/Makefile
+++ b/OsmoMGW/Makefile
@@ -1,5 +1,9 @@
 TOPDIR = ..

+ASCIIDOC = osmomgw-usermanual.adoc
+ASCIIDOC_DEPS = chapters/*.adoc
+include $(TOPDIR)/build/Makefile.asciidoc.inc
+
 VTY_REFERENCE = osmomgw-vty-reference.xml
 include $(TOPDIR)/build/Makefile.vty-reference.inc

diff --git a/OsmoMGW/chapters/configuration.adoc 
b/OsmoMGW/chapters/configuration.adoc
new file mode 100644
index 000..c398f25
--- /dev/null
+++ b/OsmoMGW/chapters/configuration.adoc
@@ -0,0 +1,57 @@
+== Configuring OsmoMGW
+
+A basic configation of OsmoMGW mainly consists of specifying the IP address
+and port on which to listen to MGCP commands, but changing the port range at
+which the RTP streams terminate as well as limiting operation to a single call
+agent can be done as well as changing the number of endpoints.
+
+=== Configuring MGCP
+
+By default OsmoMGW listens for MGCP on port 2427 on any IP address. If a call
+agent address is configured then OsmoMGW will only answer MGCP commands from
+that IP port 2727, otherwise all sources are handled. A domain can be
+specified
+
+.Example: MGCP configuration
+
+OsmoMGW(config-mgcp)# bind ip 127.0.0.1
+OsmoMGW(config-mgcp)# bind port 2427
+OsmoMGW(config-mgcp)# call-agent ip 127.0.0.1
+OsmoMGW(config-mgcp)# domain mgw-bsc
+OsmoMGW(config-mgcp)# local ip 127.0.0.1
+
+
+=== Configuring the trunk
+
+The first trunk (trunk 0) is considered a virtual trunk in OsmoMGW. All
+endpoints of type "rtpbridge" are routed here. The virtual trunk is configured
+in the config-mgcp context.
+
+All other trunks are configured in the config-mgcp-trunk context, but the
+commands used are identical. Right now trunks are considered only for ds/e1
+type endpoints which are not yet implemented. Don't use trunks other than the
+"virtual" trunk 0.
+
+.Example: MGCP trunk configuration
+
+OsmoMGW(config-mgcp)# number endpoints 63 <1>
+OsmoMGW(config-mgcp)# rtp bind-ip 10.0.0.1 <2>
+OsmoMGW(config-mgcp)# rtp port-range 12000-14000 <3>
+
+<1> Maximum number of endpoints that can be allocated at once
+<2> Use this IP when binding RTP endpoints
+<3> Use ports in this range when binding RTP endpoints
+
+There are some options to tweak how RTP forwarding behaves in OsmoMGW:
+
+.Example: MGCP trunk rtp options
+
+OsmoMGW(config-mgcp)# rtp keep-alive 30 <1>
+OsmoMGW(config-mgcp)# rtp-patch ssrc <2>
+OsmoMGW(config-mgcp)# rtp-patch timestamp <3>
+
+<1> Send dummy UDP packets periodically to RTP destination
+<2> Hide SSRC changes
+<3> Ensure RTP timestamp is aligned with frame duration
+
+
diff --git a/OsmoMGW/chapters/counters.adoc b/OsmoMGW/chapters/counters.adoc
new file mode 100644
index 000..7fbb10c
--- /dev/null
+++ b/OsmoMGW/chapters/counters.adoc
@@ -0,0 +1,4 @@
+[[counters]]
+== Counters
+
+include::./counters_generated.adoc[]
diff --git a/OsmoMGW/chapters/counters_generated.adoc 
b/OsmoMGW/chapters/counters_generated.adoc
new file mode 100644
index 000..20a4dec
--- /dev/null
+++ b/OsmoMGW/chapters/counters_generated.adoc
@@ -0,0 +1,14 @@
+
+// autogenerated by show asciidoc counters
+These counters and their description based on OsmoMGW 1.3.0.34-9cd52 (OsmoMGW).
+
+=== Rate Counters
+
+// generating tables for rate_ctr_group
+== Osmo Stat Items
+
+// generating tables for osmo_stat_items
+== Osmo Counters
+
+// generating tables for osmo_counters
+// there are no ungrouped osmo_counters
diff --git a/OsmoMGW/chapters/overview.adoc b/OsmoMGW/chapters/overview.adoc
new file mode 100644
index 000..6a8f3e3
--- /dev/null
+++ b/OsmoMGW/chapters/overview.adoc
@@ -0,0 +1,100 @@
+[[overview]]
+== Overview
+
+This manual should help you getting started with OsmoMGW. It will cover
+aspects of configuring and running the media gateway.
+
+[[intro_overview]]
+=== About OsmoMGW
+
+OsmoMGW is the Osmocom implementation of a media gateway to handle user
+plane (voice) traffic in cellular networks. It can connect and optionally
+transcode RTP voice streams between different network elements such as BTSs
+and external entities like SIP. It is typically co-located with both OsmoBSC
+and OsmoMSC and controlled by them via MGCP, the Media Gateway Control
+Protocol.
+
+[[fig-bsc]]
+.OsmoMGW used with OsmoBSC

Change in osmo-gsm-manuals[master]: Add initial OsmoMGW manual

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10279 )

Change subject: Add initial OsmoMGW manual
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
Gerrit-Change-Number: 10279
Gerrit-PatchSet: 4
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Tue, 07 Aug 2018 18:03:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: hlr: Add chapter on USSD configuration

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10363 )

Change subject: hlr: Add chapter on USSD configuration
..

hlr: Add chapter on USSD configuration

Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
---
A OsmoHLR/chapters/ussd.adoc
M OsmoHLR/osmohlr-usermanual.adoc
2 files changed, 80 insertions(+), 0 deletions(-)

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



diff --git a/OsmoHLR/chapters/ussd.adoc b/OsmoHLR/chapters/ussd.adoc
new file mode 100644
index 000..be463ac
--- /dev/null
+++ b/OsmoHLR/chapters/ussd.adoc
@@ -0,0 +1,78 @@
+[[ussd]]
+== Unstructured Supplementary Services Data (USSD)
+
+The _Unstructured Supplementary Services Data (USSD)_ is one service within
+2G/3G networks next to other services such as circuit-switched voice, 
packet-switched
+data and SMS (Short Message Service).
+
+It is on an abstract level quite similar to SMS in that USSD can be used to 
send
+textual messages.  However, there are the following differences:
+
+* USSD is between the MS (phone) and an USSD application on the network, while
+  SMS is primarily between two subscribers identified by their MSISDN
+* USSD is faster, as it doesn't suffer from the complicated three-layer 
CP/RP/TP
+  protocol stack of SMS with it's acknowledgement of the acknowledged 
acknowledgement.
+* USSD is session-oriented, i.e. a dialogue/session between subscriber and 
application
+  can persist for the transfer of more than one message.  The dedicated radio 
channel
+  on the RAN remains established throughout that dialogue.
+
+=== USSD in Osmocom
+
+Until August 2018, OsmoMSC contained some minimalistic internal USSD
+handling with no
+ability to attach/extend it with external USSD applications.
+
+From August 2018 onwards, OsmoMSC doesn't contain any internal USSD
+handlers/applications anymore.  Instead, all USSD is transported to/from
+OsmoHLR via the GSUP protocol.
+
+OsmoHLR contains some intenal USSD handlers and can route USSD messages
+to any number of external USSD entities (EUSEs).  The EUSE also use GSUP
+to communicate USSD from/to OsmoHLR.
+
+Each EUSE is identified by its name.  The name consists of a single-word
+string preceding a currently fixed ("-00-00-00-00-00-00") suffix.
+There is no authentication between EUSE and OsmoHLR: Any client program
+able to connect to the GSUP port of OsmoHLR can register as any EUSE
+(name).
+
+NOTE:: We plan to remove the requirement for this suffix as soon as we
+are done resolving all more important issues.
+
+=== USSD Configuration
+
+USSD configuration in OsmoHLR happens within the `hlr` VTY node.
+
+`euse foobar-00-00-00-00-00-00` defines an EUSE with the given name `foobar`
+
+`ussd route prefix *123 external foobar-00-00-00-00-00-00` installs a
+prefix route to the named EUSE.  All USSD short codes starting with *123 will 
be
+routed to the named EUSE.
+
+`ussd route prefix *#100# internal own-msisdn` installs a prefix route
+to the named internal USSD handler.  There above command will restore
+the old behavior, in which *#100# will return a text message containing
+the subscribers own phone number.  There is one other handler called
+`own-imsi` which will return the IMSI instead of the MSISDN.
+
+`ussd default-route external foobar-00-00-00-00-00-00` installs a
+default route to the named EUSE.  This means that all USSD codes for
+which no more specific route exists will be routed to the named EUSE.
+
+=== Example EUSE program
+
+We have provided an example EUSE developed in C language using existing
+Osmocom libraries for GSUP protocol handling and USSD encoding/decoding.
+It will register as `foobar` EUSE to OsmoHLR on localhost.  You can run
+it on a different machine by specifying e.g. `osmo-euse-demo 1.2.3.4 5678`
+to make it connect to OsmoHLR on IP address 1.2.3.4 and GSUP/TCP port
+5678.
+
+The idea is that you can use this as a template to develop your own USSD
+applications, or any gateways to other protocols or interfaces.
+
+You can find it in `osmo-hlr/src/osmo-euse-demo.c` or online by
+following the link to http://git.osmocom.org/osmo-hlr/tree/src/osmo-euse-demo.c
+
+This demonstration program will echo back any USSD message sent/routed
+to it, quoted like _You sent "..."_.
diff --git a/OsmoHLR/osmohlr-usermanual.adoc b/OsmoHLR/osmohlr-usermanual.adoc
index 043c971..d9a4654 100644
--- a/OsmoHLR/osmohlr-usermanual.adoc
+++ b/OsmoHLR/osmohlr-usermanual.adoc
@@ -14,6 +14,8 @@

 include::chapters/subscribers.adoc[]

+include::chapters/ussd.adoc[]
+
 include::../common/chapters/vty.adoc[]

 include::../common/chapters/logging.adoc[]

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageT

Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10384


Change subject: BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)
..

BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)

As the llc is handled outside, this function is not anymore needed

Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
---
M library/BSSGP_Emulation.ttcn
1 file changed, 0 insertions(+), 8 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index c650fd5..ea242d3 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -560,14 +560,6 @@
BSCP.send(f_BnsUdReq(bs_pdu, g_cfg.bvci));
}

-   [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_MS_SGSN:?) -> value l3_mo 
sender vc_conn {
-   var integer idx := f_tbl_idx_by_comp(vc_conn);
-   var octetstring l3_enc := enc_PDU_L3_MS_SGSN(l3_mo);
-   var BIT4 sapi := f_llc_sapi_by_l3_mo(l3_mo);
-   var integer n_u := 
f_llc_get_n_u_tx(ClientTable[idx].llc[bit2int(sapi)]);
-   var octetstring llc_enc := 
enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)));
-   BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, 
ClientTable[idx].cell_id, llc_enc), g_cfg.bvci));
-   }
[g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_SGSN_MS:?) -> value l3_mt 
sender vc_conn {
var integer idx := f_tbl_idx_by_comp(vc_conn);
var octetstring l3_enc := enc_PDU_L3_SGSN_MS(l3_mt);

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
Gerrit-Change-Number: 10384
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: introduce TC_attach_rau_a_b

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10387


Change subject: sgsn: introduce TC_attach_rau_a_b
..

sgsn: introduce TC_attach_rau_a_b

MS <-> SGSN: Successful Attach
MS  -> SGSN: Routing Area _a_ Update Request
MS <-  SGSN: Routing Area _a_ Update Accept
MS  -> SGSN: Routing Area _b_ Update Request
MS <-  SGSN: Routing Area _b_ Update Accept
MS  -> SGSN: Detach (PowerOff)

Change-Id: Ie636778628c216e315bd6f5bc11e0e5bd9c218a5
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 34 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 1ee71b6..18e9c20 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1871,6 +1871,39 @@
vc_conn.done;
 }

+private function f_TC_attach_rau_a_b(charstring id) runs on BSSGP_ConnHdlr {
+   var BssgpDecoded bd;
+
+   f_TC_attach(id);
+
+   log("attach complete sending rau");
+   f_routing_area_update(g_pars.ra, 0);
+
+   log("rau complete unregistering");
+   f_bssgp_client_unregister(g_pars.imsi);
+   f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[1], BSSGP_PROC[1]);
+
+   log("sending second RAU via different RA");
+   f_routing_area_update(f_cellid_to_RAI(g_pars.bssgp_cell_id[1]), 1);
+
+   f_detach_mo(c_GMM_DTT_MO_GPRS, true, true, 1);
+}
+
+testcase TC_attach_rau_a_b() runs on test_CT {
+   /* MS <-> SGSN: Successful Attach
+* MS  -> SGSN: Routing Area _a_ Update Request
+* MS <-  SGSN: Routing Area _a_ Update Accept
+* MS  -> SGSN: Routing Area _b_ Update Request
+* MS <-  SGSN: Routing Area _b_ Update Accept
+* MS  -> SGSN: Detach (PowerOff)
+*/
+   var BSSGP_ConnHdlr vc_conn;
+   f_init();
+   f_sleep(1.0);
+   vc_conn := f_start_handler(refers(f_TC_attach_rau_a_b), testcasename(), 
g_gb, 38);
+   vc_conn.done;
+}
+
 control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1897,6 +1930,7 @@
execute( TC_rau_unknown() );
execute( TC_attach_rau() );
execute( TC_attach_rau_a_a() );
+   execute( TC_attach_rau_a_b() );
execute( TC_detach_unknown_nopoweroff() );
execute( TC_detach_unknown_poweroff() );
execute( TC_detach_nopoweroff() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie636778628c216e315bd6f5bc11e0e5bd9c218a5
Gerrit-Change-Number: 10387
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: increase the timeout of some TC

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10389


Change subject: sgsn: increase the timeout of some TC
..

sgsn: increase the timeout of some TC

Because of multiple BSSGP connections, the tests need more time to complete.

Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 7 insertions(+), 7 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 07bf5fd..dcfefaf 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1920,14 +1920,14 @@
execute( TC_attach_closed() );
execute( TC_attach_no_imei_response() );
execute( TC_attach_no_imsi_response() );
-   execute( TC_attach_closed_add_vty(), 10.0 );
-   execute( TC_attach_check_subscriber_list(), 10.0 );
-   execute( TC_attach_detach_check_subscriber_list(), 10.0 );
+   execute( TC_attach_closed_add_vty(), 20.0 );
+   execute( TC_attach_check_subscriber_list(), 20.0 );
+   execute( TC_attach_detach_check_subscriber_list(), 20.0 );
execute( TC_attach_check_complete_resend() );
-   execute( TC_hlr_location_cancel_request_update(), 10.0 );
-   execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );
-   execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 
10.0 );
-   execute( TC_hlr_location_cancel_request_unknown_subscriber_update(), 
10.0 );
+   execute( TC_hlr_location_cancel_request_update(), 20.0 );
+   execute( TC_hlr_location_cancel_request_withdraw(), 20.0 );
+   execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 
20.0 );
+   execute( TC_hlr_location_cancel_request_unknown_subscriber_update(), 
20.0 );
execute( TC_rau_unknown() );
execute( TC_attach_rau() );
execute( TC_attach_rau_a_a() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
Gerrit-Change-Number: 10389
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: introduce f_routing_area_update()

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10379


Change subject: sgsn: introduce f_routing_area_update()
..

sgsn: introduce f_routing_area_update()

Will be used by future RAU tests

Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 21 insertions(+), 14 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 92f139f..839fe3a 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -800,20 +800,8 @@
/* first perform regular attach */
f_TC_attach(id);

-   /* then send RAU */
-   BSSGP[0].send(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, 
false, omit, omit));
-   alt {
-   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
-   
f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept);
-   BSSGP[0].send(ts_GMM_RAU_COMPL);
-   setverdict(pass);
-   }
-   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
-   setverdict(fail, "Unexpected RAU Reject");
-   mtc.stop;
-   }
-   [] BSSGP[0].receive { repeat; }
-   }
+   f_routing_area_update(g_pars.ra);
+
 }
 testcase TC_attach_rau() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
@@ -1807,6 +1795,25 @@
vc_conn.done;
 }

+private function f_routing_area_update(RoutingAreaIdentificationV ra, integer 
bssgp := 0) runs on BSSGP_ConnHdlr {
+   var BssgpDecoded bd;
+
+   /* then send RAU */
+   BSSGP[bssgp].send(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, 
g_pars.ra, false, omit, omit));
+   alt {
+   [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
+   
f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept);
+   BSSGP[bssgp].send(ts_GMM_RAU_COMPL);
+   setverdict(pass);
+   }
+   [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
+   setverdict(fail, "Unexpected RAU Reject");
+   mtc.stop;
+   }
+   [] BSSGP[bssgp].receive { repeat; }
+   }
+}
+
 control {
execute( TC_attach() );
execute( TC_attach_mnc3() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
Gerrit-Change-Number: 10379
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-sgsn[master]: tests: remove gmm unit tests

2018-08-07 Thread lynxis lazus
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/9258

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

Change subject: tests: remove gmm unit tests
..

tests: remove gmm unit tests

The test cases now implemented by TTCN3 which should not be as fragile
as the unit tests. Because the unit tests expect a quite strong internal
state to be happen.
Change-Id: Iac1c8854b5ea4aa03279990390ebc110c979aac2
---
M tests/sgsn/sgsn_test.c
1 file changed, 0 insertions(+), 818 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iac1c8854b5ea4aa03279990390ebc110c979aac2
Gerrit-Change-Number: 9258
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-ttcn3-hacks[master]: sgsn: introduce TC_attach_rau_a_a()

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10380


Change subject: sgsn: introduce TC_attach_rau_a_a()
..

sgsn: introduce TC_attach_rau_a_a()

MS <-> SGSN: Successful Attach
MS  -> SGSN: Routing Area Update Request
MS <-  SGSN: Routing Area Update Accept
MS  -> SGSN: Routing Area Update Request
MS <-  SGSN: Routing Area Update Accept
MS  -> SGSN: Detach (PowerOff)

Change-Id: Id76b4792c07816bcbe5e965f23c2b526df0923c3
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 31 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 839fe3a..ab6f651 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1814,6 +1814,36 @@
}
 }

+private function f_TC_attach_rau_a_a(charstring id) runs on BSSGP_ConnHdlr {
+   var BssgpDecoded bd;
+
+   /* first perform regular attach */
+   f_TC_attach(id);
+
+   /* then send RAU */
+   f_routing_area_update(g_pars.ra);
+
+   /* do another RAU */
+   f_routing_area_update(g_pars.ra);
+
+   f_detach_mo(c_GMM_DTT_MO_GPRS, true, true);
+}
+
+testcase TC_attach_rau_a_a() runs on test_CT {
+   /* MS <-> SGSN: Successful Attach
+* MS  -> SGSN: Routing Area Update Request
+* MS <-  SGSN: Routing Area Update Accept
+* MS  -> SGSN: Routing Area Update Request
+* MS <-  SGSN: Routing Area Update Accept
+* MS  -> SGSN: Detach (PowerOff)
+*/
+   var BSSGP_ConnHdlr vc_conn;
+   f_init();
+   f_sleep(1.0);
+   vc_conn := f_start_handler(refers(f_TC_attach_rau_a_a), testcasename(), 
g_gb, 37);
+   vc_conn.done;
+}
+
 control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1839,6 +1869,7 @@
execute( TC_hlr_location_cancel_request_unknown_subscriber_update(), 
10.0 );
execute( TC_rau_unknown() );
execute( TC_attach_rau() );
+   execute( TC_attach_rau_a_a() );
execute( TC_detach_unknown_nopoweroff() );
execute( TC_detach_unknown_poweroff() );
execute( TC_detach_nopoweroff() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id76b4792c07816bcbe5e965f23c2b526df0923c3
Gerrit-Change-Number: 10380
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: add TC_attach_gmm_attach_req_while_gmm_attach

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10392


Change subject: sgsn: add TC_attach_gmm_attach_req_while_gmm_attach
..

sgsn: add TC_attach_gmm_attach_req_while_gmm_attach

Testing the corner case of receiving a Attach Request
while not (yet) sent an Attach Request.

MS -> SGSN: Attach Request IMSI
MS <- SGSN: Identity Request IMSI (optional)
MS -> SGSN: Identity Response IMSI (optional)
MS <- SGSN: Identity Request IMEI
MS -> SGSN: Attach Request (2nd)
MS <- SGSN: Identity Response IMEI
MS <- SGSN: Attach Accept
MS -> SGSN: Attach Complete

Change-Id: I0bac50dc5a72ba8f9010b05bcb98aa7ff0b81cf6
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 73 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index a6a3c6c..2c987c4 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1915,6 +1915,78 @@
vc_conn.done;
 }

+private function f_TC_attach_gmm_attach_req_while_gmm_attach(charstring id) 
runs on BSSGP_ConnHdlr {
+   var integer count_req := 0;
+   var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+   var RoutingAreaIdentificationV rand_rai := f_random_RAI();
+   var BssgpDecoded bd;
+
+   f_send_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, 
omit, omit));
+
+   alt {
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+   setverdict(fail, "Unexpected GMM ATTACH REJECT");
+   mtc.stop;
+   }
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+   mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+   f_send_llc(ts_GMM_ID_RESP(mi));
+   repeat;
+   }
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+   /* send out a second GMM_Attach Request.
+* If the SGSN follows the rules, this 2nd ATTACH REQ 
should be ignored, because
+* of the same content */
+   f_send_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, 
true, false, omit, omit));
+   mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
+   f_send_llc(ts_GMM_ID_RESP(mi));
+   }
+   }
+   f_sleep(1.0);
+
+   /* we've sent already a IMEI answer, we should NOT asked again for IMEI 
*/
+   alt {
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+   mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+   f_send_llc(ts_GMM_ID_RESP(mi));
+   repeat;
+   }
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+   setverdict(fail, "Unexpected GMM ID REQ (IMEI).");
+   mtc.stop;
+   }
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+   setverdict(fail, "Unexpected GMM ATTACH REJECT");
+   mtc.stop;
+   }
+   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, 
?))) -> value bd {
+   
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+   f_send_llc(ts_GMM_ATTACH_COMPL);
+   setverdict(pass);
+   /* FIXME: Extract P-TMSI, if any. Only send Complete if 
necessary */
+   }
+   }
+}
+
+testcase TC_attach_gmm_attach_req_while_gmm_attach() runs on test_CT {
+   /* Testing if the SGSN ignore Attach Request with the exact same 
content */
+   /* MS -> SGSN: Attach Request IMSI
+* MS <- SGSN: Identity Request IMSI (optional)
+* MS -> SGSN: Identity Response IMSI (optional)
+* MS <- SGSN: Identity Request IMEI
+* MS -> SGSN: Attach Request (2nd)
+* MS <- SGSN: Identity Response IMEI
+* MS <- SGSN: Attach Accept
+* MS -> SGSN: Attach Complete
+*/
+   var BSSGP_ConnHdlr vc_conn;
+   f_init();
+   f_sleep(1.0);
+   f_vty_config(SGSNVTY, "sgsn", "auth-policy accept-all");
+   vc_conn := 
f_start_handler(refers(f_TC_attach_gmm_attach_req_while_gmm_attach), 
testcasename(), g_gb, 39);
+   vc_conn.done;
+}
+
 control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1957,6 +2029,7 @@
execute( TC_attach_restart_ctr_create() );
execute( TC_attach_pdp_act_deact_mt_t3395_expire() );
execute( TC_attach_pdp_act_user_error_ind_ggsn() );
+   execute( TC_attach_gmm_attach_req_while_gmm_attach() );
 }



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-

Change in osmo-ttcn3-hacks[master]: sgsn: fill g_gb configs for the remaining Gb interfaces

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10375


Change subject: sgsn: fill g_gb configs for the remaining Gb interfaces
..

sgsn: fill g_gb configs for the remaining Gb interfaces

When testing with multiple Routing Areas, multiple Gb
interface are required.

Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 26 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index ce796e8..6c94d14 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -188,6 +188,32 @@
},
sgsn_role := false
};
+   g_gb[1].cfg := {
+   nsei := 97,
+   bvci := 210,
+   cell_id := {
+   ra_id := {
+   lai := {
+   mcc_mnc := mcc_mnc, lac := 13200},
+   rac := 0
+   },
+   cell_id := 20961
+   },
+   sgsn_role := false
+   };
+   g_gb[2].cfg := {
+   nsei := 98,
+   bvci := 220,
+   cell_id := {
+   ra_id := {
+   lai := {
+   mcc_mnc := mcc_mnc, lac := 13300},
+   rac := 0
+   },
+   cell_id := 20962
+   },
+   sgsn_role := false
+   };

f_init_gb(g_gb[0], "SGSN_Test-Gb0");
f_init_gsup("SGSN_Test");

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
Gerrit-Change-Number: 10375
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: dont fail when removing a non-exitent client

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10385


Change subject: BSSGP_Emulation: dont fail when removing a non-exitent client
..

BSSGP_Emulation: dont fail when removing a non-exitent client

On multiple BSSGP tests the IMSI might not anymore registered to the first BSSGP

Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
---
M library/BSSGP_Emulation.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index ea242d3..fa33f51 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -321,8 +321,8 @@
return;
}
}
-   setverdict(fail, "Could not find client for IMSI ", imsi);
-   mtc.stop;
+   log("Warning: Could not find client for IMSI ", imsi);
+   return;
 }

 /* TS 44.064 7.2.1.1 LLGMM-ASSIGN */

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
Gerrit-Change-Number: 10385
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSG...

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10391


Change subject: sgsn: rework TC_attach_closed_add_vty to be executed in a 
single BSSGP_ConnHldr
..

sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSGP_ConnHldr

When stopping and starting BSSGP_ConnHdlr multiple times, there
are Port connecting problems. Using a single iteration of
BSSGP_ConnHldr.start() works around this problem.

Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 13 insertions(+), 6 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 43c297e..a6a3c6c 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1738,7 +1738,7 @@
/* unregister the old IMSI */
f_bssgp_client_unregister(g_pars.imsi);
/* Simulate a foreign IMSI */
-   g_pars.imsi := '001010123456789'H;
+   g_pars.imsi := '001010123456700'H;
f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[0]);

/* there is no auth */
@@ -1758,6 +1758,15 @@
}
}
 }
+
+private function f_TC_attach_closed_add_vty(charstring id) runs on 
BSSGP_ConnHdlr {
+
+   f_TC_attach_closed_foreign(id);
+   f_TC_attach_closed_imsi_added(id);
+
+}
+
+
 testcase TC_attach_closed_add_vty() runs on test_CT {
/* VTY-> SGSN: policy close
 * MS -> SGSN: Attach Request
@@ -1777,12 +1786,10 @@
f_sleep(1.0);
f_vty_config(SGSNVTY, "sgsn", "auth-policy closed");
f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456789");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456700");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456700");
/* test with foreign IMSI: Must Reject */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_foreign), 
testcasename(), g_gb, 9);
-   vc_conn.done;
-   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456789");
-   /* test with same IMSI: Must Accept */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_imsi_added), 
testcasename(), g_gb, 10);
+   vc_conn := f_start_handler(refers(f_TC_attach_closed_add_vty), 
testcasename(), g_gb, 9);
vc_conn.done;
 }


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
Gerrit-Change-Number: 10391
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: fix TC_attach_check_complete_resend

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10390


Change subject: sgsn: fix TC_attach_check_complete_resend
..

sgsn: fix TC_attach_check_complete_resend

TC_attach_check_complete_resend tests if the SGSN sends out the SGSN
Attach Accept multiple times. If the MS disappear,
there is no need for a ATTACH REJECT.

Change-Id: I3fa5c100b8389e184acf1e71e2792e5474c22dec
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 4 insertions(+), 1 deletion(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index dcfefaf..43c297e 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1793,13 +1793,16 @@
f_send_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, 
false, omit, omit));
f_gmm_auth();

+   timer T := 10.0;
+   T.start;
alt {
-   [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+   [] T.timeout {
/* break */
}
[] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) 
{
/* ignore */
count_req := count_req + 1;
+   T.start;
repeat;
}
}

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fa5c100b8389e184acf1e71e2792e5474c22dec
Gerrit-Change-Number: 10390
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: add type record LLC_Entities

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10382


Change subject: BSSGP_Emulation: add type record LLC_Entities
..

BSSGP_Emulation: add type record LLC_Entities

In prepartion of moving the LLC layer out of the BSSGP

Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
---
M library/BSSGP_Emulation.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index a9d2a25..ca97ccd 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -116,6 +116,8 @@
var ClientEntity ClientTable[16];
 }

+type record length(16) of LLC_Entity LLC_Entities;
+
 type record ClientEntity {
OCT4 tlli,
OCT4 tlli_old optional,

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
Gerrit-Change-Number: 10382
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of B...

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10377


Change subject: BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 
instances of BSSGP
..

BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of BSSGP

Change-Id: Ibd7abba826a08b582361e9c255e9c44185e14067
---
M library/BSSGP_Emulation.ttcn
M pcu/PCU_Tests.ttcn
M sgsn/SGSN_Tests.ttcn
3 files changed, 112 insertions(+), 112 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index 8b3b9eb..a9d2a25 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -79,9 +79,9 @@
  ***/

 type component BSSGP_Client_CT {
-   port BSSGP_PT BSSGP;
-   port BSSGP_PT BSSGP_SIG;
-   port BSSGP_PROC_PT BSSGP_PROC;
+   port BSSGP_PT BSSGP[3];
+   port BSSGP_PT BSSGP_SIG[3];
+   port BSSGP_PROC_PT BSSGP_PROC[3];
 };

 /***
@@ -660,14 +660,14 @@
return dec;
 }

-function f_bssgp_client_register(hexstring imsi, OCT4 tlli, BssgpCellId 
cell_id, BSSGP_PROC_PT PT := BSSGP_PROC)
+function f_bssgp_client_register(hexstring imsi, OCT4 tlli, BssgpCellId 
cell_id, BSSGP_PROC_PT PT := BSSGP_PROC[0])
 runs on BSSGP_Client_CT {
PT.call(BSSGP_register_client:{imsi, tlli, cell_id}) {
[] PT.getreply(BSSGP_register_client:{imsi, tlli, cell_id}) {};
}
 }

-function f_bssgp_client_unregister(hexstring imsi, BSSGP_PROC_PT PT := 
BSSGP_PROC)
+function f_bssgp_client_unregister(hexstring imsi, BSSGP_PROC_PT PT := 
BSSGP_PROC[0])
 runs on BSSGP_Client_CT {
PT.call(BSSGP_unregister_client:{imsi}) {
[] PT.getreply(BSSGP_unregister_client:{imsi}) {};
@@ -675,7 +675,7 @@
 }

 /* TS 44.064 7.2.1.1 LLGMM-ASSIGN */
-function f_bssgp_client_llgmm_assign(OCT4 tlli_old, OCT4 tlli_new, 
BSSGP_PROC_PT PT := BSSGP_PROC)
+function f_bssgp_client_llgmm_assign(OCT4 tlli_old, OCT4 tlli_new, 
BSSGP_PROC_PT PT := BSSGP_PROC[0])
 runs on BSSGP_Client_CT {
PT.call(BSSGP_llgmm_assign:{tlli_old, tlli_new}) {
[] PT.getreply(BSSGP_llgmm_assign:{tlli_old, tlli_new}) {};
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index dfd380d..107903f 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -59,9 +59,9 @@
ns_component := NS_CT.create;
bssgp_component := BSSGP_CT.create;
/* connect our BSSGP port to the BSSGP Emulation */
-   connect(self:BSSGP, bssgp_component:BSSGP_SP);
-   connect(self:BSSGP_SIG, bssgp_component:BSSGP_SP_SIG);
-   connect(self:BSSGP_PROC, bssgp_component:BSSGP_PROC);
+   connect(self:BSSGP[0], bssgp_component:BSSGP_SP);
+   connect(self:BSSGP_SIG[0], bssgp_component:BSSGP_SP_SIG);
+   connect(self:BSSGP_PROC[0], bssgp_component:BSSGP_PROC);
/* connect lower-end of BSSGP with BSSGP_CODEC_PORT (maps to 
NS_PT*/
connect(bssgp_component:BSCP, ns_component:NS_SP);
/* connect lower-end of NS emulation to NS_CODEC_PORT (on top 
of IPl4) */
@@ -177,7 +177,7 @@

log(ts_BSSGP_DL_UD(g_mmctx.tlli, enc_PDU_LLC(llc)));

-   BSSGP.send(ts_BSSGP_DL_UD(g_mmctx.tlli, enc_PDU_LLC(llc)));
+   BSSGP[0].send(ts_BSSGP_DL_UD(g_mmctx.tlli, enc_PDU_LLC(llc)));
}

/* Establish BSSGP connection to PCU */
@@ -187,8 +187,8 @@
f_init();
T.start
alt {
-   [] BSSGP.receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) 
{ }
-   [] BSSGP.receive { repeat; }
+   [] BSSGP[0].receive(t_BssgpStsInd(?, ?, 
BVC_S_UNBLOCKED)) { }
+   [] BSSGP[0].receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout establishing BSSGP 
connection");
mtc.stop;
@@ -206,17 +206,17 @@
f_init();

/* Send paging on signalling BVCI 0 since osmo-pcu does not 
support paging on PTP yet. */
-   BSSGP_SIG.send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
-   BSSGP_SIG.send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
+   BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
+   BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, 
tmsi));

while (true) {
var BssgpDecoded bd;
alt {
-   [] BSSGP.receive(tr_BD_L3_MT(?)) -> value bd {
+   [] BSSGP[0].receive(tr_BD_L3_MT(?)) -> value bd 
{
  

Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: move LLC layer out of BSSGP

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10383


Change subject: BSSGP_Emulation: move LLC layer out of BSSGP
..

BSSGP_Emulation: move LLC layer out of BSSGP

The LLC layer needs to be accessed by the SGSN tests
in order to do multi-BSSGP tests.
Otherwise the sgsn will see LLC frame with wrong sequence
numbers and drop them.

Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
---
M library/BSSGP_Emulation.ttcn
M sgsn/SGSN_Tests.ttcn
2 files changed, 54 insertions(+), 35 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index ca97ccd..c650fd5 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -136,6 +136,14 @@
uint9_t n_u_rx_last optional
 };

+function f_llc_create(boolean sgsn_role := false) return LLC_Entities {
+   var LLC_Entities llc;
+   for (var integer i := 0; i < 16; i := i+1) {
+   llc[i] := valueof(t_LLC_init(sgsn_role));
+   }
+   return llc;
+}
+
 private template LLC_Entity t_LLC_init(boolean sgsn_role := false) := {
sgsn_role := sgsn_role,
n_u_tx_next := 0,
@@ -576,13 +584,13 @@
}
 }

-private function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t {
+function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t {
var uint9_t ret := llc.n_u_tx_next;
llc.n_u_tx_next := llc.n_u_tx_next + 1;
return ret;
 }

-private function f_llc_sapi_by_l3_mo(PDU_L3_MS_SGSN l3_mo) return BIT4 {
+function f_llc_sapi_by_l3_mo(PDU_L3_MS_SGSN l3_mo) return BIT4 {
if (ischosen(l3_mo.msgs.gprs_mm)) {
return c_LLC_SAPI_LLGMM;
} else if (ischosen(l3_mo.msgs.gprs_sm)) {
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 54a5fe1..974576f 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -73,6 +73,7 @@
 type component BSSGP_ConnHdlr extends BSSGP_Client_CT, GSUP_ConnHdlr, 
GTP_ConnHdlr {
var BSSGP_ConnHdlrPars g_pars;
timer g_Tguard;
+   var LLC_Entities llc;
 }

 type record SGSN_ConnHdlrNetworkPars {
@@ -301,6 +302,8 @@
/* do some common stuff like setting up g_pars */
g_pars := pars;

+   llc := f_llc_create(false);
+
/* register with BSSGP core */
f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[0]);
/* tell GSUP dispatcher to send this IMSI to us */
@@ -335,16 +338,24 @@
f_sleep(20.0);
 }

+function f_send_llc(template PDU_L3_MS_SGSN l3_mo, integer gb_index := 0) runs 
on BSSGP_ConnHdlr {
+   var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo));
+   var BIT4 sapi := f_llc_sapi_by_l3_mo(valueof(l3_mo));
+   var integer n_u := f_llc_get_n_u_tx(llc[bit2int(sapi)]);
+   var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, 
'0'B, n_u)));
+   BSSGP[gb_index].send(ts_BSSGP_UL_UD(g_pars.tlli, 
g_pars.bssgp_cell_id[gb_index], llc_enc));
+}
+
 altstep as_mm_identity() runs on BSSGP_ConnHdlr {
var MobileL3_CommonIE_Types.MobileIdentityLV mi;
[] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
-   BSSGP[0].send(ts_GMM_ID_RESP(mi));
+   f_send_llc(ts_GMM_ID_RESP(mi));
repeat;
}
[] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
-   BSSGP[0].send(ts_GMM_ID_RESP(mi));
+   f_send_llc(ts_GMM_ID_RESP(mi));
repeat;
}
 }
@@ -413,7 +424,7 @@

l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv :=

valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
}
-   BSSGP[0].send(l3_mo);
+   f_send_llc(l3_mo);
} else {
/* wait for identity procedure */
f_sleep(1.0);
@@ -519,7 +530,7 @@
 * revisionLevelIndicatior is at the wrong place! */

attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability
 := '0'B;

-   BSSGP[0].send(attach_req);
+   f_send_llc(attach_req);
f_gmm_auth(umts_aka_challenge, force_gsm_sres);
/* Expect SGSN to perform LU with HLR */
f_gmm_gsup_lu_isd();
@@ -528,7 +539,7 @@
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
}
/* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */
-   BSSGP[0].send(ts_GMM_ATTACH_COMPL);
+   f_send_llc(ts_GMM_ATTACH_COMPL);
 }

 private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {
@@ -580,7 +591,7 @@
 private function f_TC_attach_auth_id_timeout(charstring id) runs on 
BSSGP_ConnHdlr {

Change in osmo-ttcn3-hacks[master]: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdow...

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10374


Change subject: sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround 
shutdown problems
..

sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdown problems

When introducing multiple BSSGP instances, this
tests has problem when shutting down the test.

Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 10 insertions(+), 1 deletion(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 0a20dd6..ce796e8 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -979,11 +979,20 @@
} else {
GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, 
apars.nsapi, '1'B));
}
+
+   timer T := 5.0;
+   T.start;
+
alt {
[] BSSGP.receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, 
true))) {
BSSGP.send(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
}
-   [not error_ind] GTP.receive(tr_GTPC_MsgType(?, 
deletePDPContextResponse, apars.ggsn_tei_c)) { }
+   [not error_ind] GTP.receive(tr_GTPC_MsgType(?, 
deletePDPContextResponse, apars.ggsn_tei_c)) {
+   repeat;
+   }
+   [] T.timeout {
+   setverdict(fail, "Waiting for SM_DEACT_PDP_REQ_MT");
+   }
}
 }


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
Gerrit-Change-Number: 10374
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: add f_cellid_to_RAI()

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10381


Change subject: sgsn: add f_cellid_to_RAI()
..

sgsn: add f_cellid_to_RAI()

Returns a RoutingAreaIdentificationV from GbInstance. This will be useful
when using multiple BSSGP and the g_pars.ra field is not the needed ra.

Change-Id: Ide96213ab2f210590b86deaf370486c8a0a78058
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 16 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index ab6f651..54a5fe1 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -101,6 +101,22 @@
float t_guard
 };

+private function f_cellid_to_RAI(in BssgpCellId cell_id) return 
RoutingAreaIdentificationV {
+   var BcdMccMnc mcc_mnc := cell_id.ra_id.lai.mcc_mnc;
+
+var RoutingAreaIdentificationV ret := {
+mccDigit1 := mcc_mnc[0],
+mccDigit2 := mcc_mnc[1],
+mccDigit3 := mcc_mnc[2],
+mncDigit3 := mcc_mnc[5],
+mncDigit1 := mcc_mnc[3],
+mncDigit2 := mcc_mnc[4],
+lac := int2oct(cell_id.ra_id.lai.lac, 16),
+rac := int2oct(cell_id.ra_id.rac, 8)
+}
+return ret;
+};
+
 private function f_init_gb(inout GbInstance gb, charstring id, integer offset) 
runs on test_CT {
gb.vc_NS := NS_CT.create(id & "-NS" & int2str(offset));
gb.vc_BSSGP := BSSGP_CT.create(id & "-BSSGP" & int2str(offset));

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide96213ab2f210590b86deaf370486c8a0a78058
Gerrit-Change-Number: 10381
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: create 3 instances of BSSGP at the same time

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10378


Change subject: sgsn: create 3 instances of BSSGP at the same time
..

sgsn: create 3 instances of BSSGP at the same time

Allows to use different BSSGP connection within a single
test.

Change-Id: I01d7f264a0a52e248d6e754485c807266c0b14bf
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 66 insertions(+), 57 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index c787310..92f139f 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -51,8 +51,11 @@
BssgpConfig cfg
 };

+type record length(3) of GbInstance GbInstances;
+type record length(3) of BssgpCellId BssgpCellIds;
+
 type component test_CT {
-   var GbInstance g_gb[3];
+   var GbInstances g_gb;

var GSUP_Emulation_CT vc_GSUP;
var IPA_Emulation_CT vc_GSUP_IPA;
@@ -92,21 +95,21 @@
OCT4 tlli,
OCT4 tlli_old optional,
RoutingAreaIdentificationV ra optional,
-   BssgpCellId bssgp_cell_id,
+   BssgpCellIds bssgp_cell_id,
AuthVector vec optional,
SGSN_ConnHdlrNetworkPars net,
float t_guard
 };

-private function f_init_gb(inout GbInstance gb, charstring id) runs on test_CT 
{
-   gb.vc_NS := NS_CT.create(id & "-NS");
-   gb.vc_BSSGP := BSSGP_CT.create(id & "-BSSGP");
+private function f_init_gb(inout GbInstance gb, charstring id, integer offset) 
runs on test_CT {
+   gb.vc_NS := NS_CT.create(id & "-NS" & int2str(offset));
+   gb.vc_BSSGP := BSSGP_CT.create(id & "-BSSGP" & int2str(offset));
/* connect lower end of BSSGP emulation with NS upper port */
connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP);
/* connect lower end of NS emulation to NS codec port (on top of IPL4) 
*/
map(gb.vc_NS:NSCP, system:NS_CODEC_PORT);

-   gb.vc_NS.start(NSStart());
+   gb.vc_NS.start(NSStart(offset));
gb.vc_BSSGP.start(BssgpStart(gb.cfg));
 }

@@ -215,7 +218,9 @@
sgsn_role := false
};

-   f_init_gb(g_gb[0], "SGSN_Test-Gb0");
+   f_init_gb(g_gb[0], "SGSN_Test-Gb0", 0);
+   f_init_gb(g_gb[1], "SGSN_Test-Gb0", 1);
+   f_init_gb(g_gb[2], "SGSN_Test-Gb0", 2);
f_init_gsup("SGSN_Test");
f_init_gtp("SGSN_Test");
f_init_vty();
@@ -225,7 +230,7 @@
 type function void_fn(charstring id) runs on BSSGP_ConnHdlr;

 /* helper function to create, connect and start a BSSGP_ConnHdlr component */
-function f_start_handler(void_fn fn, charstring id, GbInstance gb, integer 
imsi_suffix,
+function f_start_handler(void_fn fn, charstring id, GbInstances gb, integer 
imsi_suffix,
 float t_guard := 30.0)
 runs on test_CT return BSSGP_ConnHdlr {
var BSSGP_ConnHdlr vc_conn;
@@ -243,15 +248,19 @@
tlli := f_gprs_tlli_random(),
tlli_old := omit,
ra := omit,
-   bssgp_cell_id := gb.cfg.cell_id,
+   bssgp_cell_id := { gb[0].cfg.cell_id, gb[1].cfg.cell_id, 
gb[2].cfg.cell_id },
vec := omit,
net := net_pars,
t_guard := t_guard
};

vc_conn := BSSGP_ConnHdlr.create(id);
-   connect(vc_conn:BSSGP[0], gb.vc_BSSGP:BSSGP_SP);
-   connect(vc_conn:BSSGP_PROC[0], gb.vc_BSSGP:BSSGP_PROC);
+   connect(vc_conn:BSSGP[0], gb[0].vc_BSSGP:BSSGP_SP);
+   connect(vc_conn:BSSGP_PROC[0], gb[0].vc_BSSGP:BSSGP_PROC);
+   connect(vc_conn:BSSGP[1], gb[1].vc_BSSGP:BSSGP_SP);
+   connect(vc_conn:BSSGP_PROC[1], gb[1].vc_BSSGP:BSSGP_PROC);
+   connect(vc_conn:BSSGP[2], gb[2].vc_BSSGP:BSSGP_SP);
+   connect(vc_conn:BSSGP_PROC[2], gb[2].vc_BSSGP:BSSGP_PROC);

connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT);
connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC);
@@ -277,7 +286,7 @@
g_pars := pars;

/* register with BSSGP core */
-   f_bssgp_client_register(g_pars.imsi, g_pars.tlli, g_pars.bssgp_cell_id);
+   f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[0]);
/* tell GSUP dispatcher to send this IMSI to us */
f_create_gsup_expect(hex2str(g_pars.imsi));
/* tell GTP dispatcher to send this IMSI to us */
@@ -408,9 +417,9 @@
 function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on 
BSSGP_ConnHdlr {
/* mandatory IE */
var hexstring aa_plmn := 
f_RAI_to_plmn_hexstr(aa.routingAreaIdentification);
-   if (not (g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc == aa_plmn)) {
+   if (not (g_pars.bssgp_cell_id[0].ra_id.lai.mcc_mnc == aa_plmn)) {
  setverdict(fail, "mismatching PLMN in Attach Accept: " & 
hex2str(aa_plmn)
-  & "; expected " & 
hex2str(g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc));
+  & "; expected " & 

Change in osmo-sgsn[master]: gprs_gmm: introduce a GMM Attach Request FSM

2018-08-07 Thread lynxis lazus
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/9257

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

Change subject: gprs_gmm: introduce a GMM Attach Request FSM
..

gprs_gmm: introduce a GMM Attach Request FSM

The old GMM Attach Request handling used a recursive function
which can not handle certain states and is quite complex and hard to
extend.

The new FSM handles such request in a FSM and can be called multiple
times.

Change-Id: I58b9c17be9776a03bb2a5b21e99135cfefc8c912
---
M include/osmocom/sgsn/gprs_gmm.h
M include/osmocom/sgsn/gprs_sgsn.h
M src/gprs/Makefile.am
M src/gprs/gprs_gmm.c
A src/gprs/gprs_gmm_attach.c
A src/gprs/gprs_gmm_attach.h
M src/gprs/gprs_sgsn.c
M tests/sgsn/Makefile.am
8 files changed, 476 insertions(+), 8 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I58b9c17be9776a03bb2a5b21e99135cfefc8c912
Gerrit-Change-Number: 9257
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: use vty cmd `reset sgsn state`.

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10388


Change subject: sgsn: use vty cmd `reset sgsn state`.
..

sgsn: use vty cmd `reset sgsn state`.

Cleans most of the sgsn state.

Change-Id: Idff3de6f1b8f5cb503edc5c6256ce2bf7ec7aaa2
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 2 insertions(+), 1 deletion(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 18e9c20..07bf5fd 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -178,6 +178,7 @@
map(self:SGSNVTY, system:SGSNVTY);
f_vty_set_prompts(SGSNVTY);
f_vty_transceive(SGSNVTY, "enable");
+   f_vty_transceive(SGSNVTY, "reset sgsn state");
f_vty_config(SGSNVTY, "sgsn", "auth-policy remote");
 }

@@ -235,12 +236,12 @@
sgsn_role := false
};

+   f_init_vty();
f_init_gb(g_gb[0], "SGSN_Test-Gb0", 0);
f_init_gb(g_gb[1], "SGSN_Test-Gb0", 1);
f_init_gb(g_gb[2], "SGSN_Test-Gb0", 2);
f_init_gsup("SGSN_Test");
f_init_gtp("SGSN_Test");
-   f_init_vty();
f_vty_enable_echo_interval(g_use_echo);
 }


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idff3de6f1b8f5cb503edc5c6256ce2bf7ec7aaa2
Gerrit-Change-Number: 10388
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: NS_Emulation: support multiple instances at the same time

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10376


Change subject: NS_Emulation: support multiple instances at the same time
..

NS_Emulation: support multiple instances at the same time

The NS_Emulation has multiple configuration values hardcoded.
Add an offset parameter to NSStart which adds to:
- the source udp port
- nsei
- nsvci.

Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
---
M library/NS_Emulation.ttcn
1 file changed, 22 insertions(+), 16 deletions(-)



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

diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn
index 01d45b4..1095ae5 100644
--- a/library/NS_Emulation.ttcn
+++ b/library/NS_Emulation.ttcn
@@ -72,7 +72,10 @@
out NsUnitdataRequest;
} with { extension "internal" };

-   function NSStart() runs on NS_CT {
+   function NSStart(integer init_offset := 0) runs on NS_CT {
+   offset := init_offset;
+   nsei := mp_nsei + offset;
+   nsvci := mp_nsvci + offset;
f_init();
f_ScanEvents();
}
@@ -80,7 +83,7 @@
private function f_init() runs on NS_CT {
var Result res;
/* Connect the UDP socket */
-   res := f_IPL4_connect(NSCP, mp_remote_ip, mp_remote_udp_port, 
mp_local_ip, mp_local_udp_port, 0, { udp := {}});
+   res := f_IPL4_connect(NSCP, mp_remote_ip, mp_remote_udp_port, 
mp_local_ip, mp_local_udp_port + offset, 0, { udp := {}});
if (not ispresent(res.connId)) {
setverdict(fail, "Could not connect NS UDP socket, 
check your configuration");
mtc.stop;
@@ -97,6 +100,9 @@
/* NS-User SAP towards the user */
port NS_SP_PT NS_SP;

+   var integer offset := 0;
+   var Nsvci nsvci := 0
+   var Nsvci nsei := 0
var NseStateg_state := NSE_S_DEAD_BLOCKED;
var ConnectionIdg_conn_id := -1;

@@ -118,11 +124,11 @@
var NseState old_state := g_state;
g_state := new_state;
log("NS State Transition: ", old_state, " -> ", new_state);
-   NS_SP.send(t_NsStsInd(mp_nsei, mp_nsvci, old_state, new_state));
+   NS_SP.send(t_NsStsInd(nsei, nsvci, old_state, new_state));
}

private function f_sendReset() runs on NS_CT {
-   NSCP.send(t_NS_Send(g_conn_id, 
t_NS_RESET(NS_CAUSE_OM_INTERVENTION, mp_nsvci, mp_nsei)));
+   NSCP.send(t_NS_Send(g_conn_id, 
t_NS_RESET(NS_CAUSE_OM_INTERVENTION, nsvci, nsei)));
g_state := NSE_S_WAIT_RESET;
}

@@ -137,7 +143,7 @@
}

private function f_sendBlock(NsCause cause) runs on NS_CT {
-   NSCP.send(t_NS_Send(g_conn_id, t_NS_BLOCK(cause, mp_nsvci)));
+   NSCP.send(t_NS_Send(g_conn_id, t_NS_BLOCK(cause, nsvci)));
Tns_block.start;
}

@@ -176,9 +182,9 @@
}

/* Respond to RESET with correct NSEI/NSVCI */
-   [] NSCP.receive(t_NS_RecvFrom(t_NS_RESET(?, mp_nsvci, 
mp_nsei))) -> value rf {
+   [] NSCP.receive(t_NS_RecvFrom(t_NS_RESET(?, nsvci, nsei))) -> 
value rf {
f_change_state(NSE_S_ALIVE_BLOCKED);
-   NSCP.send(t_NS_Send(g_conn_id, t_NS_RESET_ACK(mp_nsvci, 
mp_nsei)));
+   NSCP.send(t_NS_Send(g_conn_id, t_NS_RESET_ACK(nsvci, 
nsei)));
}

/* Respond to RESET with wrong NSEI/NSVCI */
@@ -210,7 +216,7 @@
}
} else if (g_state == NSE_S_WAIT_RESET) {
alt {
-   [] 
NSCP.receive(t_NS_RecvFrom(t_NS_RESET_ACK(mp_nsvci, mp_nsei))) -> value rf {
+   [] 
NSCP.receive(t_NS_RecvFrom(t_NS_RESET_ACK(nsvci, nsei))) -> value rf {
f_change_state(NSE_S_ALIVE_BLOCKED);
f_sendAlive();
f_sendUnblock();
@@ -219,8 +225,8 @@
} else if (g_state == NSE_S_ALIVE_BLOCKED) {
alt {
/* bogus block, just respond with ACK */
-   [] NSCP.receive(t_NS_RecvFrom(t_NS_BLOCK(?, 
mp_nsvci))) -> value rf {
-   NSCP.send(t_NS_Send(g_conn_id, 
t_NS_BLOCK_ACK(mp_nsvci)));
+   [] NSCP.receive(t_NS_RecvFrom(t_NS_BLOCK(?, 
nsvci))) -> value rf {
+   NSCP.send(t_NS_Send(g_conn_id, 
t_NS_BLOCK_ACK(nsvci)));
}
/* Respond to UNBLOCK with UNBLOCK-ACK + ch

Change in osmo-ttcn3-hacks[master]: sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli f_bssgp_clien...

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10386


Change subject: sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli 
f_bssgp_client_llgmm_assign f_process_rau_accept
..

sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli 
f_bssgp_client_llgmm_assign f_process_rau_accept

f_process_rau_accept can send the RAU Complete over the correct BSSGP

Change-Id: Ib9a65f0d09d3689911843a1b40e2a4114710e5b5
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 10 insertions(+), 10 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 974576f..1ee71b6 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -433,12 +433,12 @@
deactivate(di);
 }

-function f_upd_ptmsi_and_tlli(OCT4 p_tmsi) runs on BSSGP_ConnHdlr {
+function f_upd_ptmsi_and_tlli(OCT4 p_tmsi, integer bsspb := 0) runs on 
BSSGP_ConnHdlr {
g_pars.p_tmsi := p_tmsi;
/* update TLLI */
g_pars.tlli_old := g_pars.tlli;
g_pars.tlli := g_pars.p_tmsi or4b 'c000'O;
-   f_bssgp_client_llgmm_assign(g_pars.tlli_old, g_pars.tlli);
+   f_bssgp_client_llgmm_assign(g_pars.tlli_old, g_pars.tlli, 
BSSGP_PROC[bsspb]);
 }

 function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on 
BSSGP_ConnHdlr {
@@ -470,7 +470,7 @@
/* T3302, T3319, T3323, T3312_ext, T3324 */
 }

-function f_process_rau_accept(PDU_GMM_RoutingAreaUpdateAccept ra) runs on 
BSSGP_ConnHdlr {
+function f_process_rau_accept(PDU_GMM_RoutingAreaUpdateAccept ra, integer 
bsspb := 0) runs on BSSGP_ConnHdlr {
/* mandatory IE */
g_pars.ra := ra.routingAreaId;
if (ispresent(ra.allocatedPTMSI)) {
@@ -478,7 +478,7 @@
setverdict(fail, "unexpected P-TMSI allocation");
mtc.stop;
}
-   
f_upd_ptmsi_and_tlli(ra.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets);
+   
f_upd_ptmsi_and_tlli(ra.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets,
 bsspb);
}
if (ispresent(ra.msIdentity)) {
setverdict(fail, "unexpected TMSI allocation in non-combined 
attach");
@@ -839,10 +839,10 @@
 }

 /* general GPRS DETACH helper */
-function f_detach_mo(BIT3 detach_type, boolean power_off, boolean 
expect_purge) runs on BSSGP_ConnHdlr {
+function f_detach_mo(BIT3 detach_type, boolean power_off, boolean 
expect_purge, integer bssgp := 0) runs on BSSGP_ConnHdlr {
var BssgpDecoded bd;
timer T := 5.0;
-   f_send_llc(ts_GMM_DET_REQ_MO(detach_type, power_off));
+   f_send_llc(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp);
if (expect_purge) {
GSUP.receive(tr_GSUP_PURGE_MS_REQ(g_pars.imsi, 
OSMO_GSUP_CN_DOMAIN_PS));
GSUP.send(ts_GSUP_PURGE_MS_RES(g_pars.imsi));
@@ -853,7 +853,7 @@
setverdict(fail, "Unexpected GSUP PURGE MS for unregistered 
TLLI");
mtc.stop;
}
-   [power_off] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> 
value bd {
+   [power_off] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> 
value bd {
g_pars.ra := omit;
setverdict(fail, "Unexpected ATTACH ACCEPT in no-power-off 
DETACH");
mtc.stop;
@@ -862,12 +862,12 @@
[power_off] T.timeout {
setverdict(pass);
}
-   [not power_off] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> 
value bd {
+   [not power_off] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) 
-> value bd {
g_pars.ra := omit;
setverdict(pass);
/* TODO: check if any PDP contexts are deactivated on network 
side? */
}
-   [] BSSGP[0].receive { repeat; }
+   [] BSSGP[bssgp].receive { repeat; }
}
 }

@@ -1829,7 +1829,7 @@
f_send_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, 
false, omit, omit), bssgp);
alt {
[] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
-   
f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept);
+   
f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp);
f_send_llc(ts_GMM_RAU_COMPL, bssgp);
setverdict(pass);
}

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9a65f0d09d3689911843a1b40e2a4114710e5b5
Gerrit-Change-Number: 10386
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-gsm-manuals[master]: hlr: Add chapter on USSD configuration

2018-08-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10363 )

Change subject: hlr: Add chapter on USSD configuration
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
Gerrit-Change-Number: 10363
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 Aug 2018 17:41:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in simtrace2[master]: jenkins: add simtrace/trace to the builds

2018-08-07 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/10373


Change subject: jenkins: add simtrace/trace to the builds
..

jenkins: add simtrace/trace to the builds

trace is now stable enough on simtrace to be built and uploaded.

Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
---
M contrib/jenkins.sh
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/73/10373/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index bdf2b39..99a6f00 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -25,7 +25,7 @@
 export LD_LIBRARY_PATH="$inst/lib"

 BUILDS=""
-BUILDS+="simtrace/dfu simtrace/cardem " # simtrace/trace simtrace/triple_play
+BUILDS+="simtrace/dfu simtrace/cardem simtrace/trace " # simtrace/triple_play
 BUILDS+="qmod/dfu qmod/cardem "
 BUILDS+="owhw/dfu owhw/cardem "


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
Gerrit-Change-Number: 10373
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 


Change in osmo-gsm-manuals[master]: Add initial OsmoMGW manual

2018-08-07 Thread daniel
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/10279

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

Change subject: Add initial OsmoMGW manual
..

Add initial OsmoMGW manual

Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
---
M OsmoMGW/Makefile
A OsmoMGW/chapters/configuration.adoc
A OsmoMGW/chapters/counters.adoc
A OsmoMGW/chapters/counters_generated.adoc
A OsmoMGW/chapters/overview.adoc
A OsmoMGW/chapters/running.adoc
A OsmoMGW/osmomgw-usermanual-docinfo.xml
A OsmoMGW/osmomgw-usermanual.adoc
8 files changed, 282 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/79/10279/4
--
To view, visit https://gerrit.osmocom.org/10279
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
Gerrit-Change-Number: 10279
Gerrit-PatchSet: 4
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 


Change in osmo-gsm-manuals[master]: Add initial OsmoMGW manual

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10279 )

Change subject: Add initial OsmoMGW manual
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
Gerrit-Change-Number: 10279
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:56:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: hlr: Add chapter on USSD configuration

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10363 )

Change subject: hlr: Add chapter on USSD configuration
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
Gerrit-Change-Number: 10363
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:55:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: hlr: Add chapter on USSD configuration

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10363 )

Change subject: hlr: Add chapter on USSD configuration
..


Patch Set 1:

(4 comments)

https://gerrit.osmocom.org/#/c/10363/1/OsmoHLR/chapters/ussd.adoc
File OsmoHLR/chapters/ussd.adoc:

https://gerrit.osmocom.org/#/c/10363/1/OsmoHLR/chapters/ussd.adoc@35
PS1, Line 35: lient
> s/lient/client/
Done


https://gerrit.osmocom.org/#/c/10363/1/OsmoHLR/chapters/ussd.adoc@44
PS1, Line 44: USSD configuration in OsmoHLR happens within the `hlr` VTY node.
> IDEA: maybe it makes sense to group all SS/USSD-related commands […]
I don't think it's needed at this point, and it would just complicate things. 
The HLR has very few VTY commands to begin with.


https://gerrit.osmocom.org/#/c/10363/1/OsmoHLR/chapters/ussd.adoc@46
PS1, Line 46: `euse foobar-00-00-00-00-00-00` defines an EUSE with the given 
name `foobar`
> AFAIR, this command also represents a separate EUSE_NODE, […]
yes.


https://gerrit.osmocom.org/#/c/10363/1/OsmoHLR/chapters/ussd.adoc@54
PS1, Line 54: #*100#
> #* -> *#
Done



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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
Gerrit-Change-Number: 10363
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:55:29 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: Add initial OsmoMGW manual

2018-08-07 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/10279 )

Change subject: Add initial OsmoMGW manual
..


Set Ready For Review


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b4ff96309d280c6a63105a6e06a82ec2e7b6908
Gerrit-Change-Number: 10279
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:54:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: hlr: Add chapter on USSD configuration

2018-08-07 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10363

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

Change subject: hlr: Add chapter on USSD configuration
..

hlr: Add chapter on USSD configuration

Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
---
A OsmoHLR/chapters/ussd.adoc
M OsmoHLR/osmohlr-usermanual.adoc
2 files changed, 80 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie5196ece9f340303bcb4868ea9698e28c3d0
Gerrit-Change-Number: 10363
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-sgsn[master]: vty: add cmd "reset sgsn state"

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10370 )

Change subject: vty: add cmd "reset sgsn state"
..


Patch Set 1:

(2 comments)

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

https://gerrit.osmocom.org/#/c/10370/1//COMMIT_MSG@10
PS1, Line 10:
this requires a change to libosmocore/gb, please add this information including 
the Change-ID here.


https://gerrit.osmocom.org/#/c/10370/1/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/10370/1/src/gprs/sgsn_vty.c@802
PS1, Line 802: DEFUN(reset_sgsn_state,
we might use a hidden command to prevent accidential use during production 
setups.



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92096f3f6ea49e75676e30e9921d00210bac5382
Gerrit-Change-Number: 10370
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:52:46 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Jenkins build is back to normal : master-simtrace2 » a1=default,a2=default,a3=default,osmocom-master-debian9 #74

2018-08-07 Thread jenkins
See 




Change in osmo-msc[master]: mgcp: use codec information returned with ASSIGNMENT COMPL.

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10367 )

Change subject: mgcp: use codec information returned with ASSIGNMENT COMPL.
..

mgcp: use codec information returned with ASSIGNMENT COMPL.

When the assignment completes a choosen codec is returned. At the
moment we do not use this information.

- add struct members for codec info (both, RAN and CN)
- parse codec info in BSSMAP ASSIGNMENT COMPLETE
- use codec info on mgcp

Since the MNCC API is not complete yet, we currently only use the
codec info only on the internal MNCC yet.

Change-Id: I9d5b1cd016d9a058b22a367d0e5e9f2ef447931a
Related: OS#2728
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/msc_mgcp.c
4 files changed, 76 insertions(+), 14 deletions(-)

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



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index c79adde..27f7fc5 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -143,10 +143,13 @@
char local_addr_ran[INET_ADDRSTRLEN];
uint16_t remote_port_ran;
char remote_addr_ran[INET_ADDRSTRLEN];
+   enum mgcp_codecs codec_ran;
+
uint16_t local_port_cn;
char local_addr_cn[INET_ADDRSTRLEN];
uint16_t remote_port_cn;
char remote_addr_cn[INET_ADDRSTRLEN];
+   enum mgcp_codecs codec_cn;
} rtp;

/* which Iu-CS connection, if any. */
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 1ace43d..11d3673 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -502,11 +502,50 @@
return 0;
 }

+/* Use the speech codec info we go with the assignment complete to dtermine
+ * which codec we will signal to the MGW */
+static enum mgcp_codecs mgcp_codec_from_sc(struct gsm0808_speech_codec *sc)
+{
+   switch (sc->type) {
+   case GSM0808_SCT_FR1:
+   return CODEC_GSM_8000_1;
+   break;
+   case GSM0808_SCT_FR2:
+   return CODEC_GSMEFR_8000_1;
+   break;
+   case GSM0808_SCT_FR3:
+   return CODEC_AMR_8000_1;
+   break;
+   case GSM0808_SCT_FR4:
+   return CODEC_AMRWB_16000_1;
+   break;
+   case GSM0808_SCT_FR5:
+   return CODEC_AMRWB_16000_1;
+   break;
+   case GSM0808_SCT_HR1:
+   return CODEC_GSMHR_8000_1;
+   break;
+   case GSM0808_SCT_HR3:
+   return CODEC_AMR_8000_1;
+   break;
+   case GSM0808_SCT_HR4:
+   return CODEC_AMRWB_16000_1;
+   break;
+   case GSM0808_SCT_HR6:
+   return CODEC_AMRWB_16000_1;
+   break;
+   default:
+   return CODEC_PCMU_8000_1;
+   break;
+   }
+}
+
 /* Endpoint to handle assignment complete */
 static int bssmap_rx_ass_compl(struct gsm_subscriber_connection *conn, struct 
msgb *msg,
   struct tlv_parsed *tp)
 {
struct sockaddr_storage rtp_addr;
+   struct gsm0808_speech_codec sc;
struct sockaddr_in *rtp_addr_in;
int rc;

@@ -525,6 +564,15 @@
return -EINVAL;
}

+   /* Decode speech codec (choosen) element */
+   rc = gsm0808_dec_speech_codec(&sc, TLVP_VAL(tp, 
GSM0808_IE_SPEECH_CODEC),
+TLVP_LEN(tp, GSM0808_IE_SPEECH_CODEC));
+   if (rc < 0) {
+   LOGPCONN(conn, LOGL_ERROR, "Unable to decode speech codec 
(choosen).\n");
+   return -EINVAL;
+   }
+   conn->rtp.codec_ran = mgcp_codec_from_sc(&sc);
+
/* use address / port supplied with the AoIP
 * transport address element */
if (rtp_addr.ss_family == AF_INET) {
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 8becd05..2c17e22 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -319,6 +319,15 @@
/* Which subscriber do we want to track trans1 or trans2? */
log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub);

+   /* This call briding mechanism is only used with the internal MNCC.
+* functionality (with external MNCC briding would be done by the PBX)
+* This means we may just copy the codec info we have for the RAN side
+* of the first leg to the CN side of both legs. This also means that
+* if both legs use different codecs the MGW must perform transcoding
+* on the second leg. */
+   trans1->conn->rtp.codec_cn = trans1->conn->rtp.codec_ran;
+   trans2->conn->rtp.codec_cn = trans1->conn->rtp.codec_ran;
+
/* Bridge RTP streams */
rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.loca

Change in osmo-msc[master]: mgcp: use codec information returned with ASSIGNMENT COMPL.

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10367 )

Change subject: mgcp: use codec information returned with ASSIGNMENT COMPL.
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9d5b1cd016d9a058b22a367d0e5e9f2ef447931a
Gerrit-Change-Number: 10367
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:51:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: bssgp: introduce flush queue functions

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10371 )

Change subject: bssgp: introduce flush queue functions
..


Patch Set 1:

(2 comments)

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

https://gerrit.osmocom.org/#/c/10371/1//COMMIT_MSG@13
PS1, Line 13:
it might make sense to dsecribe when this might be useful to do.


https://gerrit.osmocom.org/#/c/10371/1/src/gb/gprs_bssgp.c
File src/gb/gprs_bssgp.c:

https://gerrit.osmocom.org/#/c/10371/1/src/gb/gprs_bssgp.c@1267
PS1, Line 1267: void bssgp_fc_flush_queue(struct bssgp_flow_control *fc)
please let's add doxygen comments for all newly introduced API.  I know it 
sucks that existing APIs are not fully documented, but let's make sure at least 
new API is documented from day one.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:50:06 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in simtrace2[master]: jenkins: clean after upload

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10368 )

Change subject: jenkins: clean after upload
..

jenkins: clean after upload

the upload failed because after the firmware were built (make),
they where removed (make clean).
now they are removed only after the upload.

Change-Id: Ie4421a6fa9207eb541107de9c14f265626f6be96
---
M contrib/jenkins.sh
1 file changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 5ce5993..bdf2b39 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -36,7 +36,6 @@
echo
echo "=== $board / $app START  =="
make BOARD="$board" APP="$app"
-   make BOARD="$board" APP="$app" clean
echo "=== $board / $app RES:$? =="
 done

@@ -56,19 +55,25 @@
 make clean

 if [ "x$publish" = "x--publish" ]; then
-  echo
-  echo "=== UPLOAD BUILD  =="
-  mkdir out/
-  cp firmware/bin/*.bin out/
+   echo
+   echo "=== UPLOAD BUILD  =="

-  cat > "$WORKSPACE/known_hosts" < "$WORKSPACE/known_hosts" 

Change in simtrace2[master]: jenkins: clean after upload

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10368 )

Change subject: jenkins: clean after upload
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4421a6fa9207eb541107de9c14f265626f6be96
Gerrit-Change-Number: 10368
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:48:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Call f_bssap_start in TC_cr_before_reset

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10369 )

Change subject: Call f_bssap_start in TC_cr_before_reset
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
Gerrit-Change-Number: 10369
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:48:00 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Call f_bssap_start in TC_cr_before_reset

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10369 )

Change subject: Call f_bssap_start in TC_cr_before_reset
..

Call f_bssap_start in TC_cr_before_reset

This function starts the SCCP component which will relay the BSSAP
messages to/from port SCCP_SP_PORT which is connected to BSSAP_DIRECT.

Ticket: OS#3286
Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
---
M msc/MSC_Tests.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index df1d1c2..f70edd0 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1765,6 +1765,8 @@
var boolean reset_ack_seen := false;
f_init_bssap_direct();

+   f_bssap_start(g_bssap[0]);
+
/* Make a blind connection attemt, to trigger the deadlock condition */
BSSAP_DIRECT.send(ts_BSSAP_CONNECT_req(g_bssap[0].sccp_addr_peer, 
g_bssap[0].sccp_addr_own, 1, omit));


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
Gerrit-Change-Number: 10369
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-ttcn3-hacks[master]: add DTX fill frame BTS tests

2018-08-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10372 )

Change subject: add DTX fill frame BTS tests
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/10372/2/bts/BTS_Tests.ttcn
File bts/BTS_Tests.ttcn:

https://gerrit.osmocom.org/#/c/10372/2/bts/BTS_Tests.ttcn@3855
PS2, Line 3855: 2.5
how do you get to this 2.5 seconds?  IMHO, 104*4.6ms = 478ms.  So The 104 
frames should expire in half a second.  Your tests wait five times that amount, 
so if 80% of the frames were lost, it would still pass?  I think rather than 
relying on wall clock / system time of the test host, it would be best to count 
in terms of frame numbers received from L1.  This means that from a given start 
frame number, start receiving until fn+104 is received as frame number, and 
then count over that interval.  The host-side timeout is merely a guard timer, 
and it can be 2.5,5,10 or whatever amount of times long.


https://gerrit.osmocom.org/#/c/10372/2/bts/BTS_Tests.ttcn@3866
PS2, Line 3866: t_RslChanNr_Bm(1)
I would structure the test in a way that it iterates over all the TCH/F we 
have.  There are subtle differences in how individual timeslots are handled, so 
it makes sense to iterater over all of them.  I think some of our other tests 
already do this.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Gerrit-Change-Number: 10372
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:47:51 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: add DTX fill frame BTS tests

2018-08-07 Thread Stefan Sperling
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10372

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

Change subject: add DTX fill frame BTS tests
..

add DTX fill frame BTS tests

Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd.

TC_tch_sign_l2_fill_frame is already passing and verifies that fill
frames are sent if there is nothing else to transmit on a TCHF
signalling channel where DTX is disabled for downstream.

TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that
only specific fill frames are sent, as required by GSM 05.08 for TCHF
signalling channels with DTX enabled for downstream. At present, our
implementation generates no fill frames in this case, which is one
piece of the problem described in issue OS#1950.

Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Related: OS#1950
---
M bts/BTS_Tests.ttcn
M bts/expected-results.xml
M library/RSL_Types.ttcn
3 files changed, 106 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Gerrit-Change-Number: 10372
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-ttcn3-hacks[master]: add DTX fill frame BTS tests

2018-08-07 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/10372


Change subject: add DTX fill frame BTS tests
..

add DTX fill frame BTS tests

Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd.

TC_tch_sign_l2_fill_frame is already passing and verifies that fill
frames are sent if there is nothing else to transmit on a TCHF
signalling channel where DTX is disabled for downstream.

TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that
only specific fill frames are sent, as required by GSM 05.08 for TCHF
signalling channels with DTX enabled for downstream. At present, our
implementation generates no fill frames in this case, which is one
piece of the problem described in issue OS#1950.

Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Related: OS#1950
---
M bts/BTS_Tests.ttcn
M bts/expected-results.xml
2 files changed, 101 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index fb6137c..8ff2d35 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3794,6 +3794,97 @@
f_assert_lapdm('03e00d063505'O, tr_LAPDm_I(0, true, false, 7, 0, 
'063505'O), "I/7/0");
 }

+/***
+ * DTX Related (see GSM 05.08, section 8.3)
+ ***/
+
+ function f_test_l2_fill_frames(boolean dtxd, integer 
num_fill_frames_expected, float wait_time) runs on ConnHdlr {
+   var L1ctlDlMessage dl;
+   var octetstring l2_fill_frame := 
'0303012B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B'O;
+   var integer nframes := 0;
+   /* Frames numbers (mod 104) for which a fill frame is expected on TCHF 
if DTX is enabled. */
+   var Integers required_tdma_frames_dtx_tchf := { 52, 53, 54, 55, 56, 57, 
58, 59 };
+   timer T := wait_time;
+
+   f_l1_tune(L1CTL);
+   RSL.clear;
+   L1CTL.clear;
+
+   /* activate TCHF signalling channel */
+   f_est_dchan(false);
+
+   T.start;
+   alt {
+   [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, ?)) -> value dl {
+   var octetstring l2 := dl.payload.data_ind.payload;
+   if (not match(l2, l2_fill_frame)) {
+   repeat;
+   }
+   nframes := nframes + 1;
+
+   if (dtxd) {
+   var GsmFrameNumber frame_number := dl.dl_info.frame_nr;
+   for (var integer i := 0; i < 
lengthof(required_tdma_frames_dtx_tchf); i := i + 1) {
+   if (frame_number mod 104 == 
required_tdma_frames_dtx_tchf[i]) {
+   if (nframes >= 
num_fill_frames_expected) {
+   T.stop;
+   setverdict(pass);
+   }
+   repeat;
+   }
+   }
+   log("Received DTX TCH fill frame with bad frame number: 
", frame_number);
+   setverdict(fail, "Unexpected L2 fill frame received on 
Um");
+   } else if (nframes >= num_fill_frames_expected) {
+   T.stop;
+   setverdict(pass);
+   } else {
+   repeat;
+   }
+   }
+   [] L1CTL.receive { repeat; }
+   [] T.timeout {
+   setverdict(fail, "Timeout waiting for L2 fill frames on Um");
+   mtc.stop;
+   }
+   }
+}
+
+function f_TC_tch_sign_l2_fill_frame(charstring id) runs on ConnHdlr {
+   /* Expect 104 L2 fill frames to show up on the Um interface within 2.5 
seconds. */
+   f_test_l2_fill_frames(false, 104, 2.5);
+}
+
+function f_TC_tch_sign_l2_fill_frame_dtxd(charstring id) runs on ConnHdlr {
+   /* With DTX enabled there are 8 TDMA fill frames per every 104 frames.
+* Expect at least 8 L2 fill frames (out of 104 TDMA frames) on the Um 
interface within 2.5 seconds. */
+   f_test_l2_fill_frames(true, 8, 2.5);
+}
+
+function f_tch_sign_l2_fill_frame(boolean dtxd) runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN(dtxd)));
+   pars.t_guard := 60.0;
+   f_init(testcasename());
+   if (dtxd) {
+   vc_conn := 
f_start_handler(refers(f_TC_tch_sign_l2_fill_frame_dtxd), pars);
+   } else {
+   vc_conn := f_start_handler(refers(f_TC_tch_sign_l2_fill_frame), 
pars);
+   }
+   vc_conn.done;
+}
+
+/* Verify that L2 fill frames are sent on TCH in signaling mode if
+ * there is nothing to transmit while DTX is disabled on downlink. */
+testcase TC_tch_sign_l2_fill_frame() runs o

Change in osmo-sgsn[master]: vty: add cmd "reset sgsn state"

2018-08-07 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/10370 )

Change subject: vty: add cmd "reset sgsn state"
..


Patch Set 1:

depends on https://gerrit.osmocom.org/#/c/libosmocore/+/10371/


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92096f3f6ea49e75676e30e9921d00210bac5382
Gerrit-Change-Number: 10370
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Aug 2018 16:26:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: bssgp: introduce flush queue functions

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10371


Change subject: bssgp: introduce flush queue functions
..

bssgp: introduce flush queue functions

To reset the state of BSSGP allow to flush the BSSGP queues.
Introduce the functions:
bssgp_fc_flush_queue()
bssgp_flush_all_queues()

Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
---
M include/osmocom/gprs/gprs_bssgp.h
M src/gb/gprs_bssgp.c
M src/gb/libosmogb.map
3 files changed, 25 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/10371/1

diff --git a/include/osmocom/gprs/gprs_bssgp.h 
b/include/osmocom/gprs/gprs_bssgp.h
index 2dead69..400c3e0 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -207,6 +207,9 @@
 int bssgp_fc_ms_init(struct bssgp_flow_control *fc_ms, uint16_t bvci,
 uint16_t nsei, uint32_t max_queue_depth);

+void bssgp_flush_all_queues();
+void bssgp_fc_flush_queue(struct bssgp_flow_control *fc);
+
 /* gprs_bssgp_vty.c */
 int bssgp_vty_init(void);
 void bssgp_set_log_ss(int ss);
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 5dfce16..fb79cf8 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -1263,3 +1263,23 @@
 {
DBSSGP = ss;
 }
+
+void bssgp_fc_flush_queue(struct bssgp_flow_control *fc)
+{
+   struct bssgp_fc_queue_element *element, *tmp;
+   llist_for_each_entry_safe(element, tmp, &fc->queue, list) {
+   msgb_free(element->msg);
+   llist_del(element);
+   talloc_free(element);
+   }
+}
+
+void bssgp_flush_all_queues()
+{
+   struct bssgp_bvc_ctx *bctx;
+
+   llist_for_each_entry(bctx, &bssgp_bvc_ctxts, list) {
+   if (bctx->fc)
+   bssgp_fc_flush_queue(bctx->fc);
+   }
+}
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index d56e651..ec69670 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -6,6 +6,8 @@
 bssgp_fc_in;
 bssgp_fc_init;
 bssgp_fc_ms_init;
+bssgp_fc_flush_queue;
+bssgp_flush_all_queues;
 bssgp_msgb_alloc;
 bssgp_msgb_copy;
 bssgp_msgb_tlli_put;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-sgsn[master]: vty: add cmd "reset sgsn state"

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10370


Change subject: vty: add cmd "reset sgsn state"
..

vty: add cmd "reset sgsn state"

Reset the SGSN internal state. Useful when testing the SGSN via TTCN3.

Change-Id: I92096f3f6ea49e75676e30e9921d00210bac5382
---
M src/gprs/sgsn_vty.c
1 file changed, 32 insertions(+), 0 deletions(-)



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

diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 8092158..c48d55c 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,6 +45,8 @@
 #include 
 #include 

+#include 
+
 #include 
 #include 

@@ -796,6 +799,34 @@
vty_out(vty, "Use count: %u%s", gsub->use_count, VTY_NEWLINE);
 }

+DEFUN(reset_sgsn_state,
+  reset_sgsn_state_cmd,
+  "reset sgsn state",
+  "Remove all known subscriber, MM ctx and flush BSSGP queues Useful when 
running tests against the SGSN")
+{
+   struct gprs_subscr *subscr, *tmp_subscr;
+   struct sgsn_mm_ctx *mm, *tmp_mm;
+
+   llist_for_each_entry_safe(mm, tmp_mm, &sgsn_mm_ctxts, list)
+   {
+   gsm0408_gprs_access_cancelled(mm, SGSN_ERROR_CAUSE_NONE);
+   }
+   vty_out(vty, "Cancelled MM Ctx. %s", VTY_NEWLINE);
+
+   llist_for_each_entry_safe(subscr, tmp_subscr, gprs_subscribers, entry) {
+   gprs_subscr_get(subscr);
+   gprs_subscr_cancel(subscr);
+   gprs_subscr_put(subscr);
+   }
+   vty_out(vty, "Removed all gprs subscribers.%s", VTY_NEWLINE);
+
+   bssgp_flush_all_queues();
+   vty_out(vty, "Flushed all BSSGPs queues.%s", VTY_NEWLINE);
+
+   /* remove all queues to bssgp */
+   return CMD_SUCCESS;
+}
+
 DEFUN(show_subscr_cache,
   show_subscr_cache_cmd,
   "show subscriber cache",
@@ -1310,6 +1341,7 @@
install_element(ENABLE_NODE, &update_subscr_cancel_cmd);
install_element(ENABLE_NODE, &update_subscr_update_location_result_cmd);
install_element(ENABLE_NODE, &update_subscr_update_auth_info_cmd);
+   install_element(ENABLE_NODE, &reset_sgsn_state_cmd);

install_element(CONFIG_NODE, &cfg_sgsn_cmd);
install_node(&sgsn_node, config_write_sgsn);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92096f3f6ea49e75676e30e9921d00210bac5382
Gerrit-Change-Number: 10370
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: Call f_bssap_start in TC_cr_before_reset

2018-08-07 Thread daniel
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/10369


Change subject: Call f_bssap_start in TC_cr_before_reset
..

Call f_bssap_start in TC_cr_before_reset

This function starts the SCCP component which will relay the BSSAP
messages to/from port SCCP_SP_PORT which is connected to BSSAP_DIRECT.

Ticket: OS#3286
Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
---
M msc/MSC_Tests.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index df1d1c2..f70edd0 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1765,6 +1765,8 @@
var boolean reset_ack_seen := false;
f_init_bssap_direct();

+   f_bssap_start(g_bssap[0]);
+
/* Make a blind connection attemt, to trigger the deadlock condition */
BSSAP_DIRECT.send(ts_BSSAP_CONNECT_req(g_bssap[0].sccp_addr_peer, 
g_bssap[0].sccp_addr_own, 1, omit));


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
Gerrit-Change-Number: 10369
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 


Change in simtrace2[master]: jenkins: clean after upload

2018-08-07 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/10368


Change subject: jenkins: clean after upload
..

jenkins: clean after upload

the upload failed because after the firmware were built (make),
they where removed (make clean).
now they are removed only after the upload.

Change-Id: Ie4421a6fa9207eb541107de9c14f265626f6be96
---
M contrib/jenkins.sh
1 file changed, 14 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/68/10368/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 5ce5993..bdf2b39 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -36,7 +36,6 @@
echo
echo "=== $board / $app START  =="
make BOARD="$board" APP="$app"
-   make BOARD="$board" APP="$app" clean
echo "=== $board / $app RES:$? =="
 done

@@ -56,19 +55,25 @@
 make clean

 if [ "x$publish" = "x--publish" ]; then
-  echo
-  echo "=== UPLOAD BUILD  =="
-  mkdir out/
-  cp firmware/bin/*.bin out/
+   echo
+   echo "=== UPLOAD BUILD  =="

-  cat > "$WORKSPACE/known_hosts" < "$WORKSPACE/known_hosts" 

Build failed in Jenkins: master-simtrace2 » a1=default,a2=default,a3=default,osmocom-master-debian9 #73

2018-08-07 Thread jenkins
See 


Changes:

[Kévin Redon] USB: increase USB reset time

[Kévin Redon] jenkins: fix publish

[laforge] qmod: error on EEPROM erase fail

--
[...truncated 151.17 KB...]
   1368   1   01369 559 obj/owhw/dfu_main.o
244   0   0 244  f4 obj/owhw/dfu_dfu.o
645   4   6 655 28f obj/owhw/dfu_dfu_runtime.o
   3400   0 2083608 e18 obj/owhw/dfu_card_emu.o
  0   0   0   0   0 obj/owhw/dfu_cciddriver.o
   2619  12   42635 a4b obj/owhw/dfu_iso7816_4.o
 96   0   0  96  60 obj/owhw/dfu_iso7816_fidi.o
  0   0   0   0   0 obj/owhw/dfu_mitm.o
   23041152   03456 d80 obj/owhw/dfu_mode_cardemu.o
  0   0   0   0   0 obj/owhw/dfu_mode_ccid.o
351   0 520 871 367 obj/owhw/dfu_simtrace_iso7816.o
  0   0   0   0   0 obj/owhw/dfu_sniffer.o
488  40   0 528 210 obj/owhw/dfu_tc_etu.o
597  48   0 645 285 obj/owhw/dfu_usb.o
  25556   0   17988   43544aa18 bin/owhw-cardem-dfu.elf
rm -fR obj/owhw/*.o bin/*.bin bin/*.elf bin/*.elf.txt bin/*.map bin/*.lst `find 
. -name \*.p`
=== owhw / cardem RES:0 ==

=== FIRMWARE TESTS ===
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o 
card_emu_tests.hobj -c card_emu_tests.c
In file included from ../libboard/common/include/board_common.h:21:0,
 from ../libboard/simtrace/include/board.h:21,
 from 
../atmel_softpack_libraries/libchip_sam3s/include/trace.h:70,
 from ../libcommon/include/assert.h:60,
 from card_emu_tests.c:4:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
card_emu_tests.c: In function ‘get_and_verify_rctx’:
card_emu_tests.c:171:34: warning: unused variable ‘td’ [-Wunused-variable]
  struct cardemu_usb_msg_tx_data *td;
  ^~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o 
card_emu.hobj -c ../libcommon/source/card_emu.c
In file included from ../libboard/common/include/board_common.h:21:0,
 from ../libboard/simtrace/include/board.h:21,
 from 
../atmel_softpack_libraries/libchip_sam3s/include/trace.h:70,
 from ../libcommon/include/assert.h:60,
 from ../libcommon/source/card_emu.c:21:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
In file included from ../libcommon/source/card_emu.c:27:0:
../libcommon/include/utils.h:31:2: warning: #warning 
"local_irq_{save,restore}() not implemented" [-Wcpp]
 #warning "local_irq_{save,restore}() not implemented"
  ^~~
../libcommon/source/card_emu.c: In function ‘flush_rx_buffer’:
../libcommon/source/card_emu.c:214:11: warning: unused variable ‘data_len’ 
[-Wunused-variable]
  uint32_t data_len;
   ^~~~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o usb_buf.hobj 
-c ../libcommon/source/usb_buf.c
In file included from ../libboard/common/include/board_common.h:21:0,
 from ../libboard/simtrace/include/board.h:21,
 from ../libcommon/source/usb_buf.c:17:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel

Change in simtrace2[master]: qmod: error on EEPROM erase fail

2018-08-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10365 )

Change subject: qmod: error on EEPROM erase fail
..

qmod: error on EEPROM erase fail

repeating the EEPROM erase (byte write) in case of byte write failure
could lead in an infinite loop.
log the error an return error code instead.

Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec
---
M firmware/libboard/qmod/source/board_qmod.c
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/firmware/libboard/qmod/source/board_qmod.c 
b/firmware/libboard/qmod/source/board_qmod.c
index acd090f..bdc08f9 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -113,9 +113,11 @@
/* write the EEPROM once */
for (i = 0; i < 256; i++) {
int rc = eeprom_write_byte(0x50, i, 0xff);
-   /* if the result was negative, repeat that write */
-   if (rc < 0)
-   i--;
+   if (rc < 0) {
+   TRACE_ERROR("Erasing EEPROM failed at byte %u: 
0x%02x\n\r",
+   i, __eeprom_bin[i]);
+   return 1;
+   }
}

return 0;

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec
Gerrit-Change-Number: 10365
Gerrit-PatchSet: 2
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


  1   2   >