Change in osmo-ttcn3-hacks[master]: fix build of bsc bsc-nat, hlr, and msc tests

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11333 )

Change subject: fix build of bsc bsc-nat, hlr, and msc tests
..


Patch Set 1:

"make compile" works quite fine here on current master. Not sure what kind of 
build faiulres you are referring to?


--
To view, visit https://gerrit.osmocom.org/11333
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: I72c369ccd9df88970a69c6dfb5d5255d14fe6aa8
Gerrit-Change-Number: 11333
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:08:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: fix build of bsc bsc-nat, hlr, and msc tests

2018-10-12 Thread Harald Welte
Harald Welte has removed a vote on this change.

Change subject: fix build of bsc bsc-nat, hlr, and msc tests
..


Removed Code-Review+1 by Harald Welte 
--
To view, visit https://gerrit.osmocom.org/11333
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I72c369ccd9df88970a69c6dfb5d5255d14fe6aa8
Gerrit-Change-Number: 11333
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: nat: Log endpoint nr consistently as hex

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11328 )

Change subject: nat: Log endpoint nr consistently as hex
..

nat: Log endpoint nr consistently as hex

Change-Id: I581f40da47614223219800e97a334f8b5e06b13f
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 
b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 986306c..06799bb 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -211,7 +211,7 @@
llist_for_each_entry(mcon, >bsc->nat->sccp_connections, 
list_entry) {
if (mcon->msc_endp == endp) {
LOGP(DNAT, LOGL_ERROR,
-"Endpoint %d was assigned to 0x%x and now 0x%x\n",
+"Endpoint 0x%x was assigned to 0x%x and now 
0x%x\n",
 endp,
 sccp_src_ref_to_int(>patched_ref),
 sccp_src_ref_to_int(>patched_ref));

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I581f40da47614223219800e97a334f8b5e06b13f
Gerrit-Change-Number: 11328
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: osmux.h: Document enum osmux_state

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11340 )

Change subject: osmux.h: Document enum osmux_state
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If5de6e981e9af7b667dd3365d758f868f38bf6e0
Gerrit-Change-Number: 11340
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:05:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: mgcp: Avoid initing output without enabling osmux

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11326 )

Change subject: mgcp: Avoid initing output without enabling osmux
..

mgcp: Avoid initing output without enabling osmux

Otherwise we end up in a weird state where we have timers set up but
osmux is still flagged as not enabled.

Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 69f1c66..0a4441c 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -447,10 +447,6 @@
return -1;
}

-   osmux_xfrm_output_init(>osmux.out,
-  (endp->osmux.cid * rtp_ssrc_winlen) +
-  (random() % rtp_ssrc_winlen));
-
endp->osmux.in = osmux_handle_lookup(endp->cfg, addr, port);
if (!endp->osmux.in) {
LOGP(DMGCP, LOGL_ERROR, "Cannot allocate input osmux handle\n");
@@ -463,6 +459,10 @@
return -1;
}

+   osmux_xfrm_output_init(>osmux.out,
+  (endp->osmux.cid * rtp_ssrc_winlen) +
+  (random() % rtp_ssrc_winlen));
+
switch (endp->cfg->role) {
case MGCP_BSC_NAT:
endp->type = MGCP_OSMUX_BSC_NAT;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
Gerrit-Change-Number: 11326
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: mgcp: Log endpoint nr consistently as hex

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11327 )

Change subject: mgcp: Log endpoint nr consistently as hex
..

mgcp: Log endpoint nr consistently as hex

Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
---
M openbsc/src/libmgcp/mgcp_network.c
M openbsc/src/libmgcp/mgcp_osmux.c
M openbsc/tests/mgcp/mgcp_test.c
3 files changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/openbsc/src/libmgcp/mgcp_network.c 
b/openbsc/src/libmgcp/mgcp_network.c
index 799d998..49500d9 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -763,7 +763,7 @@
break;
}

-   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 endp->type, ENDPOINT_NUMBER(endp));
return 0;
 }
@@ -856,7 +856,7 @@
break;  /* Should not happen */
}

-   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 endp->type, ENDPOINT_NUMBER(endp));
return 0;
 }
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 0a4441c..71e8eae 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -340,12 +340,12 @@

if (osmux_enable_endpoint(endp, >sin_addr, addr->sin_port) < 0 ) {
LOGP(DMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint %d\n",
+"Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
goto out;
}

-   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
+   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
 ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
 ntohs(addr->sin_port));
 out:
@@ -442,7 +442,7 @@
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 
1);

if (endp->osmux.state == OSMUX_STATE_DISABLED) {
-   LOGP(DMGCP, LOGL_ERROR, "Endpoint %u didn't request Osmux\n",
+   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't request Osmux\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -482,7 +482,7 @@

 void osmux_disable_endpoint(struct mgcp_endpoint *endp)
 {
-   LOGP(DMGCP, LOGL_INFO, "Releasing endpoint %u using Osmux CID %u\n",
+   LOGP(DMGCP, LOGL_INFO, "Releasing endpoint 0x%x using Osmux CID %u\n",
 ENDPOINT_NUMBER(endp), endp->osmux.cid);

/* We are closing, we don't need pending RTP packets to be transmitted 
*/
@@ -528,7 +528,7 @@
if (osmux_enable_endpoint(endp, >net_end.addr,
  htons(endp->cfg->osmux_port)) < 0) {
LOGP(DMGCP, LOGL_ERROR,
-"Could not activate osmux in endpoint %d\n",
+"Could not activate osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
}
LOGP(DMGCP, LOGL_ERROR,
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 92099db..e7a582a 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -436,7 +436,7 @@
 static int mgcp_test_policy_cb(struct mgcp_trunk_config *cfg, int endpoint,
   int state, const char *transactio_id)
 {
-   fprintf(stderr, "Policy CB got state %d on endpoint %d\n",
+   fprintf(stderr, "Policy CB got state %d on endpoint 0x%x\n",
state, endpoint);
last_endpoint = endpoint;
return MGCP_POLICY_CONT;
@@ -603,7 +603,7 @@
OSMO_ASSERT(last_endpoint != -1);
endp = >trunk.endpoints[last_endpoint];

-   fprintf(stderr, "endpoint %d: "
+   fprintf(stderr, "endpoint 0x%x: "
"payload type BTS %d (exp %d), NET %d (exp 
%d)\n",
last_endpoint,
endp->bts_end.codec.payload_type, 
t->exp_bts_ptype,

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
Gerrit-Change-Number: 11327
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: mgcp: osmux: Make func handling dummy frames independent of endp type

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11337 )

Change subject: mgcp: osmux: Make func handling dummy frames independent of 
endp type
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I285f1cb693b243ecd404337f2bb5b74ddd32b123
Gerrit-Change-Number: 11337
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:05:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: mgcp: osmux: Don't process regular osmux frames if disabled by cfg

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11335 )

Change subject: mgcp: osmux: Don't process regular osmux frames if disabled by 
cfg
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ief4e62fe68a11a60d90292c72d1263fd1f728356
Gerrit-Change-Number: 11335
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:04:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: nat: Log state of pending transaction

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11332 )

Change subject: nat: Log state of pending transaction
..

nat: Log state of pending transaction

Change-Id: I9f686404517bf8a2044cf59dd5bfaf90eb4f798f
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 
b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 06799bb..9fc8ba3 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -521,8 +521,8 @@
mgcp_endp = >mgcp_cfg->trunk.endpoints[endpoint];

if (bsc_endp->transaction_id) {
-   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x had pending transaction: 
'%s'\n",
-endpoint, bsc_endp->transaction_id);
+   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x had pending transaction: 
'%s' state %d\n",
+endpoint, bsc_endp->transaction_id, 
bsc_endp->transaction_state);
talloc_free(bsc_endp->transaction_id);
bsc_endp->transaction_id = NULL;
bsc_endp->transaction_state = 0;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9f686404517bf8a2044cf59dd5bfaf90eb4f798f
Gerrit-Change-Number: 11332
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in openbsc[master]: mgcp: Avoid initing output without enabling osmux

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11326 )

Change subject: mgcp: Avoid initing output without enabling osmux
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
Gerrit-Change-Number: 11326
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:04:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: nat: Log endpoint nr consistently as hex

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11328 )

Change subject: nat: Log endpoint nr consistently as hex
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I581f40da47614223219800e97a334f8b5e06b13f
Gerrit-Change-Number: 11328
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:04:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: mgcp: Log endpoint nr consistently as hex

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11327 )

Change subject: mgcp: Log endpoint nr consistently as hex
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
Gerrit-Change-Number: 11327
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:04:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: nat: Log state of pending transaction

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11332 )

Change subject: nat: Log state of pending transaction
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9f686404517bf8a2044cf59dd5bfaf90eb4f798f
Gerrit-Change-Number: 11332
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:04:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: use tag for test dependency commit

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11331 )

Change subject: use tag for test dependency commit
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11331
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: Ia994b5c4488fd9b0d410b992e515c6eec4dd23b1
Gerrit-Change-Number: 11331
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:03:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: use tag for test dependency commit

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11331 )

Change subject: use tag for test dependency commit
..

use tag for test dependency commit

Use the output of 'git describe' to pin the commit checked out
for dependency titan.ProtocolModules.SGsAP_13.2.0_commit, i.e.
the tag which points to 81544cf008378058b95ff20d33f3770fadb7e235.

Using a plain commit hash will always re-trigger an update of
the working tree in this particular case because 'git describe'
won't ever return an error.

Change-Id: Ia994b5c4488fd9b0d410b992e515c6eec4dd23b1
---
M deps/Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/deps/Makefile b/deps/Makefile
index f2f38bd..a1ac595 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -78,7 +78,7 @@
 titan.ProtocolModules.RTP_commit=  R.5.A
 titan.ProtocolModules.ROSE_commit= R.1.C
 titan.ProtocolModules.SCTP_commit= R.2.A
-titan.ProtocolModules.SGsAP_13.2.0_commit= 
81544cf008378058b95ff20d33f3770fadb7e235
+titan.ProtocolModules.SGsAP_13.2.0_commit= R.1.B
 titan.ProtocolModules.SDP_commit=  R.14.A
 titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69
 titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A

--
To view, visit https://gerrit.osmocom.org/11331
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: Ia994b5c4488fd9b0d410b992e515c6eec4dd23b1
Gerrit-Change-Number: 11331
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: fix build of bsc bsc-nat, hlr, and msc tests

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11333 )

Change subject: fix build of bsc bsc-nat, hlr, and msc tests
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11333
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: I72c369ccd9df88970a69c6dfb5d5255d14fe6aa8
Gerrit-Change-Number: 11333
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:02:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr_ussd.c: fix: reject 'structured' SS requests

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11341 )

Change subject: hlr_ussd.c: fix: reject 'structured' SS requests
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11341
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: Ia1317c5d372a42473cce65c0c985103e43be77fd
Gerrit-Change-Number: 11341
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:01:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr_ussd.c: fix: reject 'structured' SS requests

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11341 )

Change subject: hlr_ussd.c: fix: reject 'structured' SS requests
..


Patch Set 1:

would be great to have a related test case in the test suite. Thanks!


--
To view, visit https://gerrit.osmocom.org/11341
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: Ia1317c5d372a42473cce65c0c985103e43be77fd
Gerrit-Change-Number: 11341
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 20:02:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-hlr[master]: hlr_ussd.c: fix: reject 'structured' SS requests

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11341 )

Change subject: hlr_ussd.c: fix: reject 'structured' SS requests
..

hlr_ussd.c: fix: reject 'structured' SS requests

As we don't store any SS related information (e.g. call forwarding
preferences) in the database, we don't handle 'structured' SS
requests at all. Let's reject them by sending error message
with FACILITY_NOT_SUPPORTED code.

Change-Id: Ia1317c5d372a42473cce65c0c985103e43be77fd
Related: OS#3651
---
M src/hlr_ussd.c
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index c96f47c..ba373f3 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -399,8 +399,15 @@

LOGPSS(ss, LOGL_INFO, "SS CompType=%s, OpCode=%s\n",
gsm0480_comp_type_name(comp_type), 
gsm0480_op_code_name(req->opcode));
-   /* FIXME */
-   return 0;
+
+   /**
+* FIXME: As we don't store any SS related information
+* (e.g. call forwarding preferences) in the database,
+* we don't handle "structured" SS requests at all.
+*/
+   LOGPSS(ss, LOGL_NOTICE, "Structured SS requests are not supported, 
rejecting...\n");
+   ss_tx_error(ss, req->invoke_id, 
GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED);
+   return -ENOTSUP;
 }

 /* Handle a USSD GSUP message for a given SS Session received from VLR or EUSE 
*/

--
To view, visit https://gerrit.osmocom.org/11341
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: Ia1317c5d372a42473cce65c0c985103e43be77fd
Gerrit-Change-Number: 11341
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/x86_64

2018-10-12 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/libosmocore failed to build in 
xUbuntu_16.04/x86_64

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

Last lines of build log:
[   46s] [203/245] installing libpython-stdlib-2.7.11-1
[   46s] [204/245] installing libtimedate-perl-2.3000-2
[   46s] Processing triggers for man-db (2.7.5-1) ...
[   46s] [205/245] installing intltool-debian-0.35.0+20060710.4
[   46s] [206/245] installing libdpkg-perl-1.18.4ubuntu1
[   46s] Processing triggers for man-db (2.7.5-1) ...
[   46s] [207/245] installing autoconf-2.69-9
[   47s] Processing triggers for man-db (2.7.5-1) ...
[   47s] [208/245] installing hostname-3.16ubuntu2
[   47s] Processing triggers for man-db (2.7.5-1) ...
[   47s] [209/245] installing python2.7-2.7.11-7ubuntu1
[   48s] Segmentation fault (core dumped)
[   48s] dpkg: error processing package python2.7 (--install):
[   48s]  subprocess installed post-installation script returned error exit 
status 139
[   48s] Processing triggers for mime-support (3.59ubuntu1) ...
[   48s] Processing triggers for man-db (2.7.5-1) ...
[   48s] Errors were encountered while processing:
[   48s]  python2.7
[   48s] exit ...
[   48s] 
[   48s] sheep81 failed "build libosmocore_0.12.0.81.4290.dsc" at Fri Oct 12 
19:50:34 UTC 2018.
[   48s] 
[   48s] ### VM INTERACTION START ###
[   51s] [   43.698665] sysrq: SysRq : Power Off
[   51s] [   43.707504] reboot: Power down
[   51s] ### VM INTERACTION END ###
[   51s] 
[   51s] sheep81 failed "build libosmocore_0.12.0.81.4290.dsc" at Fri Oct 12 
19:50:37 UTC 2018.
[   51s] 

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


Change in osmo-hlr[master]: hlr_ussd.c: fix: reject 'structured' SS requests

2018-10-12 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11341


Change subject: hlr_ussd.c: fix: reject 'structured' SS requests
..

hlr_ussd.c: fix: reject 'structured' SS requests

As we don't store any SS related information (e.g. call forwarding
preferences) in the database, we don't handle 'structured' SS
requests at all. Let's reject them by sending error message
with FACILITY_NOT_SUPPORTED code.

Change-Id: Ia1317c5d372a42473cce65c0c985103e43be77fd
Related: OS#3651
---
M src/hlr_ussd.c
1 file changed, 9 insertions(+), 2 deletions(-)



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

diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index c96f47c..ba373f3 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -399,8 +399,15 @@

LOGPSS(ss, LOGL_INFO, "SS CompType=%s, OpCode=%s\n",
gsm0480_comp_type_name(comp_type), 
gsm0480_op_code_name(req->opcode));
-   /* FIXME */
-   return 0;
+
+   /**
+* FIXME: As we don't store any SS related information
+* (e.g. call forwarding preferences) in the database,
+* we don't handle "structured" SS requests at all.
+*/
+   LOGPSS(ss, LOGL_NOTICE, "Structured SS requests are not supported, 
rejecting...\n");
+   ss_tx_error(ss, req->invoke_id, 
GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED);
+   return -ENOTSUP;
 }

 /* Handle a USSD GSUP message for a given SS Session received from VLR or EUSE 
*/

--
To view, visit https://gerrit.osmocom.org/11341
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: Ia1317c5d372a42473cce65c0c985103e43be77fd
Gerrit-Change-Number: 11341
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in openbsc[master]: osmux.h: Document enum osmux_state

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11340


Change subject: osmux.h: Document enum osmux_state
..

osmux.h: Document enum osmux_state

Change-Id: If5de6e981e9af7b667dd3365d758f868f38bf6e0
---
M openbsc/include/openbsc/osmux.h
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/11340/1

diff --git a/openbsc/include/openbsc/osmux.h b/openbsc/include/openbsc/osmux.h
index f3ea72a..6386125 100644
--- a/openbsc/include/openbsc/osmux.h
+++ b/openbsc/include/openbsc/osmux.h
@@ -26,10 +26,10 @@
 int osmux_used_cid(void);

 enum osmux_state {
-   OSMUX_STATE_DISABLED = 0,
-   OSMUX_STATE_NEGOTIATING,
-   OSMUX_STATE_ACTIVATING,
-   OSMUX_STATE_ENABLED,
+   OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */
+   OSMUX_STATE_NEGOTIATING,  /* Osmux was locally requested in MGCP CRCX */
+   OSMUX_STATE_ACTIVATING,   /* Osmux was accepted in MGCP CRCX ACK. It 
can now be enabled by \ref osmux_enable_endpoint. */
+   OSMUX_STATE_ENABLED,  /* Osmux was initialized by \ref 
osmux_enable_endpoint and can process frames */
 };

 enum osmux_usage {

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5de6e981e9af7b667dd3365d758f868f38bf6e0
Gerrit-Change-Number: 11340
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: osmux: Improve checks around activating and using enabled osmux

2018-10-12 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/11339

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

Change subject: mgcp: osmux: Improve checks around activating and using enabled 
osmux
..

mgcp: osmux: Improve checks around activating and using enabled osmux

* Refactor code to have unified checks on all paths activating Osmux.
* Improve checkings at activation time and add logging.
* Code now enforces endp osmux status to be enabled before processing
the frame through endp->osmux.out. Before, a delayed or bad pkt could
arrive and be processed by an endp with osmux not enabled, using
endp->osmux.out that was not initialized and ended up crashing:
libosmo-netif/src/osmux.c:281:3: runtime error: member access within null 
pointer of type 'struct msgb'

This could also happen if a BSC started sending or we received (non legacy 
dummy) osmux
frames before we received the BSC CRCX ACK agreeing on osmux negotiation
and switching to ACTIVATING state.

Related: SYS#4350
Change-Id: I3536169c94e65f999aaa9c9e43cc7dab8551d30f
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 43 insertions(+), 42 deletions(-)


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

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


Change in openbsc[master]: mgcp: osmux: allow enabling osmux only on correct activating state

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11338


Change subject: mgcp: osmux: allow enabling osmux only on correct activating 
state
..

mgcp: osmux: allow enabling osmux only on correct activating state

State ACTIVATING is set once negotiation between the 2 parts went
successfuly.

Change-Id: I21eb30fa8d48f3d592ff197bd74e673fdac51c1d
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/38/11338/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index b46ea10..6be5eb2 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -452,9 +452,9 @@
 */
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 
1);

-   if (endp->osmux.state == OSMUX_STATE_DISABLED) {
-   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't request Osmux\n",
-ENDPOINT_NUMBER(endp));
+   if (endp->osmux.state != OSMUX_STATE_ACTIVATING) {
+   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't negotiate Osmux, 
state %d\n",
+ENDPOINT_NUMBER(endp), endp->osmux.state);
return -1;
}


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I21eb30fa8d48f3d592ff197bd74e673fdac51c1d
Gerrit-Change-Number: 11338
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: osmux: Improve checks around activating and using enabled osmux

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11339


Change subject: mgcp: osmux: Improve checks around activating and using enabled 
osmux
..

mgcp: osmux: Improve checks around activating and using enabled osmux

* Refactor code to have unified checks on all paths activating Osmux.
* Improve checkings at activation time and add logging.
* Code now enforces endp osmux status to be enabled before processing
the frame through endp->osmux.out. Before, a delayed or bad pkt could
arrive and be processed by an endp with osmux not enabled, using
endp->osmux.out that was not initialized.

Related: SYS#4350
Change-Id: I3536169c94e65f999aaa9c9e43cc7dab8551d30f
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 43 insertions(+), 42 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/39/11339/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 6be5eb2..a0ac295 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -261,6 +261,34 @@
return msg;
 }

+/* Updates endp osmux state and returns 0 if it can process messages, -1 
otherwise */
+static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct 
sockaddr_in *addr, bool sending)
+{
+   switch(endp->osmux.state) {
+   case OSMUX_STATE_ACTIVATING:
+   if (osmux_enable_endpoint(endp, >sin_addr, 
addr->sin_port) < 0 ) {
+   LOGP(DMGCP, LOGL_ERROR,
+"Could not enable osmux in endpoint 0x%x for 
%s:%u\n",
+ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
+ntohs(addr->sin_port));
+   return -1;
+   }
+   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for 
%s:%u\n",
+ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
+ntohs(addr->sin_port));
+   return 0;
+   case OSMUX_STATE_ENABLED:
+   return 0;
+   default:
+   LOGP(DMGCP, LOGL_ERROR,
+"Osmux %s in endpoint 0x%x for %s:%u without full 
negotiation, state %d\n",
+sending ? "sent" : "received",
+ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
+ntohs(addr->sin_port), endp->osmux.state);
+   return -1;
+   }
+}
+
 static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
uint8_t *osmux_cid)
 {
@@ -312,11 +340,12 @@
 osmuxh->circuit_id);
goto out;
}
-   endp->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   endp->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, , false) == 0) {
+   endp->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   endp->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(>osmux.out, osmuxh);
+   }
rem = msg->len;
-
-   osmux_xfrm_output_sched(>osmux.out, osmuxh);
}
 out:
msgb_free(msg);
@@ -339,20 +368,8 @@
 "Cannot find endpoint for Osmux CID %d\n", osmux_cid);
goto out;
}
-
-   if (endp->osmux.state == OSMUX_STATE_ENABLED)
-   goto out;
-
-   if (osmux_enable_endpoint(endp, >sin_addr, addr->sin_port) < 0 ) {
-   LOGP(DMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint 0x%x\n",
-ENDPOINT_NUMBER(endp));
-   goto out;
-   }
-
-   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
-ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
-ntohs(addr->sin_port));
+   endp_osmux_state_check(endp, addr, false);
+   /* Only needed to punch hole in firewall, it can be dropped */
 out:
msgb_free(msg);
return 0;
@@ -393,11 +410,12 @@
 osmuxh->circuit_id);
goto out;
}
-   endp->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   endp->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, , false) == 0) {
+   endp->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   endp->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(>osmux.out, osmuxh);
+   }
rem = msg->len;
-
-   osmux_xfrm_output_sched(>osmux.out, osmuxh);
}
 out:
msgb_free(msg);
@@ -535,26 +553,9 @@
if (memcmp(>net_end.addr, _unset, sizeof(addr_unset)) == 0)
return 0;

-   if (endp->osmux.state == OSMUX_STATE_ACTIVATING) {
-

Change in openbsc[master]: mgcp: osmux: Make func handling dummy frames independent of endp type

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11337


Change subject: mgcp: osmux: Make func handling dummy frames independent of 
endp type
..

mgcp: osmux: Make func handling dummy frames independent of endp type

Change-Id: I285f1cb693b243ecd404337f2bb5b74ddd32b123
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/11337/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index ea0372b..b46ea10 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -325,7 +325,7 @@

 /* This is called from the bsc-nat */
 static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in 
*addr,
- struct msgb *msg)
+ struct msgb *msg, int endp_type)
 {
struct mgcp_endpoint *endp;
uint8_t osmux_cid;
@@ -333,7 +333,7 @@
if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;

-   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
+   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, endp_type);
if (!endp) {
LOGP(DMGCP, LOGL_ERROR,
 "Cannot find endpoint for Osmux CID %d\n", osmux_cid);
@@ -378,7 +378,7 @@

/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
-   return osmux_handle_dummy(cfg, , msg);
+   return osmux_handle_dummy(cfg, , msg, MGCP_DEST_BTS);

rem = msg->len;
while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) {

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I285f1cb693b243ecd404337f2bb5b74ddd32b123
Gerrit-Change-Number: 11337
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: osmux_send_dummy: Avoid logging incorrectly and sending if osmu...

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11334


Change subject: mgcp: osmux_send_dummy: Avoid logging incorrectly and sending 
if osmux not enabled
..

mgcp: osmux_send_dummy: Avoid logging incorrectly and sending if osmux not 
enabled

Change-Id: I5244cb9304adef3aa612b8126bf95e77562c801c
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/34/11334/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 71e8eae..33f5721 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -530,12 +530,20 @@
LOGP(DMGCP, LOGL_ERROR,
 "Could not activate osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
+   return 0;
}
LOGP(DMGCP, LOGL_ERROR,
 "Osmux CID %u for %s:%u is now enabled\n",
 endp->osmux.cid, inet_ntoa(endp->net_end.addr),
 endp->cfg->osmux_port);
}
+   if(endp->osmux.state != OSMUX_STATE_ENABLED) {
+   LOGP(DMGCP, LOGL_ERROR,
+"OSMUX dummy to %s CID %u: Osmux not enabled on endpoint 
0x%x state %d\n",
+inet_ntoa(endp->net_end.addr), endp->osmux.cid,
+ENDPOINT_NUMBER(endp), endp->osmux.state);
+return 0;
+   }
LOGP(DMGCP, LOGL_DEBUG,
 "sending OSMUX dummy load to %s CID %u\n",
 inet_ntoa(endp->net_end.addr), endp->osmux.cid);

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5244cb9304adef3aa612b8126bf95e77562c801c
Gerrit-Change-Number: 11334
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: osmux: Move parse_cid of legacy dummy frames to own function

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11336


Change subject: mgcp: osmux: Move parse_cid of legacy dummy frames to own 
function
..

mgcp: osmux: Move parse_cid of legacy dummy frames to own function

Change-Id: If9249fb0ee2e33c7dd2ab817480776acaa784cc2
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 15 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/36/11336/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 7590f18..ea0372b 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -261,6 +261,20 @@
return msg;
 }

+static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
+   uint8_t *osmux_cid)
+{
+   if (msg->len < 1 + sizeof(osmux_cid)) {
+   LOGP(DMGCP, LOGL_ERROR,
+"Discarding truncated Osmux dummy load\n");
+   return -1;
+   }
+
+   /* extract the osmux CID from the dummy message */
+   memcpy(osmux_cid, >data[1], sizeof(*osmux_cid));
+   return 0;
+}
+
 #define osmux_chunk_length(msg, rem) (rem - msg->len);

 int osmux_read_from_bsc_nat_cb(struct osmo_fd *ofd, unsigned int what)
@@ -316,17 +330,8 @@
struct mgcp_endpoint *endp;
uint8_t osmux_cid;

-   if (msg->len < 1 + sizeof(osmux_cid)) {
-   LOGP(DMGCP, LOGL_ERROR,
-"Discarding truncated Osmux dummy load\n");
+   if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;
-   }
-
-   LOGP(DMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
-inet_ntoa(addr->sin_addr));
-
-   /* extract the osmux CID from the dummy message */
-   memcpy(_cid, >data[1], sizeof(osmux_cid));

endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
if (!endp) {

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9249fb0ee2e33c7dd2ab817480776acaa784cc2
Gerrit-Change-Number: 11336
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: osmux: Don't process regular osmux frames if disabled by cfg

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11335


Change subject: mgcp: osmux: Don't process regular osmux frames if disabled by 
cfg
..

mgcp: osmux: Don't process regular osmux frames if disabled by cfg

Prior to this commit, the check was only done on legacy dummy frames.

Change-Id: Ief4e62fe68a11a60d90292c72d1263fd1f728356
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 12 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/35/11335/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 33f5721..7590f18 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -275,6 +275,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DMGCP, LOGL_ERROR,
+"bsc-nat wants to use Osmux but bsc did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
goto out;
@@ -319,12 +325,6 @@
LOGP(DMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
 inet_ntoa(addr->sin_addr));

-   if (!cfg->osmux) {
-   LOGP(DMGCP, LOGL_ERROR,
-"bsc wants to use Osmux but bsc-nat did not request it\n");
-   goto out;
-   }
-
/* extract the osmux CID from the dummy message */
memcpy(_cid, >data[1], sizeof(osmux_cid));

@@ -365,6 +365,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DMGCP, LOGL_ERROR,
+"bsc wants to use Osmux but bsc-nat did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
return osmux_handle_dummy(cfg, , msg);

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief4e62fe68a11a60d90292c72d1263fd1f728356
Gerrit-Change-Number: 11335
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-ttcn3-hacks[master]: fix build of bsc bsc-nat, hlr, and msc tests

2018-10-12 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/11333


Change subject: fix build of bsc bsc-nat, hlr, and msc tests
..

fix build of bsc bsc-nat, hlr, and msc tests

For some reason I missed build failures which were caused
by my recent MobileIdentityLV type name change.

With this commit, I can compile bsc, bsc-nat, hlr, and msc
tests again.

Change-Id: I72c369ccd9df88970a69c6dfb5d5255d14fe6aa8
Fixes: 59c15d67cabbd95dcbbb50c968cbe600f4462f64
---
M bsc-nat/gen_links.sh
M hlr/gen_links.sh
M library/L3_Templates.ttcn
M msc/gen_links.sh
4 files changed, 5 insertions(+), 2 deletions(-)



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

diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh
index 453d8ca..15fff9b 100755
--- a/bsc-nat/gen_links.sh
+++ b/bsc-nat/gen_links.sh
@@ -47,7 +47,7 @@
 gen_links $DIR $FILES

 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn 
IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc 
IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn 
BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
+FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn 
IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc 
IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn 
BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn 
RLCMAC_CSN1_Types.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh
index f9e80c5..ed67881 100755
--- a/hlr/gen_links.sh
+++ b/hlr/gen_links.sh
@@ -40,6 +40,7 @@
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="SS_Templates.ttcn USSD_Helpers.ttcn "
+FILES+="RLCMAC_CSN1_Types.ttcn"


 gen_links $DIR $FILES
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index a05aba2..e2657f0 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -18,6 +18,7 @@
 import from MobileL3_CC_Types all;
 import from MobileL3_GMM_SM_Types all;
 import from MobileL3_SMS_Types all;
+import from RLCMAC_CSN1_Types all;

 /* TS 24.007 Table 11.3 TI Flag */
 const BIT1 c_TIF_ORIG := '0'B;
@@ -283,7 +284,7 @@
}
 }

-template PDU_ML3_NW_MS tr_PAGING_REQ1(template MobileIdentityLV mi1 := ?,
+template PDU_ML3_NW_MS tr_PAGING_REQ1(template MobileIdentityLV_Paging mi1 := 
?,
  template MobileIdentityTLV mi2 := *) := {
discriminator := '0110'B,
tiOrSkip := {
diff --git a/msc/gen_links.sh b/msc/gen_links.sh
index df646d9..c5a1222 100755
--- a/msc/gen_links.sh
+++ b/msc/gen_links.sh
@@ -95,6 +95,7 @@
 FILES+="SMPP_CodecPort.ttcn SMPP_CodecPort_CtrlFunct.ttcn 
SMPP_CodecPort_CtrlFunctDef.cc SMPP_Emulation.ttcn SMPP_Templates.ttcn "
 FILES+="SS_Templates.ttcn SCCP_Templates.ttcn USSD_Helpers.ttcn "
 FILES+="SGsAP_Templates.ttcn "
+FILES+="RLCMAC_CSN1_Types.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results

--
To view, visit https://gerrit.osmocom.org/11333
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: I72c369ccd9df88970a69c6dfb5d5255d14fe6aa8
Gerrit-Change-Number: 11333
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in simtrace2[master]: libusb_util.c: Avoid gcc warning about strncpy()

2018-10-12 Thread Kévin Redon
Kévin Redon has posted comments on this change. ( 
https://gerrit.osmocom.org/11329 )

Change subject: libusb_util.c: Avoid gcc warning about strncpy()
..


Patch Set 1:

string is also null terminated just afterwards (strncpy doesn't ensure it)


--
To view, visit https://gerrit.osmocom.org/11329
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: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
Gerrit-Change-Number: 11329
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Kévin Redon 
Gerrit-Comment-Date: Fri, 12 Oct 2018 15:29:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in simtrace2[master]: libusb_util.c: Avoid gcc warning about strncpy()

2018-10-12 Thread Kévin Redon
Kévin Redon has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11329 )

Change subject: libusb_util.c: Avoid gcc warning about strncpy()
..

libusb_util.c: Avoid gcc warning about strncpy()

What we're doing is actually legal: We copy the full size of the
destination array, and then overwrite the last byte with NUL.  However,
gcc isn't smart enough to see that:

libusb_util.c:162:5: warning: ‘strncpy’ specified bound 20 equals destination 
size [-Wstringop-truncation]
 strncpy(out[out_idx].path, path, sizeof(out[out_idx].path));
 ^~~
Let's copy one byte less to make it happy.

Change-Id: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
---
M host/libusb_util.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Kévin Redon: Looks good to me, approved



diff --git a/host/libusb_util.c b/host/libusb_util.c
index cb435e2..45e3f50 100644
--- a/host/libusb_util.c
+++ b/host/libusb_util.c
@@ -159,7 +159,7 @@
out[out_idx].vendor = dev_desc.idVendor;
out[out_idx].product = dev_desc.idProduct;
out[out_idx].addr = addr;
-   strncpy(out[out_idx].path, path, 
sizeof(out[out_idx].path));
+   strncpy(out[out_idx].path, path, 
sizeof(out[out_idx].path)-1);
out[out_idx].path[sizeof(out[out_idx].path)-1] 
= '\0';
out[out_idx].configuration = 
conf_desc->bConfigurationValue;
out[out_idx].interface = 
if_desc->bInterfaceNumber;

--
To view, visit https://gerrit.osmocom.org/11329
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: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
Gerrit-Change-Number: 11329
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Kévin Redon 


Change in simtrace2[master]: libusb_util.c: Avoid gcc warning about strncpy()

2018-10-12 Thread Kévin Redon
Kévin Redon has posted comments on this change. ( 
https://gerrit.osmocom.org/11329 )

Change subject: libusb_util.c: Avoid gcc warning about strncpy()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11329
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: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
Gerrit-Change-Number: 11329
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Kévin Redon 
Gerrit-Comment-Date: Fri, 12 Oct 2018 15:27:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: nat: Log state of pending transaction

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11332


Change subject: nat: Log state of pending transaction
..

nat: Log state of pending transaction

Change-Id: I9f686404517bf8a2044cf59dd5bfaf90eb4f798f
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/32/11332/1

diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 
b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 06799bb..9fc8ba3 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -521,8 +521,8 @@
mgcp_endp = >mgcp_cfg->trunk.endpoints[endpoint];

if (bsc_endp->transaction_id) {
-   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x had pending transaction: 
'%s'\n",
-endpoint, bsc_endp->transaction_id);
+   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x had pending transaction: 
'%s' state %d\n",
+endpoint, bsc_endp->transaction_id, 
bsc_endp->transaction_state);
talloc_free(bsc_endp->transaction_id);
bsc_endp->transaction_id = NULL;
bsc_endp->transaction_state = 0;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f686404517bf8a2044cf59dd5bfaf90eb4f798f
Gerrit-Change-Number: 11332
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-ttcn3-hacks[master]: use tag for test dependency commit

2018-10-12 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/11331


Change subject: use tag for test dependency commit
..

use tag for test dependency commit

Use the output of 'git describe' to pin the commit checked out
for dependency titan.ProtocolModules.SGsAP_13.2.0_commit, i.e.
the tag which points to 81544cf008378058b95ff20d33f3770fadb7e235.

Using a plain commit hash will always re-trigger an update of
the working tree in this particular case because 'git describe'
won't ever return an error.

Change-Id: Ia994b5c4488fd9b0d410b992e515c6eec4dd23b1
---
M deps/Makefile
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/deps/Makefile b/deps/Makefile
index f2f38bd..a1ac595 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -78,7 +78,7 @@
 titan.ProtocolModules.RTP_commit=  R.5.A
 titan.ProtocolModules.ROSE_commit= R.1.C
 titan.ProtocolModules.SCTP_commit= R.2.A
-titan.ProtocolModules.SGsAP_13.2.0_commit= 
81544cf008378058b95ff20d33f3770fadb7e235
+titan.ProtocolModules.SGsAP_13.2.0_commit= R.1.B
 titan.ProtocolModules.SDP_commit=  R.14.A
 titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69
 titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A

--
To view, visit https://gerrit.osmocom.org/11331
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: Ia994b5c4488fd9b0d410b992e515c6eec4dd23b1
Gerrit-Change-Number: 11331
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in osmo-pcu[master]: fix width of mobile identity length in paging request [WIP]

2018-10-12 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/11330


Change subject: fix width of mobile identity length in paging request [WIP]
..

fix width of mobile identity length in paging request [WIP]

Do not merge! This change is probably wrong.
Only a WIP PCU test of mine relies on this.

Change-Id: If5f6e79ada1df6d30d4f10bf6c93284ad1bf10ea
---
M src/encoding.cpp
1 file changed, 1 insertion(+), 2 deletions(-)



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

diff --git a/src/encoding.cpp b/src/encoding.cpp
index 1f96458..50ba9ac 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -623,8 +623,7 @@
bitvec_write_field(dest, ,0x0,4);  // Channel Needed

// Mobile Identity
-   bitvec_write_field(dest, ,ptmsi_len+1,8);  // Mobile Identity length
-   bitvec_write_field(dest, ,0xf,4);  // unused
+   bitvec_write_field(dest, ,ptmsi_len+1,4);  // Mobile Identity length
bitvec_write_field(dest, ,0x4,4);  // PTMSI type
for (int i = 0; i < ptmsi_len; i++)
{

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5f6e79ada1df6d30d4f10bf6c93284ad1bf10ea
Gerrit-Change-Number: 11330
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in simtrace2[master]: libusb_util.c: Avoid gcc warning about strncpy()

2018-10-12 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11329


Change subject: libusb_util.c: Avoid gcc warning about strncpy()
..

libusb_util.c: Avoid gcc warning about strncpy()

What we're doing is actually legal: We copy the full size of the
destination array, and then overwrite the last byte with NUL.  However,
gcc isn't smart enough to see that:

libusb_util.c:162:5: warning: ‘strncpy’ specified bound 20 equals destination 
size [-Wstringop-truncation]
 strncpy(out[out_idx].path, path, sizeof(out[out_idx].path));
 ^~~
Let's copy one byte less to make it happy.

Change-Id: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
---
M host/libusb_util.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/29/11329/1

diff --git a/host/libusb_util.c b/host/libusb_util.c
index cb435e2..45e3f50 100644
--- a/host/libusb_util.c
+++ b/host/libusb_util.c
@@ -159,7 +159,7 @@
out[out_idx].vendor = dev_desc.idVendor;
out[out_idx].product = dev_desc.idProduct;
out[out_idx].addr = addr;
-   strncpy(out[out_idx].path, path, 
sizeof(out[out_idx].path));
+   strncpy(out[out_idx].path, path, 
sizeof(out[out_idx].path)-1);
out[out_idx].path[sizeof(out[out_idx].path)-1] 
= '\0';
out[out_idx].configuration = 
conf_desc->bConfigurationValue;
out[out_idx].interface = 
if_desc->bInterfaceNumber;

--
To view, visit https://gerrit.osmocom.org/11329
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: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
Gerrit-Change-Number: 11329
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in openbsc[master]: nat: Log endpoint nr consistently as hex

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11328


Change subject: nat: Log endpoint nr consistently as hex
..

nat: Log endpoint nr consistently as hex

Change-Id: I581f40da47614223219800e97a334f8b5e06b13f
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/28/11328/1

diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 
b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 986306c..06799bb 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -211,7 +211,7 @@
llist_for_each_entry(mcon, >bsc->nat->sccp_connections, 
list_entry) {
if (mcon->msc_endp == endp) {
LOGP(DNAT, LOGL_ERROR,
-"Endpoint %d was assigned to 0x%x and now 0x%x\n",
+"Endpoint 0x%x was assigned to 0x%x and now 
0x%x\n",
 endp,
 sccp_src_ref_to_int(>patched_ref),
 sccp_src_ref_to_int(>patched_ref));

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I581f40da47614223219800e97a334f8b5e06b13f
Gerrit-Change-Number: 11328
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: Log endpoint nr consistently as hex

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11327


Change subject: mgcp: Log endpoint nr consistently as hex
..

mgcp: Log endpoint nr consistently as hex

Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
---
M openbsc/src/libmgcp/mgcp_network.c
M openbsc/src/libmgcp/mgcp_osmux.c
M openbsc/tests/mgcp/mgcp_test.c
3 files changed, 9 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/27/11327/1

diff --git a/openbsc/src/libmgcp/mgcp_network.c 
b/openbsc/src/libmgcp/mgcp_network.c
index 799d998..49500d9 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -763,7 +763,7 @@
break;
}

-   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 endp->type, ENDPOINT_NUMBER(endp));
return 0;
 }
@@ -856,7 +856,7 @@
break;  /* Should not happen */
}
 
-   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+   LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 endp->type, ENDPOINT_NUMBER(endp));
return 0;
 }
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 0a4441c..71e8eae 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -340,12 +340,12 @@

if (osmux_enable_endpoint(endp, >sin_addr, addr->sin_port) < 0 ) {
LOGP(DMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint %d\n",
+"Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
goto out;
}

-   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
+   LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
 ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
 ntohs(addr->sin_port));
 out:
@@ -442,7 +442,7 @@
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 
1);

if (endp->osmux.state == OSMUX_STATE_DISABLED) {
-   LOGP(DMGCP, LOGL_ERROR, "Endpoint %u didn't request Osmux\n",
+   LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't request Osmux\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -482,7 +482,7 @@

 void osmux_disable_endpoint(struct mgcp_endpoint *endp)
 {
-   LOGP(DMGCP, LOGL_INFO, "Releasing endpoint %u using Osmux CID %u\n",
+   LOGP(DMGCP, LOGL_INFO, "Releasing endpoint 0x%x using Osmux CID %u\n",
 ENDPOINT_NUMBER(endp), endp->osmux.cid);

/* We are closing, we don't need pending RTP packets to be transmitted 
*/
@@ -528,7 +528,7 @@
if (osmux_enable_endpoint(endp, >net_end.addr,
  htons(endp->cfg->osmux_port)) < 0) {
LOGP(DMGCP, LOGL_ERROR,
-"Could not activate osmux in endpoint %d\n",
+"Could not activate osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
}
LOGP(DMGCP, LOGL_ERROR,
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 92099db..e7a582a 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -436,7 +436,7 @@
 static int mgcp_test_policy_cb(struct mgcp_trunk_config *cfg, int endpoint,
   int state, const char *transactio_id)
 {
-   fprintf(stderr, "Policy CB got state %d on endpoint %d\n",
+   fprintf(stderr, "Policy CB got state %d on endpoint 0x%x\n",
state, endpoint);
last_endpoint = endpoint;
return MGCP_POLICY_CONT;
@@ -603,7 +603,7 @@
OSMO_ASSERT(last_endpoint != -1);
endp = >trunk.endpoints[last_endpoint];

-   fprintf(stderr, "endpoint %d: "
+   fprintf(stderr, "endpoint 0x%x: "
"payload type BTS %d (exp %d), NET %d (exp 
%d)\n",
last_endpoint,
endp->bts_end.codec.payload_type, 
t->exp_bts_ptype,

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
Gerrit-Change-Number: 11327
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: Avoid initing output without enabling osmux

2018-10-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11326


Change subject: mgcp: Avoid initing output without enabling osmux
..

mgcp: Avoid initing output without enabling osmux

Otherwise we end up in a weird state where we have timers set up but
osmux is still flagged as not enabled.

Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/26/11326/1

diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 69f1c66..0a4441c 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -447,10 +447,6 @@
return -1;
}

-   osmux_xfrm_output_init(>osmux.out,
-  (endp->osmux.cid * rtp_ssrc_winlen) +
-  (random() % rtp_ssrc_winlen));
-
endp->osmux.in = osmux_handle_lookup(endp->cfg, addr, port);
if (!endp->osmux.in) {
LOGP(DMGCP, LOGL_ERROR, "Cannot allocate input osmux handle\n");
@@ -463,6 +459,10 @@
return -1;
}

+   osmux_xfrm_output_init(>osmux.out,
+  (endp->osmux.cid * rtp_ssrc_winlen) +
+  (random() % rtp_ssrc_winlen));
+
switch (endp->cfg->role) {
case MGCP_BSC_NAT:
endp->type = MGCP_OSMUX_BSC_NAT;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I15c3a1a6bdf2566b03d1d543d8d15e4117a53622
Gerrit-Change-Number: 11326
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 6:

(2 comments)

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@79
PS6, Line 79:   kamailio="$(sudo which kamailio)"
> oof, ok ... maybe instead we should include /sbin or something in the $PATH? 
> […]
Done


https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@88
PS6, Line 88:   sudo mkdir -p /var/run/kamailio
> can we instead keep the kamailio run dir as a local subdir? Is it not 
> configurable in kamailio.cfg? […]
Turns out, it is configurable as "rundir" in the config. I've set it to 
"/tmp/kamailio_rundir" now, and kamailio creates that folder and is happy with 
it.

It would of course be better to not use /tmp for this either (or to have random 
names and clean it up properly). But then again we would need to change that 
for the socket path too, so I think it is good enough for now.

Maybe at a later point we could add a well defined temporary directory to the 
script, which can be used with a variable in the configs.

Your thoughts on sudo sound good to me.



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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Fri, 12 Oct 2018 11:46:55 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

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

https://gerrit.osmocom.org/11144

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

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/7
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 7
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 6: Code-Review+1

(2 comments)

good except for the root fs / sudo things

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@79
PS6, Line 79:   kamailio="$(sudo which kamailio)"
oof, ok ... maybe instead we should include /sbin or something in the $PATH?

  $(PATH="$PATH:/usr/sbin;/sbin" which kamailio)


https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@88
PS6, Line 88:   sudo mkdir -p /var/run/kamailio
can we instead keep the kamailio run dir as a local subdir? Is it not 
configurable in kamailio.cfg?

Above sudo is intended only for configuring the network, all the remaining 
stuff should be userland and shouldn't modify the current root system.

Hmm, I think we should even remove sudo from the tcpdumps, possibly skip 
tcpdump if the user has no setuid on dumpcap; and maybe even separate all 
network config sudo stuff to a separate script... (what was I thinking!)



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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Fri, 12 Oct 2018 11:06:49 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: vty 'show bts'/'show trx': display IPs and ports

2018-10-12 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11290 )

Change subject: vty 'show bts'/'show trx': display IPs and ports
..


Patch Set 4: Code-Review+2

(3 comments)

https://gerrit.osmocom.org/#/c/11290/4/src/osmo-bsc/bsc_vty.c
File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/#/c/11290/4/src/osmo-bsc/bsc_vty.c@293
PS4, Line 293: /*! Dump the IP addresses and ports of the input signal link's 
timeslot.
(so far we have doxygen only in libosmocore...) (and I'm not actually aware of 
anyone reading that, instead of the code comments. But that's a different 
topic.)


https://gerrit.osmocom.org/#/c/11290/4/src/osmo-bsc/bsc_vty.c@301
PS4, Line 301:  talloc_free(name);
(reading this makes me want to write osmo_sock_get_name2()...)


https://gerrit.osmocom.org/#/c/11290/4/src/osmo-bsc/bsc_vty.c@1066
PS4, Line 1066: e1isl_dump_vty_tcp(vty, trx->rsl_link);
(IMHO better to have the VTY_NEWLINE down here. Well, not that important here, 
just as a general pattern when writing strings.) plus, I notice it follows the 
general pattern of the existing e1isl_dump_vty() code. So nm.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f
Gerrit-Change-Number: 11290
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 12 Oct 2018 10:57:20 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: find the terminal once and abort if missing

2018-10-12 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11143 )

Change subject: find the terminal once and abort if missing
..


Patch Set 6: Code-Review+2

(2 comments)

https://gerrit.osmocom.org/#/c/11143/6/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11143/6/net/tmpl_std/run.sh@37
PS6, Line 37: find_term() {
(I'd have just put it on the root level scope, but fine if you think a function 
looks better...)


https://gerrit.osmocom.org/#/c/11143/6/net/tmpl_std/run.sh@43
PS6, Line 43: [ -n "$terminal" ] && return
I find the expanded 'if' clauses easier to read, especially for people not that 
familiar with shell scripting.

Anyway. next time is fine.



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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 12 Oct 2018 10:51:01 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmo-abis[master]: ipaccess: add e1inp_sign_link_name()

2018-10-12 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/11294 )

Change subject: ipaccess: add e1inp_sign_link_name()
..


Abandoned

> we don't ever want to allocate under a NULL ctx.

Understood. Nobody commented on that in the other patch:

https://gerrit.osmocom.org/#/c/osmo-bsc/+/11290/

But I guess the difference is, that there we are directly freeing up the memory 
and not returning something allocated to a NULL ctx.

> After the comment to the other patch, we might as well drop this entire 
> patch..?

Yes, abandoning it now.
--
To view, visit https://gerrit.osmocom.org/11294
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I1e78ee4dc5c9bd10592c090b9a3b35baf61a6d69
Gerrit-Change-Number: 11294
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-bsc[master]: vty 'show bts'/'show trx': display IPs and ports

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11290

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

Change subject: vty 'show bts'/'show trx': display IPs and ports
..

vty 'show bts'/'show trx': display IPs and ports

This quickly allows knowing which IP a BTS is using in order to SSH
into it. Example output:

OsmoBSC> show trx
...
  Baseband Transceiver NM State: Oper 'Enabled', Admin 'Unlocked', Avail 'OK'
  ip.access stream ID: 0x00 (r=192.168.1.178:34090<->l=192.168.1.37:3003)
...

OsmoBSC> show bts
...
  Paging: 0 pending requests, 50 free slots
  OML Link: (r=192.168.1.178:57692<->l=192.168.1.37:3002)
  OML Link state: connected 0 days 0 hours 0 min. 17 sec.
...

Related: OS#3145
Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 18 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f
Gerrit-Change-Number: 11290
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: run tcpdump *after* finding programs (not before)

2018-10-12 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/11142 )

Change subject: run tcpdump *after* finding programs (not before)
..


Abandoned

This is integrated here now, where it makes more sense:
https://gerrit.osmocom.org/#/c/osmo-dev/+/11144/6
--
To view, visit https://gerrit.osmocom.org/11142
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: If487c357cbae504410545d2ed00d7e22f5e60f4f
Gerrit-Change-Number: 11142
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

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

https://gerrit.osmocom.org/11144

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

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 465 insertions(+), 3 deletions(-)


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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: find the terminal once and abort if missing

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

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

https://gerrit.osmocom.org/11143

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

Change subject: find the terminal once and abort if missing
..

find the terminal once and abort if missing

Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
---
M net/tmpl_std/run.sh
1 file changed, 16 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in libosmocore[master]: libosmogsm/gsup.c: assert message type in osmo_gsup_encode()

2018-10-12 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11325


Change subject: libosmogsm/gsup.c: assert message type in osmo_gsup_encode()
..

libosmogsm/gsup.c: assert message type in osmo_gsup_encode()

Missing (unset) type of to be encoded message is not a memory
allocation failure (-ENOMEM), this is definitely a mistake.

Change-Id: Ibbac18e2b68b765c17c2bc959c4c085037953a7f
---
M src/gsm/gsup.c
1 file changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/11325/1

diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 9c2f817..fe13d95 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -534,9 +534,7 @@
size_t bcd_len;

/* generic part */
-   if(!gsup_msg->message_type)
-   return -ENOMEM;
-
+   OSMO_ASSERT(gsup_msg->message_type != 0x00);
msgb_v_put(msg, gsup_msg->message_type);

bcd_len = gsm48_encode_bcd_number(bcd_buf, sizeof(bcd_buf), 0,

--
To view, visit https://gerrit.osmocom.org/11325
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: Ibbac18e2b68b765c17c2bc959c4c085037953a7f
Gerrit-Change-Number: 11325
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmo-dev[master]: find the terminal once and abort if missing

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

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

https://gerrit.osmocom.org/11143

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

Change subject: find the terminal once and abort if missing
..

find the terminal once and abort if missing

Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
---
M net/tmpl_std/run.sh
1 file changed, 18 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/43/11143/5
--
To view, visit https://gerrit.osmocom.org/11143
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

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

https://gerrit.osmocom.org/11144

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

Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/5
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-msc[master]: gsm_04_08_cc: Add global guard timer for MNCC

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11307 )

Change subject: gsm_04_08_cc: Add global guard timer for MNCC
..


Patch Set 1: Code-Review-1

(1 comment)

looks good, but the actual timeout value should receive some more consideration.

https://gerrit.osmocom.org/#/c/11307/1/src/libmsc/gsm_04_08_cc.c
File src/libmsc/gsm_04_08_cc.c:

https://gerrit.osmocom.org/#/c/11307/1/src/libmsc/gsm_04_08_cc.c@76
PS1, Line 76: #define GUARD_TIMEOUT 65
> should this be configurable?
it should be configurable, and I am afraid 65 seconds is way too little.  
According to TS 04.07, we have something like 180 seconds of default timeout 
when alerting the remote end alone.  This means that the phone of the called 
subscriber could be ringing for 3 minutes before an answer.  And if the called 
party picks up after 2:50 minutes after starting to alert (which is probably 
easily more than 3 minutes after attempting the call), it is still a successful 
call.  With 65 seconds global guard timer, we would kill the call too early.



--
To view, visit https://gerrit.osmocom.org/11307
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: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Gerrit-Change-Number: 11307
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:29:45 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: handover_decision_2.c: tweak ho candidate logging

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11317 )

Change subject: handover_decision_2.c: tweak ho candidate logging
..

handover_decision_2.c: tweak ho candidate logging

Use a common LOGPHOCAND() to transparently log both local and remote
candidates.

Change-Id: I694e3832c55b4e972e05422e5e4508a74a222a71
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 65 insertions(+), 49 deletions(-)

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



diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index 70be050..fc94d61 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -64,6 +64,26 @@
 bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
 ## args)

+#define LOGPHOLCHANTOREMOTE(lchan, remote_cil, level, fmt, args...) \
+   LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s)->(remote-BSS %s) (subscr 
%s) " fmt, \
+lchan->ts->trx->bts->nr, \
+lchan->ts->trx->nr, \
+lchan->ts->nr, \
+lchan->nr, \
+gsm_lchant_name(lchan->type), \
+gsm48_chan_mode_name(lchan->tch_mode), \
+gsm0808_cell_id_list_name(remote_cil), \
+bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
+## args)
+
+#define LOGPHOCAND(candidate, level, fmt, args...) do {\
+   if ((candidate)->bts) \
+   LOGPHOLCHANTOBTS((candidate)->lchan, (candidate)->bts, level, 
fmt, ## args); \
+   else if ((candidate)->cil) \
+   LOGPHOLCHANTOREMOTE((candidate)->lchan, (candidate)->cil, 
level, fmt, ## args); \
+   } while(0)
+
+
 #define REQUIREMENT_A_TCHF 0x01
 #define REQUIREMENT_B_TCHF 0x02
 #define REQUIREMENT_C_TCHF 0x04
@@ -634,7 +654,6 @@
/* change to full rate if AFS is improved and a candidate */
if (afs_bias > 0 && (requirements & REQUIREMENT_TCHF_MASK)) {
full_rate = true;
-   LOGPHOLCHAN(lchan, LOGL_DEBUG, "[Improve AHS->AFS]\n");
break;
}
/* change to full rate if the only candidate */
@@ -749,7 +768,7 @@
.bsic = nmp->bsic,
};
int avg;
-   struct ho_candidate *c;
+   struct ho_candidate c;
int min_rxlev;

/* skip empty slots */
@@ -791,16 +810,22 @@
/* calculate average rxlev for this cell over the window */
avg = neigh_meas_avg(nmp, ho_get_hodec2_rxlev_neigh_avg_win(bts->ho));

+   c = (struct ho_candidate){
+   .lchan = lchan,
+   .avg = avg,
+   .bts = neighbor_bts,
+   };
+
/* Heed rxlev hysteresis only if the RXLEV/RXQUAL/TA levels of the MS 
aren't critically bad and
 * we're just looking for an improvement. If levels are critical, we 
desperately need a handover
 * and thus skip the hysteresis check. */
if (!include_weaker_rxlev) {
unsigned int pwr_hyst = ho_get_hodec2_pwr_hysteresis(bts->ho);
if (avg <= (av_rxlev + pwr_hyst)) {
-   LOGPHOLCHAN(lchan, LOGL_DEBUG,
-   "BTS %d is not a candidate, because RX 
level (%d) is lower"
-   " or equal than current RX level (%d) + 
hysteresis (%d)\n",
-   neighbor_bts->nr, rxlev2dbm(avg), 
rxlev2dbm(av_rxlev), pwr_hyst);
+   LOGPHOCAND(, LOGL_DEBUG,
+  "Not a candidate, because RX level (%d) is 
lower"
+  " or equal than current RX level (%d) + 
hysteresis (%d)\n",
+  rxlev2dbm(avg), rxlev2dbm(av_rxlev), 
pwr_hyst);
return;
}
}
@@ -808,22 +833,20 @@
/* if the minimum level is not reached */
min_rxlev = ho_get_hodec2_min_rxlev(neighbor_bts->ho);
if (rxlev2dbm(avg) < min_rxlev) {
-   LOGPHOLCHAN(lchan, LOGL_DEBUG,
-   "BTS %d is not a candidate, because RX level (%d) 
is lower"
-   " than its minimum required RX level (%d)\n",
-   neighbor_bts->nr, rxlev2dbm(avg), min_rxlev);
+   LOGPHOCAND(, LOGL_DEBUG,
+  "Not a candidate, because RX level (%d) is lower"
+  " than the minimum required RX level (%d)\n",
+  rxlev2dbm(avg), min_rxlev);
return;
}

tchf_count = bts_count_free_ts(neighbor_bts, GSM_PCHAN_TCH_F);
tchh_count = bts_count_free_ts(neighbor_bts, GSM_PCHAN_TCH_H);
-   c = [*candidates];
-   c->lchan = lchan;
-   c->bts = neighbor_bts;
-   c->requirements = 

Change in osmo-bsc[master]: handover_decision_2.c: find_alternative_lchan: drop goto

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11318 )

Change subject: handover_decision_2.c: find_alternative_lchan: drop goto
..

handover_decision_2.c: find_alternative_lchan: drop goto

Don't goto the function end just to log something. Rather log right away and
exit early.

Change-Id: I6558a6948e8973cc91dae240375af074a5f5547e
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 9 insertions(+), 11 deletions(-)

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



diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index fc94d61..67ba26d 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -971,8 +971,10 @@

/* If assignment is disabled and no neighbor cell report exists, or no 
neighbor cell qualifies,
 * we may not even have any candidates. */
-   if (!candidates)
-   goto no_candidates;
+   if (!candidates) {
+   LOGPHOLCHAN(lchan, LOGL_INFO, "No viable neighbor cells 
found\n");
+   return 0;
+   }

/* select best candidate that fulfills requirement B: no congestion 
after HO */
best_better_db = 0;
@@ -1033,8 +1035,10 @@
}

/* we are done in case the MS RXLEV/RXQUAL/TA aren't critical and we're 
avoiding congestion. */
-   if (!include_weaker_rxlev)
-   goto no_candidates;
+   if (!include_weaker_rxlev) {
+   LOGPHOLCHAN(lchan, LOGL_INFO, "No better/less congested 
neighbor cell found\n");
+   return 0;
+   }

/* Select best candidate that fulfills requirement A: can service the 
call.
 * From above we know that there are no options that avoid congestion. 
Here we're trying to find
@@ -1069,13 +1073,7 @@

/* Damn, all is congested, has too low RXLEV or cannot service the 
voice call due to codec
 * restrictions or because all lchans are taken. */
-
-no_candidates:
-   if (include_weaker_rxlev)
-   LOGPHOLCHAN(lchan, LOGL_INFO, "No alternative lchan found\n");
-   else
-   LOGPHOLCHAN(lchan, LOGL_INFO, "No better/less congested 
neighbor cell found\n");
-
+   LOGPHOLCHAN(lchan, LOGL_INFO, "No alternative lchan found\n");
return 0;
 }


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6558a6948e8973cc91dae240375af074a5f5547e
Gerrit-Change-Number: 11318
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: handover_decision_2.c: drop redundant debug_candidate() args

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11319 )

Change subject: handover_decision_2.c: drop redundant debug_candidate() args
..

handover_decision_2.c: drop redundant debug_candidate() args

No functional change.

Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 14 insertions(+), 12 deletions(-)

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



diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index 67ba26d..64fc2dd 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -700,9 +700,11 @@
 }

 /* verbosely log about a handover candidate */
-static inline void debug_candidate(struct gsm_lchan *lchan, struct 
ho_candidate *candidate,
-   struct gsm_bts *neighbor, int8_t rxlev, int tchf_count, int tchh_count)
+static inline void debug_candidate(struct ho_candidate *candidate,
+  int8_t rxlev, int tchf_count, int tchh_count)
 {
+   struct gsm_lchan *lchan = candidate->lchan;
+
 #define HO_CANDIDATE_FMT(tchx, TCHX) "TCH/" #TCHX "={free %d (want %d), 
[%s%s%s]%s}"
 #define HO_CANDIDATE_ARGS(tchx, TCHX) \
 tch##tchx##_count, 
ho_get_hodec2_tch##tchx##_min_slots(candidate->bts->ho), \
@@ -718,18 +720,18 @@
  /* now has to be candidate->requirements & REQUIREMENT_C_TCHX 
!= 0: */ \
  " less-or-equal congestion"))

-   if (neighbor)
-   LOGPHOLCHANTOBTS(lchan, neighbor, LOGL_DEBUG,
-"RX level %d -> %d; "
-HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
-rxlev2dbm(rxlev), rxlev2dbm(candidate->avg),
-HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
-   else
-   LOGPHOLCHANTOBTS(lchan, lchan->ts->trx->bts, LOGL_DEBUG,
+   if (candidate->bts == lchan->ts->trx->bts)
+   LOGPHOLCHANTOBTS(lchan, candidate->bts, LOGL_DEBUG,
 "RX level %d; "
 HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
 rxlev2dbm(candidate->avg),
 HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
+   else if (candidate->bts)
+   LOGPHOLCHANTOBTS(lchan, candidate->bts, LOGL_DEBUG,
+"RX level %d -> %d; "
+HO_CANDIDATE_FMT(f, F) "; " HO_CANDIDATE_FMT(h, H) "\n",
+rxlev2dbm(rxlev), rxlev2dbm(candidate->avg),
+HO_CANDIDATE_ARGS(f, F), HO_CANDIDATE_ARGS(h, H));
 }

 /* add candidate for re-assignment within the current cell */
@@ -748,7 +750,7 @@
c->bts = bts;
c->requirements = check_requirements(lchan, bts, tchf_count, 
tchh_count);
c->avg = av_rxlev;
-   debug_candidate(lchan, c, NULL, 0, tchf_count, tchh_count);
+   debug_candidate(c, 0, tchf_count, tchh_count);
(*candidates)++;
 }

@@ -844,7 +846,7 @@
tchh_count = bts_count_free_ts(neighbor_bts, GSM_PCHAN_TCH_H);
c.requirements = check_requirements(lchan, neighbor_bts, tchf_count, 
tchh_count);

-   debug_candidate(lchan, , neighbor_bts, av_rxlev, tchf_count, 
tchh_count);
+   debug_candidate(, av_rxlev, tchf_count, tchh_count);

clist[*candidates] = c;
(*candidates)++;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
Gerrit-Change-Number: 11319
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: handover_decision_2.c: tweak comments

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11316 )

Change subject: handover_decision_2.c: tweak comments
..

handover_decision_2.c: tweak comments

Change-Id: I8bae3431dfaf23301e72f8f572286753b63a99b9
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index 4e9b02c..70be050 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -471,6 +471,7 @@
break;
default:
LOGPHOLCHANTOBTS(lchan, bts, LOGL_DEBUG, "Not even considering: 
src is not a SPEECH mode lchan\n");
+   /* FIXME: should allow handover of non-speech lchans */
return 0;
}

@@ -556,7 +557,7 @@
}
 #endif

-   /* the maximum number of unsynchonized handovers must no be exceeded */
+   /* the maximum number of unsynchronized handovers must no be exceeded */
if (current_bts != bts
&& bts_handover_count(bts, HO_SCOPE_ALL) >= 
ho_get_hodec2_ho_max(bts->ho)) {
LOGPHOLCHANTOBTS(lchan, bts, LOGL_DEBUG,
@@ -679,7 +680,7 @@
return 0;
 }

-/* debug collected candidates */
+/* verbosely log about a handover candidate */
 static inline void debug_candidate(struct gsm_lchan *lchan, struct 
ho_candidate *candidate,
struct gsm_bts *neighbor, int8_t rxlev, int tchf_count, int tchh_count)
 {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8bae3431dfaf23301e72f8f572286753b63a99b9
Gerrit-Change-Number: 11316
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: handover_decision_2.c: drop redundant debug_candidate() args

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11319 )

Change subject: handover_decision_2.c: drop redundant debug_candidate() args
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
Gerrit-Change-Number: 11319
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:25:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: handover_decision_2.c: find_alternative_lchan: drop goto

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11318 )

Change subject: handover_decision_2.c: find_alternative_lchan: drop goto
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6558a6948e8973cc91dae240375af074a5f5547e
Gerrit-Change-Number: 11318
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:25:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: handover_decision_2.c: tweak comments

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11316 )

Change subject: handover_decision_2.c: tweak comments
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8bae3431dfaf23301e72f8f572286753b63a99b9
Gerrit-Change-Number: 11316
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:24:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: handover_decision_2.c: tweak ho candidate logging

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11317 )

Change subject: handover_decision_2.c: tweak ho candidate logging
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I694e3832c55b4e972e05422e5e4508a74a222a71
Gerrit-Change-Number: 11317
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:24:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bsc: add 3 tests for inter-BSC HO outgoing failures

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11315 )

Change subject: bsc: add 3 tests for inter-BSC HO outgoing failures
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11315
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: If772dbbc5f9790d3f911465e1303dd0a99811154
Gerrit-Change-Number: 11315
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:23:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bsc: add 3 tests for inter-BSC HO outgoing failures

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11315 )

Change subject: bsc: add 3 tests for inter-BSC HO outgoing failures
..

bsc: add 3 tests for inter-BSC HO outgoing failures

Add
* TC_ho_out_fail_no_msc_response()
* TC_ho_out_fail_rr_ho_failure()
* TC_ho_out_fail_no_ho_detect()

Depends: I0980cacb9713e41a1eef3a0a7f6cc892e8a20da5 (osmo-bsc)
Change-Id: If772dbbc5f9790d3f911465e1303dd0a99811154
---
M bsc/BSC_Tests.ttcn
M bsc/expected-results.xml
M library/BSSMAP_Templates.ttcn
3 files changed, 234 insertions(+), 1 deletion(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 754f7b3..5f77021 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2274,6 +2274,214 @@
vc_conn.done;
 }

+/* BSC asks for inter-BSC HO, but the MSC decides that it won't happen and
+ * simply never sends a BSSMAP Handover Command. */
+private function f_tc_ho_out_fail_no_msc_response(charstring id) runs on 
MSC_ConnHdlr {
+   g_pars := valueof(t_def_TestHdlrPars);
+
+   var PDU_BSSAP ass_req := f_gen_ass_req();
+   ass_req.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
+   ass_req.pdu.bssmap.assignmentRequest.codecList := 
valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
+   var template PDU_BSSAP exp_compl := f_gen_exp_compl();
+   f_establish_fully(ass_req, exp_compl);
+
+   f_vty_transceive(BSCVTY, "handover any to arfcn 123 bsic any");
+
+   BSSAP.receive(tr_BSSMAP_HandoverRequired);
+
+   /* osmo-bsc should time out 10 seconds after the handover started.
+* Let's give it a bit extra. */
+   f_sleep(15.0);
+
+   /* The old lchan and conn should still be active. See that arbitrary L3
+* is still going through. */
+   var octetstring l3 := '0123456789'O;
+   RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
+   var template PDU_BSSAP exp_data := {
+   discriminator := '1'B,
+   spare := '000'B,
+   dlci := '00'O,
+   lengthIndicator := 5,
+   pdu := {
+   dtap := l3
+   }
+   };
+   BSSAP.receive(exp_data);
+   setverdict(pass);
+   f_sleep(1.0);
+}
+testcase TC_ho_out_fail_no_msc_response() runs on test_CT {
+   var MSC_ConnHdlr vc_conn;
+
+   f_init(1, true);
+   f_sleep(1.0);
+
+   vc_conn := f_start_handler(refers(f_tc_ho_out_fail_no_msc_response));
+   vc_conn.done;
+}
+
+/* BSC asks for inter-BSC HO, receives BSSMAP Handover Command, but MS reports
+ * RR Handover Failure. */
+private function f_tc_ho_out_fail_rr_ho_failure(charstring id) runs on 
MSC_ConnHdlr {
+   g_pars := valueof(t_def_TestHdlrPars);
+
+   var PDU_BSSAP ass_req := f_gen_ass_req();
+   ass_req.pdu.bssmap.assignmentRequest.channelType := 
valueof(ts_BSSMAP_IE_ChannelType);
+   ass_req.pdu.bssmap.assignmentRequest.codecList := 
valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
+   var template PDU_BSSAP exp_compl := f_gen_exp_compl();
+   f_establish_fully(ass_req, exp_compl);
+
+   f_vty_transceive(BSCVTY, "handover any to arfcn 123 bsic any");
+
+   BSSAP.receive(tr_BSSMAP_HandoverRequired);
+
+   f_sleep(0.5);
+   /* The MSC negotiates Handover Request and Handover Request Ack with
+* the other BSS and comes back with a BSSMAP Handover Command
+* containing an RR Handover Command coming from the target BSS... */
+
+   var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand);
+   log("Remote cell's RR Handover Command passed through as L3 Info: ", 
rr_ho_cmd);
+   var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd);
+   log("Remote cell's RR Handover Command passed through as L3 Info, 
encoded: ", rr_ho_cmd_enc);
+   BSSAP.send(ts_BSSMAP_HandoverCommand(rr_ho_cmd_enc));
+
+   /* expect the Handover Command to go out on RR */
+   var RSL_Message rsl_ho_cmd
+   RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, ?)) -> value rsl_ho_cmd;
+   log("RSL Data Req went out to first BTS: ", rsl_ho_cmd);
+   var RSL_IE_Body rsl_ho_cmd_l3;
+   if (not f_rsl_find_ie(rsl_ho_cmd, RSL_IE_L3_INFO, rsl_ho_cmd_l3)) {
+   log("RSL message contains no L3 Info IE, expected RR Handover 
Command");
+   setverdict(fail);
+   } else {
+   log("Found L3 Info: ", rsl_ho_cmd_l3);
+   if (rsl_ho_cmd_l3.l3_info.payload != rr_ho_cmd_enc) {
+   log("FAIL: the BSC sent out a different L3 Info, not 
matching the RR Handover Command the other BSS forwarded.");
+   setverdict(fail);
+   } else {
+   log("Success: the BSC sent out the same RR Handover 
Command the 

Change in osmo-bsc[master]: gscon_forget_lchan(): Clear Request iff no lchans remain

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11310 )

Change subject: gscon_forget_lchan(): Clear Request iff no lchans remain
..

gscon_forget_lchan(): Clear Request iff no lchans remain

Send a BSSMAP Clear Request only if absolutely no lchan remains associated to
the conn, anywhere (Assignment, Handover as well as primary lchan).

Conceivable would be a situation where e.g. we're in handover and a new lchan
is ready, when just at a time where it doesn't matter anymore the old lchan
fails. We could just carry on with the new one then.

Change-Id: Ibd8e38ccf7759b8834efdedf742c46c227b26e91
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 3c9be56..a8b3183 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -646,7 +646,9 @@
conn->lchan = NULL;

if (conn->fi->state != ST_CLEARING
-   && !conn->lchan)
+   && !conn->lchan
+   && !conn->ho.new_lchan
+   && !conn->assignment.new_lchan)
gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);
 }


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd8e38ccf7759b8834efdedf742c46c227b26e91
Gerrit-Change-Number: 11310
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: lchan_fsm: fix failure handling: notify conn when released

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11312 )

Change subject: lchan_fsm: fix failure handling: notify conn when released
..

lchan_fsm: fix failure handling: notify conn when released

Usually, conn->lchan is set to NULL before/upon releasing it. However, if the
lchan is still associated with a conn upon/after release, make sure the conn
realizes it has no lchan and sends a BSSMAP Clear Request to the MSC.

lchan_reset() is the last step before an lchan is fully unused. In there, make
sure to notify any conn that might still be associated, with
gscon_forget_lchan().

lchan_cleanup() does the same, but in fact this is only called when an lchan is
*deallocated*, but instead it usually merely goes to the UNUSED state.

It may make sense to call gscon_forget_lchan() sooner, e.g. when entering a
releasing state. This here nevertheless is a final safeguard.

Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154
Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 4aaedde..9f2d6c3 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -368,6 +368,9 @@
 {
LOG_LCHAN(lchan, LOGL_DEBUG, "Clearing lchan state\n");

+   if (lchan->conn)
+   gscon_forget_lchan(lchan->conn, lchan);
+
if (lchan->rqd_ref) {
talloc_free(lchan->rqd_ref);
lchan->rqd_ref = NULL;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e
Gerrit-Change-Number: 11312
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: subscr conn: properly forget lchan before release

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11311 )

Change subject: subscr conn: properly forget lchan before release
..

subscr conn: properly forget lchan before release

Clear all lchan->conn pointers when the subscr conn code is choosing to release
an lchan, with gscon_release_lchan().

Rationale: when an lchan releases in error, it should trigger the conn to be
notified and cause a BSSMAP Clear. However, if the conn is actively requesting
for an lchan release, it is already taking care of the situation.

Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154
Change-Id: I4fd582b41ba4599af704d670af83651d2450b1db
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 22 insertions(+), 8 deletions(-)

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



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index a8b3183..52afd54 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -149,6 +149,24 @@
gscon_sigtran_send(conn, resp);
 }

+
+/* Release an lchan in such a way that it doesn't fire events back to the 
conn. */
+static void gscon_release_lchan(struct gsm_subscriber_connection *conn, struct 
gsm_lchan *lchan,
+   bool do_sacch_deact, bool err, enum 
gsm48_rr_cause cause_rr)
+{
+   if (!lchan || !conn)
+   return;
+   if (lchan->conn == conn)
+   lchan_forget_conn(lchan);
+   if (conn->lchan == lchan)
+   conn->lchan = NULL;
+   if (conn->ho.fi && conn->ho.new_lchan == lchan)
+   conn->ho.new_lchan = NULL;
+   if (conn->assignment.new_lchan == lchan)
+   conn->assignment.new_lchan = NULL;
+   lchan_release(lchan, do_sacch_deact, err, cause_rr);
+}
+
 void gscon_release_lchans(struct gsm_subscriber_connection *conn, bool 
do_sacch_deact)
 {
if (conn->ho.fi)
@@ -156,9 +174,7 @@

assignment_reset(conn);

-   lchan_release(conn->lchan, do_sacch_deact, false, 0);
-   lchan_forget_conn(conn->lchan);
-   conn->lchan = NULL;
+   gscon_release_lchan(conn, conn->lchan, do_sacch_deact, false, 0);
 }

 static void handle_bssap_n_connect(struct osmo_fsm_inst *fi, struct 
osmo_scu_prim *scu_prim)
@@ -602,10 +618,8 @@
if (conn->lchan->fi_rtp)
osmo_fsm_inst_dispatch(conn->lchan->fi_rtp, 
LCHAN_RTP_EV_ESTABLISHED, 0);

-   if (old_lchan && (old_lchan != new_lchan)) {
-   lchan_forget_conn(old_lchan);
-   lchan_release(old_lchan, false, false, 0);
-   }
+   if (old_lchan && (old_lchan != new_lchan))
+   gscon_release_lchan(conn, old_lchan, false, false, 0);
 }

 void gscon_lchan_releasing(struct gsm_subscriber_connection *conn, struct 
gsm_lchan *lchan)
@@ -769,7 +783,7 @@
 
switch (fi->T) {
case 993210:
-   lchan_release(conn->lchan, false, true, RSL_ERR_INTERWORKING);
+   gscon_release_lchan(conn, conn->lchan, false, true, 
RSL_ERR_INTERWORKING);

/* MSC has not responded/confirmed connection with CC, this
 * could indicate a bad SCCP connection. We now inform the the

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4fd582b41ba4599af704d670af83651d2450b1db
Gerrit-Change-Number: 11311
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: lchan_fsm: fix failure handling: notify conn when released

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11312 )

Change subject: lchan_fsm: fix failure handling: notify conn when released
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e
Gerrit-Change-Number: 11312
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:21:03 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gscon_forget_lchan(): no Clear Request after Clear Command

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11309 )

Change subject: gscon_forget_lchan(): no Clear Request after Clear Command
..

gscon_forget_lchan(): no Clear Request after Clear Command

Send a BSSMAP Clear Request only if we are not already in ST_CLEARING, i.e.
haven't received a BSSMAP Clear Command yet.

Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154
Change-Id: Idc749068580da45e821e0af04cfa14cc7ce5c432
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 32375d4..3c9be56 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -644,7 +644,9 @@
conn->ho.new_lchan = NULL;
if (conn->lchan == lchan)
conn->lchan = NULL;
-   if (!conn->lchan)
+
+   if (conn->fi->state != ST_CLEARING
+   && !conn->lchan)
gscon_bssmap_clear(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE);
 }


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc749068580da45e821e0af04cfa14cc7ce5c432
Gerrit-Change-Number: 11309
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: subscr conn: properly forget lchan before release

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11311 )

Change subject: subscr conn: properly forget lchan before release
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4fd582b41ba4599af704d670af83651d2450b1db
Gerrit-Change-Number: 11311
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:20:37 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gscon_forget_lchan(): Clear Request iff no lchans remain

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11310 )

Change subject: gscon_forget_lchan(): Clear Request iff no lchans remain
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd8e38ccf7759b8834efdedf742c46c227b26e91
Gerrit-Change-Number: 11310
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:20:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gscon_forget_lchan(): no Clear Request after Clear Command

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11309 )

Change subject: gscon_forget_lchan(): no Clear Request after Clear Command
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc749068580da45e821e0af04cfa14cc7ce5c432
Gerrit-Change-Number: 11309
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:19:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: fix counters for inter-BSC outgoing

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11308 )

Change subject: fix counters for inter-BSC outgoing
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I188b5db9e98c76153fdfb6f864d2cbfaea77bd5d
Gerrit-Change-Number: 11308
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:19:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: fix counters for inter-BSC outgoing

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11308 )

Change subject: fix counters for inter-BSC outgoing
..

fix counters for inter-BSC outgoing

Fix copy-paste error that resulted in counting outgoing inter-BSC HOs as
incoming ones.

Change-Id: I188b5db9e98c76153fdfb6f864d2cbfaea77bd5d
---
M src/osmo-bsc/handover_fsm.c
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 0ba5061..90d5f6c 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -641,14 +641,14 @@
 static int result_counter_INTER_BSC_HO_OUT(enum handover_result result) {
switch (result) {
case HO_RESULT_OK:
-   return BSC_CTR_INTER_BSC_HO_IN_COMPLETED;
+   return BSC_CTR_INTER_BSC_HO_OUT_COMPLETED;
case HO_RESULT_FAIL_TIMEOUT:
-   return BSC_CTR_INTER_BSC_HO_IN_TIMEOUT;
+   return BSC_CTR_INTER_BSC_HO_OUT_TIMEOUT;
case HO_RESULT_CONN_RELEASE:
-   return BSC_CTR_INTER_BSC_HO_IN_STOPPED;
+   return BSC_CTR_INTER_BSC_HO_OUT_STOPPED;
default:
case HO_RESULT_ERROR:
-   return BSC_CTR_INTER_BSC_HO_IN_ERROR;
+   return BSC_CTR_INTER_BSC_HO_OUT_ERROR;
}
 }


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I188b5db9e98c76153fdfb6f864d2cbfaea77bd5d
Gerrit-Change-Number: 11308
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-gsm-tester[master]: ttcn3: Support running tests without PCU socket avail

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11322 )

Change subject: ttcn3: Support running tests without PCU socket avail
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11322
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: I902af460b798ffdba09d77d457bac672db606368
Gerrit-Change-Number: 11322
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:16:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: debian: Require libcdk and install meas_vis osmo-bsc-meas-utils

2018-10-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11324 )

Change subject: debian: Require libcdk and install meas_vis osmo-bsc-meas-utils
..

debian: Require libcdk and install meas_vis osmo-bsc-meas-utils

Change-Id: Ibe977a92acb93a78e323a40f53d653059b07bc0f
---
M debian/control
M debian/osmo-bsc-meas-utils.install
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/debian/control b/debian/control
index 1c6c379..141cb5e 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@
libtool,
pkg-config,
python-minimal,
+   libcdk5-dev,
libtalloc-dev,
libosmocore-dev (>= 0.12.0),
libosmo-sccp-dev (>= 0.10.0),
diff --git a/debian/osmo-bsc-meas-utils.install 
b/debian/osmo-bsc-meas-utils.install
index d8fb318..94a03d0 100644
--- a/debian/osmo-bsc-meas-utils.install
+++ b/debian/osmo-bsc-meas-utils.install
@@ -1 +1,2 @@
 usr/bin/meas_json
+usr/bin/meas_vis

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe977a92acb93a78e323a40f53d653059b07bc0f
Gerrit-Change-Number: 11324
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: debian: Require libcdk and install meas_vis osmo-bsc-meas-utils

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11324 )

Change subject: debian: Require libcdk and install meas_vis osmo-bsc-meas-utils
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe977a92acb93a78e323a40f53d653059b07bc0f
Gerrit-Change-Number: 11324
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:15:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11323
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: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Fri, 12 Oct 2018 06:15:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes