Change in osmo-msc[master]: fix regression: fix internal MNCC operation

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13931 )

Change subject: fix regression: fix internal MNCC operation
..

fix regression: fix internal MNCC operation

While developing the inter-MSC handover refactoring, I was annoyed by the fact
that mncc_tx_to_cc() receives an MNCC message struct containing a msg_type, as
well as a separate msg_type argument, which may deviate from each other. So, as
a first step I wanted to make sure that all callers send identical values for
both by inserting an OSMO_ASSERT(msg_type == msg->msg_type). Later I was going
to remove the separate msg_type argument.

I then forgot to
- carry on to remove the argument and
- to actually test with internal MNCC (it so happens that all of our ttcn3
  tests also use external MNCC).

As a result, the "large refactoring" patch for inter-MSC Handover breaks
internal MNCC operation.

Fix that: remove the separate msg_type argument and make sure that all callers
of mncc_tx_to_cc() indeed pass the desired msg_type in msg->msg_type, and hence
also remove the odd duality of arguments.

Various functions in mncc_builtin.c also exhibit this separate msg_type
argument, which are all unused and make absolutely no sense. Remove those as
well.

Related: OS#3989
Change-Id: I966ce764796982709ea3312e76988a95257acb8d
---
M include/osmocom/msc/gsm_04_08.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/mncc_sock.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_tests.c
6 files changed, 57 insertions(+), 39 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index 47747cb..661da42 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -45,7 +45,7 @@
 int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan 
*lchan, uint8_t power_class);
 int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan 
*new_lchan, uint8_t power_command, uint8_t ho_ref);

-int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg);
+int mncc_tx_to_cc(struct gsm_network *net, void *arg);

 /* convert a ASCII phone number to call-control BCD */
 int encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len,
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 0624d56..2869bba 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -2010,11 +2010,10 @@
 }

 /* Demux incoming genuine calls to GSM CC from MNCC forwarding for inter-MSC 
handover */
-int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
+int mncc_tx_to_cc(struct gsm_network *net, void *arg)
 {
const union mncc_msg *msg = arg;
struct mncc_call *mncc_call = NULL;
-   OSMO_ASSERT(msg_type == msg->msg_type);

if (msg->msg_type == MNCC_SETUP_REQ) {
/* Incoming call to forward for inter-MSC Handover? */
diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c
index 6dd7e35..5754976 100644
--- a/src/libmsc/mncc_builtin.c
+++ b/src/libmsc/mncc_builtin.c
@@ -67,7 +67,7 @@
 }

 /* on incoming call, look up database and send setup to remote subscr. */
-static int mncc_setup_ind(struct gsm_call *call, int msg_type,
+static int mncc_setup_ind(struct gsm_call *call,
  struct gsm_mncc *setup)
 {
struct gsm_mncc mncc;
@@ -116,29 +116,33 @@
/* send call proceeding */
memset(, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
+   mncc.msg_type = MNCC_CALL_PROC_REQ;
DEBUGCC(call, remote, "Accepting call.\n");
-   mncc_tx_to_cc(call->net, MNCC_CALL_PROC_REQ, );
+   mncc_tx_to_cc(call->net, );

/* modify mode */
memset(, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
+   mncc.msg_type = MNCC_LCHAN_MODIFY;
DEBUGCC(call, remote, "Modify channel mode.\n");
-   mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, );
+   mncc_tx_to_cc(call->net, );

/* send setup to remote */
 // setup->fields |= MNCC_F_SIGNAL;
 // setup->signal = GSM48_SIGNAL_DIALTONE;
setup->callref = remote->callref;
+   setup->msg_type = MNCC_SETUP_REQ;
DEBUGCC(call, remote, "Forwarding SETUP to remote.\n");
-   return mncc_tx_to_cc(remote->net, MNCC_SETUP_REQ, setup);
+   return mncc_tx_to_cc(remote->net, setup);

 out_reject:
-   mncc_tx_to_cc(call->net, MNCC_REJ_REQ, );
+   mncc.msg_type = MNCC_REJ_REQ;
+   mncc_tx_to_cc(call->net, );
free_call(call);
return 0;
 }

-static int mncc_alert_ind(struct gsm_call *call, int msg_type,
+static int mncc_alert_ind(struct gsm_call *call,
  struct gsm_mncc *alert)
 {
struct gsm_call *remote;
@@ -147,11 +151,12 @@
if (!(remote = get_call_ref(call->remote_ref)))

Change in osmo-msc[master]: fix regression: fix internal MNCC operation

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13931 )

Change subject: fix regression: fix internal MNCC operation
..


Patch Set 1: Code-Review+2

I manually tested to verify that a voice call via internal MNCC works with this 
patch. Since this fixes a regression, I am merging this now. Nevertheless, as 
always, this is still open to review to be applied in a follow-up and/or revert.


--
To view, visit https://gerrit.osmocom.org/13931
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: I966ce764796982709ea3312e76988a95257acb8d
Gerrit-Change-Number: 13931
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 23:38:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: fix regression: fix internal MNCC operation

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13931


Change subject: fix regression: fix internal MNCC operation
..

fix regression: fix internal MNCC operation

While developing the inter-MSC handover refactoring, I was annoyed by the fact
that mncc_tx_to_cc() receives an MNCC message struct containing a msg_type, as
well as a separate msg_type argument, which may deviate from each other. So, as
a first step I wanted to make sure that all callers send identical values for
both by inserting an OSMO_ASSERT(msg_type == msg->msg_type). Later I was going
to remove the separate msg_type argument.

I then forgot to
- carry on to remove the argument and
- to actually test with internal MNCC (it so happens that all of our ttcn3
  tests also use external MNCC).

As a result, the "large refactoring" patch for inter-MSC Handover breaks
internal MNCC operation.

Fix that: remove the separate msg_type argument and make sure that all callers
of mncc_tx_to_cc() indeed pass the desired msg_type in msg->msg_type, and hence
also remove the odd duality of arguments.

Various functions in mncc_builtin.c also exhibit this separate msg_type
argument, which are all unused and make absolutely no sense. Remove those as
well.

Related: OS#3989
Change-Id: I966ce764796982709ea3312e76988a95257acb8d
---
M include/osmocom/msc/gsm_04_08.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/mncc_sock.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_tests.c
6 files changed, 57 insertions(+), 39 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index 47747cb..661da42 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -45,7 +45,7 @@
 int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan 
*lchan, uint8_t power_class);
 int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan 
*new_lchan, uint8_t power_command, uint8_t ho_ref);

-int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg);
+int mncc_tx_to_cc(struct gsm_network *net, void *arg);

 /* convert a ASCII phone number to call-control BCD */
 int encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len,
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 0624d56..2869bba 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -2010,11 +2010,10 @@
 }

 /* Demux incoming genuine calls to GSM CC from MNCC forwarding for inter-MSC 
handover */
-int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
+int mncc_tx_to_cc(struct gsm_network *net, void *arg)
 {
const union mncc_msg *msg = arg;
struct mncc_call *mncc_call = NULL;
-   OSMO_ASSERT(msg_type == msg->msg_type);

if (msg->msg_type == MNCC_SETUP_REQ) {
/* Incoming call to forward for inter-MSC Handover? */
diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c
index 6dd7e35..5754976 100644
--- a/src/libmsc/mncc_builtin.c
+++ b/src/libmsc/mncc_builtin.c
@@ -67,7 +67,7 @@
 }

 /* on incoming call, look up database and send setup to remote subscr. */
-static int mncc_setup_ind(struct gsm_call *call, int msg_type,
+static int mncc_setup_ind(struct gsm_call *call,
  struct gsm_mncc *setup)
 {
struct gsm_mncc mncc;
@@ -116,29 +116,33 @@
/* send call proceeding */
memset(, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
+   mncc.msg_type = MNCC_CALL_PROC_REQ;
DEBUGCC(call, remote, "Accepting call.\n");
-   mncc_tx_to_cc(call->net, MNCC_CALL_PROC_REQ, );
+   mncc_tx_to_cc(call->net, );

/* modify mode */
memset(, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
+   mncc.msg_type = MNCC_LCHAN_MODIFY;
DEBUGCC(call, remote, "Modify channel mode.\n");
-   mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, );
+   mncc_tx_to_cc(call->net, );

/* send setup to remote */
 // setup->fields |= MNCC_F_SIGNAL;
 // setup->signal = GSM48_SIGNAL_DIALTONE;
setup->callref = remote->callref;
+   setup->msg_type = MNCC_SETUP_REQ;
DEBUGCC(call, remote, "Forwarding SETUP to remote.\n");
-   return mncc_tx_to_cc(remote->net, MNCC_SETUP_REQ, setup);
+   return mncc_tx_to_cc(remote->net, setup);

 out_reject:
-   mncc_tx_to_cc(call->net, MNCC_REJ_REQ, );
+   mncc.msg_type = MNCC_REJ_REQ;
+   mncc_tx_to_cc(call->net, );
free_call(call);
return 0;
 }

-static int mncc_alert_ind(struct gsm_call *call, int msg_type,
+static int mncc_alert_ind(struct gsm_call *call,
  struct gsm_mncc *alert)
 {
struct gsm_call *remote;
@@ -147,11 +151,12 @@
if (!(remote = get_call_ref(call->remote_ref)))

Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13617 )

Change subject: msc: add inter-BSC and inter-MSC Handover tests
..


Patch Set 6: Code-Review+2

These tests are far from complete, and also not really satisfactory. I am 
nevertheless merging them now, in order to have *some* indication of whether 
inter-BSC and inter-MSC handover is still working.


--
To view, visit https://gerrit.osmocom.org/13617
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: I7d76c982ad4e198534fa488609c41e8892b268ab
Gerrit-Change-Number: 13617
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Wed, 08 May 2019 22:58:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests

2019-05-08 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13617

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

Change subject: msc: add inter-BSC and inter-MSC Handover tests
..

msc: add inter-BSC and inter-MSC Handover tests

Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab
---
M library/BSSMAP_Templates.ttcn
M library/GSUP_Types.ttcn
M library/L3_Templates.ttcn
M library/RAN_Emulation.ttcnpp
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
6 files changed, 1,016 insertions(+), 93 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab
Gerrit-Change-Number: 13617
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in libosmocore[master]: Add expect script: 'vty' for easy access to all vtys

2019-05-08 Thread Keith Whyte
Keith Whyte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13756 )

Change subject: Add expect script: 'vty' for easy access to all vtys
..

Add expect script: 'vty' for easy access to all vtys

This expect script can be run as:
 ./vty bsc
 ./vty msc
 ./vty sip ...

etc (no need to remember ports)

Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa
---
A contrib/vty
1 file changed, 87 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, but someone else must approve
  Daniel Willmann: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Mykola Shchetinin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/contrib/vty b/contrib/vty
new file mode 100755
index 000..14c4336
--- /dev/null
+++ b/contrib/vty
@@ -0,0 +1,87 @@
+#!/usr/bin/expect -f
+
+# This expect script can be run as:
+# ./vty bsc
+# ./vty msc
+# ./vty sip ... etc
+# (no need to remember ports)
+#
+# One can edit the script itself to configure the preferred
+# logging configuration for each component.
+#
+# The last command to be issued will be logging filter all 1
+# This allows for easy recall and issuing of
+# 'logging filter all 0' to disable logging.
+# As an alternative one call call this script as
+# ./vty bsc 0 to disable logging on startup via the filter.
+#
+# Requires expect, available on most distributions.
+
+set host localhost
+set vty [lindex $argv 0]
+set lf [lindex $argv 1]
+if { $lf < 0 } { set lf 1 }
+set host localhost
+
+switch $vty {
+ hlr   { set port 4258 } ; # Short names
+ bsc   { set port 4242 }
+ mgw   { set port 4243 }
+ mgw2  {
+set host 127.0.0.2
+set port 4243
+   }
+ sg{ set port 4245 }
+ msc   { set port 4254 }
+ sip   { set port 4256 }
+ gg{ set port 4260 }
+ ggsn  { set port 4260 }
+ hnbgw { set port 4261 }
+
+ osmo-hlr   { set port 4258 } ; # Same but with full names of 
osmo-daemons:
+ osmo-bsc   { set port 4242 }
+ osmo-mgw   { set port 4243 }
+ osmo-mgw-for-bsc   { set port 4243 }
+ osmo-mgw-for-msc   {
+ set host 127.0.0.2
+ set port 4243
+}
+ osmo-sgsn  { set port 4245 }
+ osmo-msc   { set port 4254 }
+ osmo-sip-connector { set port 4256 }
+ osmo-ggsn  { set port 4260 }
+ osmo-hnbgw { set port 4262 }
+ default{ set port 4242 } ; # Default to osmo-bsc / osmo-nitb
+}
+
+spawn -noecho telnet localhost $port
+expect ">"
+send "enable\r"
+expect "#"
+send "logging enable\r"
+expect "#"
+send "logging print category 1\r"
+expect "#"
+send "logging print category-hex 0\r"
+expect "#"
+send "logging print level 1\r"
+expect "#"
+send "logging print file basename last\r"
+expect "#"
+send "logging print extended-timestamp 1\r"
+expect "#"
+send "logging level set-all notice\r"
+expect "#"
+
+# Customise logging configuration per daemon here:
+switch $vty {
+ msc {
+  send "logging level mm info\r"
+  expect "#"
+  send "logging level cc info\r"
+  expect "#"
+ }
+}
+send "logging filter all $lf\r"
+expect "#"
+interact

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa
Gerrit-Change-Number: 13756
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Mykola Shchetinin 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes

2019-05-08 Thread Mykola Shchetinin
Mykola Shchetinin has posted comments on this change. ( 
https://gerrit.osmocom.org/13901 )

Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/13901
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: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2
Gerrit-Change-Number: 13901
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Mykola Shchetinin 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 22:49:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..

deal with rate_ctr_group_alloc() returning NULL

Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Related: #3701
---
M src/gb/gprs_bssgp.c
M src/gb/gprs_ns.c
2 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Verified
  Vadim Yanitskiy: Looks good to me, approved



diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 550757f..b695c28 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -128,6 +128,10 @@
ctx->nsei = nsei;
/* FIXME: BVCI is not unique, only BVCI+NSEI ?!? */
ctx->ctrg = rate_ctr_group_alloc(ctx, _ctrg_desc, bvci);
+   if (!ctx->ctrg) {
+   talloc_free(ctx);
+   return NULL;
+   }
ctx->fc = talloc_zero(ctx, struct bssgp_flow_control);
/* cofigure for 2Mbit, 30 packets in queue */
bssgp_fc_init(ctx->fc, 10, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud);
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index d72003e..3679a5b 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -333,6 +333,10 @@
nsvc->nsi = nsi;
osmo_timer_setup(>timer, gprs_ns_timer_cb, nsvc);
nsvc->ctrg = rate_ctr_group_alloc(nsvc, _ctrg_desc, nsvci);
+   if (!nsvc->ctrg) {
+   talloc_free(nsvc);
+   return NULL;
+   }
nsvc->statg = osmo_stat_item_group_alloc(nsvc, _statg_desc, nsvci);
nsvc->sig_weight = sig_weight;
nsvc->data_weight = data_weight;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 6
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13911 )

Change subject: handle NULL return from rate_ctr_group_alloc()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c
File src/common/bts.c:

https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c@126
PS1, Line 126:  llist_del(>list);
> What about moving llist_add_tail to the end and then dropping this llist_del 
> together with the one i […]
I'm aware of that option.  However, in these kind of "trivial bug fix" changes, 
I try to avoid being too smart and go for the most straight-forward solution.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174
Gerrit-Change-Number: 13911
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 22:17:14 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..


Patch Set 6: Verified+1


--
To view, visit https://gerrit.osmocom.org/13913
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: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 6
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 22:18:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..


Patch Set 5: Verified+1


--
To view, visit https://gerrit.osmocom.org/13913
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: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 22:18:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13911 )

Change subject: handle NULL return from rate_ctr_group_alloc()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174
Gerrit-Change-Number: 13911
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 22:17:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc()

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13911 )

Change subject: handle NULL return from rate_ctr_group_alloc()
..

handle NULL return from rate_ctr_group_alloc()

Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174
Related: OS#3701
---
M src/common/bts.c
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/src/common/bts.c b/src/common/bts.c
index 8c2b2fe..5851e9b 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -122,6 +122,10 @@
bts->agch_queue.length = 0;

bts->ctrs = rate_ctr_group_alloc(bts, _ctrg_desc, bts->nr);
+   if (!bts->ctrs) {
+   llist_del(>list);
+   return -1;
+   }

/* enable management with default levels,
 * raise threshold to GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE to

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174
Gerrit-Change-Number: 13911
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-mgw[master]: handle NULL return of rate_ctr_group_alloc()

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13914 )

Change subject: handle NULL return of rate_ctr_group_alloc()
..

handle NULL return of rate_ctr_group_alloc()

Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d
Related: OS#3701
---
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_protocol.c
2 files changed, 24 insertions(+), 4 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index af5426f..5300351 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -81,7 +81,7 @@
 }

 /* Initialize rtp connection struct with default values */
-static void mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct 
mgcp_conn *conn)
+static int mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn 
*conn)
 {
struct mgcp_rtp_end *end = _rtp->end;
/* FIXME: Each new rate counter group requires an unique index. At the
@@ -109,12 +109,17 @@
end->maximum_packet_time = -1;

conn_rtp->rate_ctr_group = rate_ctr_group_alloc(conn, 
_ctr_group_desc, rate_ctr_index);
+   if (!conn_rtp->rate_ctr_group)
+   return -1;
+
conn_rtp->state.in_stream.err_ts_ctr = 
_rtp->rate_ctr_group->ctr[IN_STREAM_ERR_TSTMP_CTR];
conn_rtp->state.out_stream.err_ts_ctr = 
_rtp->rate_ctr_group->ctr[OUT_STREAM_ERR_TSTMP_CTR];
rate_ctr_index++;

/* Make sure codec table is reset */
mgcp_codec_reset_all(conn_rtp);
+
+   return 0;
 }

 /* Cleanup rtp connection struct */
@@ -175,7 +180,10 @@

switch (type) {
case MGCP_CONN_TYPE_RTP:
-   mgcp_rtp_conn_init(>u.rtp, conn);
+   if (mgcp_rtp_conn_init(>u.rtp, conn) < 0) {
+   talloc_free(conn);
+   return NULL;
+   }
break;
default:
/* NOTE: This should never be called with an
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 3a4e396..807e34a 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1496,7 +1496,7 @@
return 0;
 }

-static void alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void 
*ctx)
+static int alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void *ctx)
 {
/* FIXME: Each new rate counter group requires a unique index. At the
 * moment we generate an index using a counter, but perhaps there is
@@ -1508,25 +1508,34 @@

if (trunk->mgcp_crcx_ctr_group == NULL) {
trunk->mgcp_crcx_ctr_group = rate_ctr_group_alloc(ctx, 
_crcx_ctr_group_desc, crcx_rate_ctr_index);
+   if (!trunk->mgcp_crcx_ctr_group)
+   return -1;
talloc_set_destructor(trunk->mgcp_crcx_ctr_group, 
free_rate_counter_group);
crcx_rate_ctr_index++;
}
if (trunk->mgcp_mdcx_ctr_group == NULL) {
trunk->mgcp_mdcx_ctr_group = rate_ctr_group_alloc(ctx, 
_mdcx_ctr_group_desc, mdcx_rate_ctr_index);
+   if (!trunk->mgcp_mdcx_ctr_group)
+   return -1;
talloc_set_destructor(trunk->mgcp_mdcx_ctr_group, 
free_rate_counter_group);
mdcx_rate_ctr_index++;
}
if (trunk->mgcp_dlcx_ctr_group == NULL) {
trunk->mgcp_dlcx_ctr_group = rate_ctr_group_alloc(ctx, 
_dlcx_ctr_group_desc, dlcx_rate_ctr_index);
+   if (!trunk->mgcp_dlcx_ctr_group)
+   return -1;
talloc_set_destructor(trunk->mgcp_dlcx_ctr_group, 
free_rate_counter_group);
dlcx_rate_ctr_index++;
}
if (trunk->all_rtp_conn_stats == NULL) {
trunk->all_rtp_conn_stats = rate_ctr_group_alloc(ctx, 
_rtp_conn_rate_ctr_group_desc,
 
all_rtp_conn_rate_ctr_index);
+   if (!trunk->all_rtp_conn_stats)
+   return -1;
talloc_set_destructor(trunk->all_rtp_conn_stats, 
free_rate_counter_group);
all_rtp_conn_rate_ctr_index++;
}
+   return 0;
 }

 /*! allocate configuration with default values.
@@ -1566,7 +1575,10 @@
cfg->trunk.audio_send_name = 1;
cfg->trunk.omit_rtcp = 0;
mgcp_trunk_set_keepalive(>trunk, MGCP_KEEPALIVE_ONCE);
-   alloc_mgcp_rate_counters(>trunk, cfg);
+   if (alloc_mgcp_rate_counters(>trunk, cfg) < 0) {
+   talloc_free(cfg);
+   return NULL;
+   }

INIT_LLIST_HEAD(>trunks);


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: 

Change in osmo-mgw[master]: update .gitignore

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13915 )

Change subject: update .gitignore
..

update .gitignore

* remove tons of old cruft from openbsc.git that doesn't exist here
* actually add the osmo-mgw binary and .la file that we're building

Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0
---
M .gitignore
1 file changed, 2 insertions(+), 35 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/.gitignore b/.gitignore
index 1084181..900c09c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,20 +2,13 @@
 *.o
 *.lo
 *.a
+*.la
 .deps
 Makefile
 Makefile.in
 bscconfig.h
 bscconfig.h.in
-openbsc.pc
-src/osmo-nitb/osmo-nitb
-src/osmo-bsc_mgcp/osmo-bsc_mgcp
-src/osmo-bsc/osmo-bsc
-src/utils/meas_vis
-src/utils/meas_json
-src/utils/osmo-meas-pcap2db
-src/utils/osmo-meas-udp2db
-src/utils/smpp_mirror
+src/osmo-mgw/osmo-mgw
 *.*~
 *.sw?
 .libs
@@ -46,32 +39,9 @@
 .version


-# apps and app data
-hlr.sqlite3
-src/utils/bs11_config
-src/ipaccess/ipaccess-config
-src/ipaccess/abisip-find
-src/ipaccess/ipaccess-firmware
-src/ipaccess/ipaccess-proxy
-src/utils/isdnsync
-src/nat/bsc_nat
-src/gprs/osmo-sgsn
-src/gprs/osmo-gbproxy
-src/gprs/osmo-gtphub
-src/osmo-bsc_nat/osmo-bsc_nat
-src/libcommon/gsup_test_client
-src/osmo-msc/osmo-msc
-
 #tests
 tests/testsuite.dir
 tests/*/*_test
-# ignore compiled binaries like msc_vlr_test_foo; do not ignore
-# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object
-# files:
-tests/msc_vlr/msc_vlr_test_*
-!tests/msc_vlr/msc_vlr_test_*.*
-tests/msc_vlr/msc_vlr_test_*.o
-

 tests/atconfig
 tests/atlocal
@@ -79,10 +49,7 @@
 tests/testsuite
 tests/testsuite.log

-gsn_restart
-src/openbsc.cfg*
 writtenconfig/
-gtphub_restart_count

 # manuals
 doc/manuals/*.html

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0
Gerrit-Change-Number: 13915
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13562 )

Change subject: smpp: Make libsmpp34 use talloc for its allocations
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13562
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: Ie2725ffab6a225813e65768735f01678e2022128
Gerrit-Change-Number: 13562
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 22:13:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13562 )

Change subject: smpp: Make libsmpp34 use talloc for its allocations
..

smpp: Make libsmpp34 use talloc for its allocations

We are just introducing smpp34_set_memory_functions() in libsmpp34
to allow applications like OsmoMSC to provide their own heap allocator
callback functions.  Let's used this to integrate with talloc and
hence allow talloc tracking/debugging for libsmpp34 internal
allocations.

Depends: libsmpp34 Change-Id I3656117115e89638c093bfbcbc4369ce302f7a94
Change-Id: Ie2725ffab6a225813e65768735f01678e2022128
Related: OS#3913
---
M src/libmsc/smpp_openbsc.c
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index e6eb010..bbfc500 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -52,6 +53,31 @@
 #define VSUB_USE_SMPP "SMPP"
 #define VSUB_USE_SMPP_CMD "SMPP-cmd"

+/* talloc integration for libsmpp34 */
+
+static struct smsc *g_smsc;
+
+static void *smpp34_talloc_malloc(size_t sz)
+{
+   return talloc_size(g_smsc, sz);
+}
+
+static void *smpp34_talloc_realloc(void *ptr, size_t sz)
+{
+   return talloc_realloc_size(g_smsc, ptr, sz);
+}
+
+static void smpp34_talloc_free(void *ptr)
+{
+   talloc_free(ptr);
+}
+
+static const struct smpp34_memory_functions smpp34_talloc = {
+   .malloc_fun = smpp34_talloc_malloc,
+   .realloc_fun = smpp34_talloc_realloc,
+   .free_fun = smpp34_talloc_free,
+};
+
 /*! \brief find vlr_subscr for a given SMPP NPI/TON/Address */
 static struct vlr_subscr *subscr_by_dst(struct gsm_network *net,
uint8_t npi, uint8_t ton,
@@ -790,6 +816,7 @@
LOGP(DSMPP, LOGL_FATAL, "Cannot allocate smsc struct\n");
return -1;
}
+   smpp34_set_memory_functions(_talloc);
return smpp_vty_init();
 }


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2725ffab6a225813e65768735f01678e2022128
Gerrit-Change-Number: 13562
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes

2019-05-08 Thread Harald Welte
Hello Pau Espin Pedrol, Jenkins Builder, Mykola Shchetinin,

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

https://gerrit.osmocom.org/13901

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

Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes
..

Fix osmo_quote_str_c() for strings larger than 32 bytes

As Neels pointed out, we shouldn't pass a constant value of 32
to osmo_quote_str_buf2().

Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2
---
M src/utils.c
1 file changed, 13 insertions(+), 2 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2
Gerrit-Change-Number: 13901
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Mykola Shchetinin 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13901 )

Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13901/2/src/utils.c
File src/utils.c:

https://gerrit.osmocom.org/#/c/13901/2/src/utils.c@816
PS2, Line 816:  size_t len = in_len == -1 ? strlen(str) : in_len;
> You are still missing len +=3 afterwards. […]
Done



--
To view, visit https://gerrit.osmocom.org/13901
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: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2
Gerrit-Change-Number: 13901
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Mykola Shchetinin 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 22:12:28 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Hello Pau Espin Pedrol, Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/13913

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

Change subject: deal with rate_ctr_group_alloc() returning NULL
..

deal with rate_ctr_group_alloc() returning NULL

Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Related: #3701
---
M src/gb/gprs_bssgp.c
M src/gb/gprs_ns.c
2 files changed, 8 insertions(+), 0 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 4
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init()

2019-05-08 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13919

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

Change subject: Print error message if application fails to call rate_ctr_init()
..

Print error message if application fails to call rate_ctr_init()

Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd
Closes: OS#3580
---
M src/rate_ctr.c
1 file changed, 5 insertions(+), 2 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd
Gerrit-Change-Number: 13919
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length

2019-05-08 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13930


Change subject: SMPP: Don't accept password or system-id exceeding spec length
..

SMPP: Don't accept password or system-id exceeding spec length

The SMPP 3.4 specification defines the password field as a
"Variable-length octet string with maximum length of 9", and according
to table 3-1 this means including the terminating NUL-byte.

However, OsmoMSC allows to configure longer passwords in the ESME
configuration. Those passwords will then never match, as libsmpp34
performs length validation and generates a parser error for anyone
trying to send a longer password via SMPP.

The same applies for system-id, where we have to permit only 15
characters with zero termination, but not 16 characters.

Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354
Closes: OS#3166
---
M src/libmsc/smpp_smsc.h
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h
index 1c9eae6..b26d011 100644
--- a/src/libmsc/smpp_smsc.h
+++ b/src/libmsc/smpp_smsc.h
@@ -13,8 +13,8 @@
 #include 
 #include 

-#define SMPP_SYS_ID_LEN16
-#define SMPP_PASSWD_LEN16
+#define SMPP_SYS_ID_LEN15
+#define SMPP_PASSWD_LEN8

 #define MODE_7BIT  7
 #define MODE_8BIT  8

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354
Gerrit-Change-Number: 13930
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations

2019-05-08 Thread Harald Welte
Hello Vadim Yanitskiy, Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/13562

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

Change subject: smpp: Make libsmpp34 use talloc for its allocations
..

smpp: Make libsmpp34 use talloc for its allocations

We are just introducing smpp34_set_memory_functions() in libsmpp34
to allow applications like OsmoMSC to provide their own heap allocator
callback functions.  Let's used this to integrate with talloc and
hence allow talloc tracking/debugging for libsmpp34 internal
allocations.

Depends: libsmpp34 Change-Id I3656117115e89638c093bfbcbc4369ce302f7a94
Change-Id: Ie2725ffab6a225813e65768735f01678e2022128
Related: OS#3913
---
M src/libmsc/smpp_openbsc.c
1 file changed, 27 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie2725ffab6a225813e65768735f01678e2022128
Gerrit-Change-Number: 13562
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13617 )

Change subject: msc: add inter-BSC and inter-MSC Handover tests
..


Patch Set 5:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/13617
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: I7d76c982ad4e198534fa488609c41e8892b268ab
Gerrit-Change-Number: 13617
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Wed, 08 May 2019 19:23:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13137 )

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..

large refactoring: support inter-BSC and inter-MSC Handover

3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles:
- MSC-A is responsible for managing subscribers,
- MSC-I is the gateway to the RAN.
- MSC-T is a second transitory gateway to another RAN during Handover.

After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while
the original MSC-A retains the responsibility of subscriber management.

MSC-T exists in this patch but is not yet used, since Handover is only prepared
for, not yet implemented.

Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC
roles.

Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications:
- all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc
  instance,
- messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface
  (GSUP),
- no call routing between MSC-A and -I via MNCC necessary.

This is the largest code bomb I have submitted, ever. Out of principle, I
apologize to everyone trying to read this as a whole. Unfortunately, I see no
sense in trying to split this patch into smaller bits. It would be a huge
amount of work to introduce these changes in separate chunks, especially if
each should in turn be useful and pass all test suites. So, unfortunately, we
are stuck with this code bomb.

The following are some details and rationale for this rather huge refactoring:

* separate MSC subscriber management from ran_conn

struct ran_conn is reduced from the pivotal subscriber management entity it has
been so far to a mere storage for an SCCP connection ID and an MSC subscriber
reference.

The new pivotal subscriber management entity is struct msc_a -- struct msub
lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however
use msc_a, since MSC-A is where all the interesting stuff happens.

Before handover, msc_i is an FSM implementation that encodes to the local
ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM
implementation that instead forwards via/from GSUP. Same goes for the msc_a
struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the
msc_a->fi is an FSM implementation that merely forwards via/from GSUP.

* New SCCP implementation for RAN access

To be able to forward BSSAP and RANAP messages via the GSUP interface, the
individual message layers need to be cleanly separated. The IuCS implementation
used until now (iu_client from libosmo-ranap) did not provide this level of
separation, and needed a complete rewrite. It was trivial to implement this in
such a way that both BSSAP and RANAP can be handled by the same SCCP code,
hence the new SCCP-RAN layer also replaces BSSAP handling.

sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN
connections. A set of callback functions provides implementation specific
details.

* RAN Abstraction (BSSAP vs. RANAP)

The common SCCP implementation did set the theme for the remaining refactoring:
make all other MSC code paths entirely RAN-implementation-agnostic.

ran_infra.c provides data structures that list RAN implementation specifics,
from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra
pointer hence allows complete abstraction of RAN implementations:

- managing connected RAN peers (BSC, RNC) in ran_peer.c,
- classifying and de-/encoding RAN PDUs,
- recording connected LACs and cell IDs and sending out Paging requests to
  matching RAN peers.

* RAN RESET now also for RANAP

ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also
supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide
proper RESET handling, which it so far duly ignores. (TODO)

* RAN de-/encoding abstraction

The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP
implementations transparently, but also to be able to optionally handle RAN on
distinct levels. Before Handover, all RAN messages are handled by the MSC-A
role.  However, after an inter-MSC Handover, a standalone MSC-I will need to
decode RAN PDUs, at least in order to manage Assignment of RTP streams between
BSS/RNC and MNCC call forwarding.

ran_msg.h provides a common API with abstraction for:

- receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and
  MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP
  or RANAP;
- sending RAN events: ran_enc_msg is the counterpart to compose RAN messages
  that should be encoded to either BSSMAP or RANAP and passed down to the
  BSC/RNC and MS/UE.

The RAN-specific implementations are completely contained by ran_msg_a.c and
ran_msg_iu.c.

In particular, Assignment and Ciphering have so 

Change in osmo-msc[master]: GSUP: include terminating nul in inter-MSC source/destination name

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13612 )

Change subject: GSUP: include terminating nul in inter-MSC source/destination 
name
..

GSUP: include terminating nul in inter-MSC source/destination name

Before, I was testing with osmo-hlr patch
I01a45900e14d41bcd338f50ad85d9fabf2c61405 applied, but that patch is currently
in an abandoned state.

This is the counterpart implemented in osmo-msc: always include the terminating
nul char in the "blob" that is the MSC IPA name.

The dualities in the formats of routing between MSCs is whether to handle it as
a char*, or as a uint8_t* with explicit len (a blob).

In the VTY config to indicate target MSCs for inter-MSC handover, we have
strings. We currently even completely lack a way of configuring any blob-like
data as a VTY config item.

In osmo-hlr, the IPA names used for routing are currently received as a char*
which *includes* the terminating nul char. So in osmo-msc, if we also always
include the nul char, it works.

Instead, we could just send the char* part without the nul char, and apply
above mentioned osmo-hlr patch. That patch would magically match a name that
lacks a nul with a name that includes one. I think it is better to agree on one
format on the GSUP wire now, instead of making assumptions in osmo-hlr on the
format of the source/target names for routing. This format, from the way GSUP
so far transmits the IPA SERNO tag when a client attaches to osmo-hlr, happens
to include the terminating nul char.

Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb
---
M src/libmsc/e_link.c
1 file changed, 14 insertions(+), 7 deletions(-)

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



diff --git a/src/libmsc/e_link.c b/src/libmsc/e_link.c
index 685ca7c..0a2be79 100644
--- a/src/libmsc/e_link.c
+++ b/src/libmsc/e_link.c
@@ -68,6 +68,7 @@
 {
struct e_link *e;
struct msc_role_common *c = msc_role->priv;
+   size_t use_len;

/* use msub as talloc parent, so we can move an e_link from msc_t to 
msc_i when it is established. */
e = talloc_zero(c->msub, struct e_link);
@@ -76,13 +77,19 @@

e->gcm = gcm;

-   /* Expecting all code paths to print the remote name according to 
remote_name_len. To be paranoid, place a nul
-* character after the end. */
-   e->remote_name = talloc_size(e, remote_name_len + 1);
+   /* FIXME: this is a braindamaged duality of char* and blob, which we 
can't seem to get rid of easily.
+* See also osmo-hlr change I01a45900e14d41bcd338f50ad85d9fabf2c61405 
which resolved this on the
+* osmo-hlr side, but was abandoned. Not sure which way is the right 
solution. */
+   /* To be able to include a terminating NUL character when sending the 
IPA name, append one if there is none yet.
+* Current osmo-hlr needs the terminating NUL to be included. */
+   use_len = remote_name_len;
+   if (remote_name[use_len-1] != '\0')
+   use_len++;
+   e->remote_name = talloc_size(e, use_len);
OSMO_ASSERT(e->remote_name);
memcpy(e->remote_name, remote_name, remote_name_len);
-   e->remote_name[remote_name_len] = '\0';
-   e->remote_name_len = remote_name_len;
+   e->remote_name[use_len-1] = '\0';
+   e->remote_name_len = use_len;

e_link_assign(e, msc_role);
return e;
@@ -123,9 +130,9 @@
*gsup_msg = (struct osmo_gsup_message){
.message_class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC,
.source_name = (const uint8_t*)local_msc_name,
-   .source_name_len = strlen(local_msc_name),
+   .source_name_len = strlen(local_msc_name)+1, /* include 
terminating nul */
.destination_name = (const uint8_t*)e->remote_name,
-   .destination_name_len = e->remote_name_len,
+   .destination_name_len = e->remote_name_len, /* the nul here is 
also included, from e_link_alloc() */
};

if (vsub)

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb
Gerrit-Change-Number: 13612
Gerrit-PatchSet: 10
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-msc[master]: rename bscconfig.h to config.h, cleanup

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13138 )

Change subject: rename bscconfig.h to config.h, cleanup
..

rename bscconfig.h to config.h, cleanup

Get rid of the legacy name bscconfig.h from osmo-nitb times.

Remove the #include from some of the files that aren't actually using it.

Instead of '#include "../../config.h"', use plain '#include "config.h"'
because we're anyway passing $top_srcdir as -I during compilation.

Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec
---
M .gitignore
M configure.ac
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/msc_net_init.c
M src/libmsc/msc_vty.c
M src/libmsc/ran_infra.c
M src/osmo-msc/msc_main.c
10 files changed, 9 insertions(+), 13 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 78974d7..bcd6847 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,8 +5,8 @@
 .deps
 Makefile
 Makefile.in
-bscconfig.h
-bscconfig.h.in
+config.h
+config.h.in
 *.pc

 *.*~
diff --git a/configure.ac b/configure.ac
index ae6dd6a..36ff99e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,7 +237,7 @@
 AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])

 dnl Generate the output
-AM_CONFIG_HEADER(bscconfig.h)
+AM_CONFIG_HEADER(config.h)

 AC_OUTPUT(
 include/Makefile
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 667a1c6..79488cd 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -32,7 +32,7 @@
 #include 
 #include 

-#include "bscconfig.h"
+#include "config.h"

 #include 
 #include 
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index aa97649..0624d56 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -30,8 +30,6 @@
 #include 
 #include 

-#include "bscconfig.h"
-
 #include 
 #include 
 #include 
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 60cdaee..ff5576f 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -33,7 +33,7 @@
 #include 
 #include 

-#include "bscconfig.h"
+#include "config.h"

 #include 
 #include 
diff --git a/src/libmsc/gsm_04_14.c b/src/libmsc/gsm_04_14.c
index 044b61c..8116558 100644
--- a/src/libmsc/gsm_04_14.c
+++ b/src/libmsc/gsm_04_14.c
@@ -24,8 +24,6 @@
 #include 
 #include 

-#include "bscconfig.h"
-
 #include 
 #include 
 #include 
diff --git a/src/libmsc/msc_net_init.c b/src/libmsc/msc_net_init.c
index 51e8595..637ee74 100644
--- a/src/libmsc/msc_net_init.c
+++ b/src/libmsc/msc_net_init.c
@@ -21,7 +21,7 @@
  *
  */

-#include "bscconfig.h"
+#include "config.h"

 #include 

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index bb36392..a3237cd 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -23,7 +23,7 @@
 /* NOTE: I would have liked to call this the MSC_NODE instead of the MSC_NODE,
  * but MSC_NODE already exists to configure a remote MSC for osmo-bsc. */

-#include "../../bscconfig.h"
+#include "config.h"

 #include 
 #include 
diff --git a/src/libmsc/ran_infra.c b/src/libmsc/ran_infra.c
index a3a7457..af40541 100644
--- a/src/libmsc/ran_infra.c
+++ b/src/libmsc/ran_infra.c
@@ -31,7 +31,7 @@

 #include 

-#include "bscconfig.h"
+#include "config.h"

 const struct value_string an_proto_names[] = {
{ OSMO_GSUP_ACCESS_NETWORK_PROTOCOL_TS3G_48006, "Ts3G-48006" },
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 857a6a6..e101d89 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -36,7 +36,7 @@
 #include 

 /* build switches from the configure script */
-#include "../../bscconfig.h"
+#include "config.h"

 #include 
 #include 

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec
Gerrit-Change-Number: 13138
Gerrit-PatchSet: 16
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Max 


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13137 )

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..


Patch Set 20: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13137
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: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 20
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 18:43:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx

2019-05-08 Thread Harald Welte
Harald Welte has uploaded a new patch set (#2) to the change originally created 
by Keith Whyte. ( https://gerrit.osmocom.org/13929 )

Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx
..

libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx

On receipt of DELETE PDP CTX CONF, don't call
sgsn_pdp_ctx_free() if we don't have an MM context.

Related: OS#3956
Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def
---
M src/gprs/sgsn_libgtp.c
1 file changed, 1 insertion(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def
Gerrit-Change-Number: 13929
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: lynxis lazus 


Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap

2019-05-08 Thread Pau Espin Pedrol
Hello Harald Welte, Jenkins Builder, Holger Freyther,

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

https://gerrit.osmocom.org/13843

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

Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap
..

nat: Allocate bsc_nat_parsed on the stack instead of heap

There's no real need to allocate it using talloc. Allocating it on the
stack simplifies the code, avoids mem leaks and makes it faster.

Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba
---
M openbsc/include/openbsc/bsc_nat.h
M openbsc/src/osmo-bsc_nat/bsc_filter.c
M openbsc/src/osmo-bsc_nat/bsc_nat.c
M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
M openbsc/src/osmo-bsc_nat/bsc_ussd.c
M openbsc/tests/bsc-nat/bsc_nat_test.c
6 files changed, 134 insertions(+), 172 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/4
--
To view, visit https://gerrit.osmocom.org/13843
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: I66c44890952339f15131081e2f629a2824b6d3ba
Gerrit-Change-Number: 13843
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx

2019-05-08 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/13929 )

Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx
..


Patch Set 1: Code-Review-1

see OS#3956

I don't know if this would deal with the issue, or if there's a reason to call 
sgsn_pdp_ctx_free() anyway, even if !pctx->mm

There's also a talloc_free(pdp) in sgsn_pdp_ctx_free() and I'm not sure if 
skipping that is a leak.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def
Gerrit-Change-Number: 13929
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 17:50:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx

2019-05-08 Thread Keith Whyte
Keith Whyte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13929


Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx
..

libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx

On receipt of DELETE PDP CTX CONF, don't call
sgsn_pdp_ctx_free() if we don't have an MM context.

Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def
---
M src/gprs/sgsn_libgtp.c
1 file changed, 1 insertion(+), 2 deletions(-)



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

diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index a8a1502..582f420 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -565,14 +565,13 @@

/* Confirm deactivation of PDP context to MS */
rc = gsm48_tx_gsm_deact_pdp_acc(pctx);
+   sgsn_pdp_ctx_free(pctx);
} else {
LOGPDPCTXP(LOGL_NOTICE, pctx,
   "Not deactivating SNDCP layer since the MM context "
   "is not available\n");
}

-   sgsn_pdp_ctx_free(pctx);
-
return rc;
 }


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def
Gerrit-Change-Number: 13929
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 


Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13919 )

Change subject: Print error message if application fails to call rate_ctr_init()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c
File src/rate_ctr.c:

https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c@220
PS1, Line 220:  if (!osmo_timer_pending(_ctr_timer))
> I think you ended up putting some stuff from this patch into the previous one.
no, the patch is "correct" in the sense that it does what it's supposed to do, 
IMHO ?1?



--
To view, visit https://gerrit.osmocom.org/13919
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: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd
Gerrit-Change-Number: 13919
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 17:27:10 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: bssap: Parse Osmux CID on ASSIG REQ recv

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13925


Change subject: bssap: Parse Osmux CID on ASSIG REQ recv
..

bssap: Parse Osmux CID on ASSIG REQ recv

Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 31 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index dc686c3..68c95e1 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 

 #define GSM_T3122_DEFAULT 10

@@ -120,6 +121,8 @@

char msc_rtp_addr[INET_ADDRSTRLEN];
uint16_t msc_rtp_port;
+   bool use_osmux;
+   uint8_t osmux_cid;

/* Rate/codec setting in preference order (need at least 1 !) */
int n_ch_mode_rate;
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 014a9b8..9bbd5e4 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -780,6 +780,8 @@
struct tlv_parsed tp;
uint16_t cic = 0;
bool aoip = false;
+   bool use_osmux = false;
+   uint8_t osmux_cid = 0;
struct sockaddr_storage rtp_addr;
struct gsm0808_channel_type ct;
uint8_t cause;
@@ -857,6 +859,30 @@
goto reject;
}

+   if (TLVP_PRESENT(, GSM0808_IE_OSMO_OSMUX_CID)) {
+   if (conn->sccp.msc->use_osmux == OSMUX_USAGE_OFF) {
+   LOGP(DMSC, LOGL_ERROR, "MSC using Osmux but we 
have it disabled.\n");
+   cause = GSM0808_CAUSE_INCORRECT_VALUE;
+   goto reject;
+   }
+   use_osmux = true;
+   rc = gsm0808_dec_osmux_cid(_cid,
+  TLVP_VAL(, 
GSM0808_IE_OSMO_OSMUX_CID),
+  TLVP_LEN(, 
GSM0808_IE_OSMO_OSMUX_CID));
+   if (rc < 0) {
+   LOGP(DMSC, LOGL_ERROR, "Unable to decode Osmux 
CID.\n");
+   cause = GSM0808_CAUSE_INCORRECT_VALUE;
+   goto reject;
+   }
+   } else {
+   if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ONLY) {
+   LOGP(DMSC, LOGL_ERROR, "MSC not using Osmux but 
we are forced to use it.\n");
+   cause = GSM0808_CAUSE_INCORRECT_VALUE;
+   goto reject;
+   } else if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ON)
+   LOGP(DMSC, LOGL_NOTICE, "MSC not using Osmux 
but we have Osmux enabled.\n");
+   }
+
/* Decode speech codec list. First set len = 0. */
conn->codec_list = (struct gsm0808_speech_codec_list){};
/* Check for speech codec list element */
@@ -882,6 +908,8 @@
req = (struct assignment_request){
.aoip = aoip,
.msc_assigned_cic = cic,
+   .use_osmux = use_osmux,
+   .osmux_cid = osmux_cid,
};
 
/* Match codec information from the assignment command against 
the

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e
Gerrit-Change-Number: 13925
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13923


Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv
..

bssap: Detect MSC Osmux support on RESET (ACK) recv

Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 29 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 271bdd4..4720845 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -133,6 +133,8 @@

/* Whether we want to use Osmux against this MSC. Controlled via VTY */
enum osmux_usage use_osmux;
+   /* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */
+   bool remote_supports_osmux;
 };

 /*
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index e79a344..014a9b8 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -51,6 +51,29 @@
  * helpers for the assignment command
  */

+/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET 
to
+ * announce Osmux support */
+static void update_msc_osmux_support(struct bsc_msc_data *msc,
+  struct msgb *msg, unsigned int length)
+{
+   struct tlv_parsed tp;
+   int rc;
+   bool old_value = msc->remote_supports_osmux;
+   /*TODO tlv_parse, check for GSM0808_IE_OSMO_OSMUX_CID existance. If 
present, set */
+   rc = tlv_parse(, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 
0);
+   if (rc < 0)
+   LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux 
support\n");
+
+   if (TLVP_PRESENT(, GSM0808_IE_OSMO_OSMUX_SUPPORT)) {
+   msc->remote_supports_osmux = true;
+   } else {
+   msc->remote_supports_osmux = false;
+   }
+
+   if (old_value != msc->remote_supports_osmux)
+   LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: 
%d->%d\n",
+old_value,  msc->remote_supports_osmux);
+}

 static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
   struct msgb *msg, unsigned int length)
@@ -63,6 +86,8 @@
 * that we have successfully received the reset-ack message */
a_reset_ack_confirm(msc);

+   update_msc_osmux_support(msc, msg, length);
+
return 0;
 }

@@ -81,6 +106,8 @@
/* Drop all ongoing paging requests that this MSC has created on any 
BTS */
paging_flush_network(msc->network, msc);

+   update_msc_osmux_support(msc, msg, length);
+
/* Inform the MSC that we have received the reset request and
 * that we acted accordingly */
osmo_bsc_sigtran_tx_reset_ack(msc);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
Gerrit-Change-Number: 13923
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13927


Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW
..

bssap: Feed Assign Complete with Osmux CID retrieved from MGW

Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2
---
M src/osmo-bsc/assignment_fsm.c
1 file changed, 24 insertions(+), 2 deletions(-)



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

diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 834b58b..aefa4af 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -128,6 +128,13 @@
}
 }

+static void _gsm0808_ass_compl_extend_osmux(struct msgb *msg, uint8_t cid)
+{
+   OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */
+   msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid);
+   msg->l3h[1] = msgb_l3len(msg) - 2;
+}
+
 static void send_assignment_complete(struct gsm_subscriber_connection *conn)
 {
int rc;
@@ -135,6 +142,7 @@
struct gsm0808_speech_codec *sc_ptr = NULL;
struct sockaddr_storage addr_local;
struct sockaddr_storage *addr_local_p = NULL;
+   uint8_t osmux_cid = 0;
int perm_spch = 0;
uint8_t chosen_channel;
struct msgb *resp;
@@ -164,6 +172,15 @@
addr_local_p = _local;
}

+   if (gscon_is_aoip(conn) && conn->assignment.req.use_osmux) {
+   if 
(!osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc,
+
_cid)) {
+   assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE,
+   "Unable to compose Osmux CID of 
MGW -> MSC");
+   return;
+   }
+   }
+
/* Only AoIP networks include a speech codec (choosen) in the
 * assignment complete message. */
if (gscon_is_aoip(conn)) {
@@ -185,6 +202,10 @@
return;
}

+   if (gscon_is_aoip(conn) && conn->assignment.requires_voice_stream &&
+   conn->assignment.req.use_osmux)
+   _gsm0808_ass_compl_extend_osmux(resp, osmux_cid);
+
rc = gscon_sigtran_send(conn, resp);
if (rc) {
assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE,
@@ -466,10 +487,11 @@

assignment_fsm_update_id(conn);
LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, 
chan_type=%s,"
-  " aoip=%s MSC-rtp=%s:%u\n",
+  " aoip=%s MSC-rtp=%s:%u (osmux=%s)\n",
   
gsm48_chan_mode_name(conn->lchan->ch_mode_rate.chan_mode),
   rate_names[conn->lchan->ch_mode_rate.chan_rate],
-  req->aoip ? "yes" : "no", req->msc_rtp_addr, 
req->msc_rtp_port);
+  req->aoip ? "yes" : "no", req->msc_rtp_addr, 
req->msc_rtp_port,
+  req->use_osmux ? "yes" : "no");

assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE);
info = (struct lchan_activate_info){

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2
Gerrit-Change-Number: 13927
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bssap: Announce Osmux support on RESET (ACK) send

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13924


Change subject: bssap: Announce Osmux support on RESET (ACK) send
..

bssap: Announce Osmux support on RESET (ACK) send

Change-Id: I6b5b475b6109a2882051445762e27046d015b770
---
M src/osmo-bsc/osmo_bsc_sigtran.c
1 file changed, 16 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index f2a6d08..5d61c32 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -82,6 +82,14 @@
return -1;
 }

+/* Patch regular BSSMAP RESET to add extra T to announce Osmux support 
(osmocom extension) */
+static void _gsm0808_extend_announce_osmux(struct msgb *msg)
+{
+   OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */
+   msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT);
+   msg->l3h[1] = msgb_l3len(msg) - 2;
+}
+
 /* Send reset to MSC */
 static void osmo_bsc_sigtran_tx_reset(const struct bsc_msc_data *msc)
 {
@@ -92,6 +100,10 @@
OSMO_ASSERT(ss7);
LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC: %s\n", 
osmo_sccp_addr_name(ss7, >a.msc_addr));
msg = gsm0808_create_reset();
+
+   if (msc->use_osmux != OSMUX_USAGE_OFF)
+   _gsm0808_extend_announce_osmux(msg);
+
osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, >a.bsc_addr,
  >a.msc_addr, msg);
 }
@@ -107,6 +119,10 @@
OSMO_ASSERT(ss7);
LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC: %s\n", 
osmo_sccp_addr_name(ss7, >a.msc_addr));
msg = gsm0808_create_reset_ack();
+
+   if (msc->use_osmux != OSMUX_USAGE_OFF)
+   _gsm0808_extend_announce_osmux(msg);
+
osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, >a.bsc_addr,
  >a.msc_addr, msg);
 }

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b5b475b6109a2882051445762e27046d015b770
Gerrit-Change-Number: 13924
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: Ask mgw to use osmux when requested by MSC

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13926


Change subject: Ask mgw to use osmux when requested by MSC
..

Ask mgw to use osmux when requested by MSC

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



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

diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index f944431..3fc9a5c 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -460,11 +460,13 @@
 struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct 
gsm_subscriber_connection *conn,
uint16_t msc_assigned_cic)
 {
+   const char* name;
if (conn->user_plane.mgw_endpoint)
return conn->user_plane.mgw_endpoint;

if (gscon_is_sccplite(conn)) {
/* derive endpoint name from CIC on A interface side */
+   /* TODO: implement osmux for SCCPlite */
conn->user_plane.mgw_endpoint =
osmo_mgcpc_ep_alloc(conn->fi, 
GSCON_EV_FORGET_MGW_ENDPOINT,
conn->network->mgw.client,
@@ -477,12 +479,16 @@

} else if (gscon_is_aoip(conn)) {
/* use dynamic RTPBRIDGE endpoint allocation in MGW */
+   //if (conn->assignment.req.use_osmux)
+   //  name = 
mgcp_client_osmuxbridge_wildcard(conn->network->mgw.client);
+   //else
+   name = 
mgcp_client_rtpbridge_wildcard(conn->network->mgw.client);
conn->user_plane.mgw_endpoint =
osmo_mgcpc_ep_alloc(conn->fi, 
GSCON_EV_FORGET_MGW_ENDPOINT,
conn->network->mgw.client,
conn->network->mgw.tdefs,
conn->fi->id,
-   "%s", 
mgcp_client_rtpbridge_wildcard(conn->network->mgw.client));
+   "%s", name);
} else {
LOGPFSML(conn->fi, LOGL_ERROR, "Conn is neither SCCPlite nor 
AoIP!?\n");
return NULL;
@@ -519,6 +525,8 @@
.port = port,
.call_id = conn->sccp.conn_id,
.ptime = 20,
+   .x_osmo_osmux_use = conn->assignment.req.use_osmux,
+   .x_osmo_osmux_cid = conn->assignment.req.osmux_cid,
};
mgcp_pick_codec(_info, for_lchan, false);


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4156a4e2fb7ce1b896779b50e4d3481281b43e55
Gerrit-Change-Number: 13926
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: TEST

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13928


Change subject: TEST
..

TEST

Change-Id: I43f2d99a91563240e7dd9c02d3e97be68c7e82f6
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 6 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 9bbd5e4..a43a7e9 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -883,6 +883,12 @@
LOGP(DMSC, LOGL_NOTICE, "MSC not using Osmux 
but we have Osmux enabled.\n");
}

+   /* HACK TO TEST OSMUX */
+   //static int next_osmux_cid_test = 3;
+   //use_osmux = true;
+   //osmux_cid = next_osmux_cid_test;
+   //next_osmux_cid_test++;
+
/* Decode speech codec list. First set len = 0. */
conn->codec_list = (struct gsm0808_speech_codec_list){};
/* Check for speech codec list element */

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I43f2d99a91563240e7dd9c02d3e97be68c7e82f6
Gerrit-Change-Number: 13928
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13922


Change subject: vty: Add option to enable osmux towards MSC
..

vty: Add option to enable osmux towards MSC

Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74
---
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/bsc_msc_data.h
A include/osmocom/bsc/osmux.h
M src/osmo-bsc/osmo_bsc_vty.c
4 files changed, 36 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 89323c0..f44e7fc 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -41,6 +41,7 @@
osmo_bsc_rf.h \
osmo_bsc_sigtran.h \
bsc_msc_data.h \
+   osmux.h \
paging.h \
pcu_if.h \
pcuif_proto.h \
diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index debd240..271bdd4 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -30,6 +30,7 @@

 #include "debug.h"
 #include "osmo_bsc_lcls.h"
+#include "osmux.h"

 #include 
 #include 
@@ -129,6 +130,9 @@
 
uint32_t x_osmo_ign;
bool x_osmo_ign_configured;
+
+   /* Whether we want to use Osmux against this MSC. Controlled via VTY */
+   enum osmux_usage use_osmux;
 };

 /*
diff --git a/include/osmocom/bsc/osmux.h b/include/osmocom/bsc/osmux.h
new file mode 100644
index 000..aa3d1ab
--- /dev/null
+++ b/include/osmocom/bsc/osmux.h
@@ -0,0 +1,7 @@
+#pragma once
+
+enum osmux_usage {
+   OSMUX_USAGE_OFF = 0,
+   OSMUX_USAGE_ON = 1,
+   OSMUX_USAGE_ONLY = 2,
+};
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 78196cf..4591ad1 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -197,6 +198,11 @@
else
vty_out(vty, " mgw x-osmo-ign call-id%s", VTY_NEWLINE);
}
+
+   if (msc->use_osmux != OSMUX_USAGE_OFF) {
+   vty_out(vty, " osmux %s%s", msc->use_osmux == OSMUX_USAGE_ON ? 
"on" : "only",
+   VTY_NEWLINE);
+   }
 }

 static int config_write_msc(struct vty *vty)
@@ -708,6 +714,23 @@
return CMD_SUCCESS;
 }

+#define OSMUX_STR "RTP multiplexing\n"
+DEFUN(cfg_msc_osmux,
+  cfg_msc_osmux_cmd,
+  "osmux (on|off|only)",
+   OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n")
+{
+   struct bsc_msc_data *msc = bsc_msc_data(vty);
+   if (strcmp(argv[0], "off") == 0)
+   msc->use_osmux = OSMUX_USAGE_OFF;
+   else if (strcmp(argv[0], "on") == 0)
+   msc->use_osmux = OSMUX_USAGE_ON;
+   else if (strcmp(argv[0], "only") == 0)
+   msc->use_osmux = OSMUX_USAGE_ONLY;
+
+   return CMD_SUCCESS;
+}
+
 DEFUN(cfg_net_bsc_mid_call_text,
   cfg_net_bsc_mid_call_text_cmd,
   "mid-call-text .TEXT",
@@ -1045,6 +1068,7 @@
mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf);
install_element(MSC_NODE, _msc_mgw_x_osmo_ign_cmd);
install_element(MSC_NODE, _msc_no_mgw_x_osmo_ign_cmd);
+   install_element(MSC_NODE, _msc_osmux_cmd);

return 0;
 }

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74
Gerrit-Change-Number: 13922
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[pespin/release-1.4.1]: Bump version: 1.4.0.1-1f6930 → 1.4.1

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13910 )

Change subject: Bump version: 1.4.0.1-1f6930 → 1.4.1
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: pespin/release-1.4.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e
Gerrit-Change-Number: 13910
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 16:45:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[pespin/release-1.4.1]: Bump version: 1.4.0.1-1f6930 → 1.4.1

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13910 )

Change subject: Bump version: 1.4.0.1-1f6930 → 1.4.1
..

Bump version: 1.4.0.1-1f6930 → 1.4.1

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

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index a4f4d40..22410f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osmo-bsc (1.4.1) unstable; urgency=medium
+
+  [ Philipp Maier ]
+  * handover_fsm: copy old S15_S0 to new lchan
+
+ -- Pau Espin Pedrol   Wed, 08 May 2019 13:36:53 +0200
+
 osmo-bsc (1.4.0) unstable; urgency=medium

   [ Neels Hofmeyr ]

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: pespin/release-1.4.1
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e
Gerrit-Change-Number: 13910
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[pespin/release-1.4.1]: handover_fsm: copy old S15_S0 to new lchan

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13909 )

Change subject: handover_fsm: copy old S15_S0 to new lchan
..

handover_fsm: copy old S15_S0 to new lchan

When a new lchan is selected during handover, some of the properties of
the old lchan are inherited by the new lchan. At the moment S15-S0 is
not not inherited so that the value for those bits will always be 0x
for the new lchan. Since those bits also define the active set AMR codec
the channel activation will fail because 0x is invalid (active set
with zero rates)

Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2
Related: OS#3503
---
M src/osmo-bsc/handover_fsm.c
M tests/handover/handover_test.c
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 35f2e55..68c3e4a 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -362,6 +362,7 @@
.msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic,
.re_use_mgw_endpoint_from_lchan = conn->lchan,
.wait_before_switching_rtp = true,
+   .s15_s0 = conn->lchan->activate.info.s15_s0,
};

lchan_activate(ho->new_lchan, );
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 6217ca3..cd3b749 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -276,9 +276,10 @@
lchan->tch_mode = GSM48_CMODE_SPEECH_V1;
else if (!strcasecmp(codec, "EFR") && full_rate)
lchan->tch_mode = GSM48_CMODE_SPEECH_EFR;
-   else if (!strcasecmp(codec, "AMR"))
+   else if (!strcasecmp(codec, "AMR")) {
lchan->tch_mode = GSM48_CMODE_SPEECH_AMR;
-   else {
+   lchan->activate.info.s15_s0 = 0x0002;
+   } else {
printf("Given codec unknown\n");
exit(EXIT_FAILURE);
}

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: pespin/release-1.4.1
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2
Gerrit-Change-Number: 13909
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[pespin/release-1.4.1]: handover_fsm: copy old S15_S0 to new lchan

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13909 )

Change subject: handover_fsm: copy old S15_S0 to new lchan
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: pespin/release-1.4.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2
Gerrit-Change-Number: 13909
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 16:45:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13917 )

Change subject: osmux: Document func and return different rc upon osmux init 
failure
..

osmux: Document func and return different rc upon osmux init failure

Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index bfb88bc..3a4e396 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -671,12 +671,17 @@
rtp->codec->frame_duration_den;
 }

+/*! Initializes osmux socket if not yet initialized. Parses Osmux CID from 
MGCP line.
+ *  \param[in] endp Endpoint willing to initialize osmux
+ *  \param[in] line Line X-Osmux from MGCP header msg to parse
+ *  \returns OSMUX CID, -1 for wildcard, -2 on parse error, -3 on osmux 
initalize error
+ */
 static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line)
 {
if (!endp->cfg->osmux_init) {
if (osmux_init(OSMUX_ROLE_BSC, endp->cfg) < 0) {
LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init 
OSMUX\n");
-   return -1;
+   return -3;
}
LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "OSMUX socket has been set 
up\n");
}

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e
Gerrit-Change-Number: 13917
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init()

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13919 )

Change subject: Print error message if application fails to call rate_ctr_init()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c
File src/rate_ctr.c:

https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c@220
PS1, Line 220:  if (!osmo_timer_pending(_ctr_timer))
I think you ended up putting some stuff from this patch into the previous one.



--
To view, visit https://gerrit.osmocom.org/13919
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: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd
Gerrit-Change-Number: 13919
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 16:31:50 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/13913/3/src/rate_ctr.c
File src/rate_ctr.c:

https://gerrit.osmocom.org/#/c/13913/3/src/rate_ctr.c@72
PS3, Line 72: static struct osmo_timer_list rate_ctr_timer;
This change is again not related?



--
To view, visit https://gerrit.osmocom.org/13913
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: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 16:31:22 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13711 )

Change subject: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13711/2/src/db.h
File src/db.h:

https://gerrit.osmocom.org/#/c/13711/2/src/db.h@121
PS2, Line 121: int nam_cs, int nam_ps
> Alternatively, we could have a bitmask here, so we would be able to extend it 
> later on. […]
a bitmask makes a lot of sense. Possibly even some larger 'struct' that we can 
later extend with all the various supplementary service subscriptions or 
whatever else the subscriber might be created with.

Please note this comment is *only* relevant to the internal subscriber API.  we 
must not use a bitmask for e.g. the VTY command, as there are ever only going 
to be a CS and a PS domain, there are no other domains.

Any other subscription informaiton (e.g. whether or not to permit 2g, 3g or 4G 
ran, whether to permit SMS, MO-Calls, etc. are orthogonal to the NAM which only 
exists for PS and CS.



--
To view, visit https://gerrit.osmocom.org/13711
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: I1a6dd85387723dab5487c53b33d2d9ec6d05d006
Gerrit-Change-Number: 13711
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 16:30:12 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u()

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13887 )

Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u()
..


Patch Set 1: Code-Review+2

Thanks for the explanation.


--
To view, visit https://gerrit.osmocom.org/13887
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: I6cc567798e20365e6587e6b2988e834306d8c80c
Gerrit-Change-Number: 13887
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 16:28:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old o...

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13912 )

Change subject: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with 
old osmo-bsc
..

mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc

Recent commit moved mgw_endpoint_fsm from osmo-bsc.git here as
osmo_mgcpc_ep_fsm. Some API name changes were applied to avoid
collisions, but FSM was kept and it is registered during startup with
__attribute__((constructor)). As a result, with old osmo-bsc (+tests)
try to allocate its copy of mgw_endpoint_fsm, it fails because that name
is already registered.

Fixes: 538d2c53d90074267e7a70a90c773baa03d6ec04
Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a
---
M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 
b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
index 0e59f58..a9bab87 100644
--- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
@@ -862,7 +862,7 @@
 }

 static struct osmo_fsm osmo_mgcpc_ep_fsm = {
-   .name = "mgw-endpoint",
+   .name = "mgw-endp",
.states = osmo_mgcpc_ep_fsm_states,
.num_states = ARRAY_SIZE(osmo_mgcpc_ep_fsm_states),
.log_subsys = DLMGCP,

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a
Gerrit-Change-Number: 13912
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13921 )

Change subject: bankd: Don't read CSV file until _after_ handling options
..

bankd: Don't read CSV file until _after_ handling options

Otherwise "--help" won't work if the CSV cannot be found/read.

Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
---
M src/bankd/bankd_main.c
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index 8ac5909..268794b 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -91,11 +91,7 @@
OSMO_STRLCPY_ARRAY(bankd->comp_id.sw_version, PACKAGE_VERSION);
/* FIXME: other members of app_comp_id */

-   /* Np lock or mutex required for the pcsc_slot_names list, as this is 
only
-* read once during bankd initialization, when the worker threads 
haven't
-* started yet */
INIT_LLIST_HEAD(>pcsc_slot_names);
-   OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 
0);
 }

 /* create + start a new bankd_worker thread */
@@ -309,6 +305,11 @@
signal(SIGMAPDEL, handle_sig_mapdel);
signal(SIGUSR1, handle_sig_usr1);

+   /* Np lock or mutex required for the pcsc_slot_names list, as this is 
only
+* read once during bankd initialization, when the worker threads 
haven't
+* started yet */
+   OSMO_ASSERT(bankd_pcsc_read_slotnames(g_bankd, "bankd_pcsc_slots.csv") 
== 0);
+
/* Connection towards remsim-server */
rc = server_conn_fsm_alloc(g_bankd, srvc);
if (rc < 0) {

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
Gerrit-Change-Number: 13921
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13920 )

Change subject: doc: REST API url is /banks, not /bankds
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0
Gerrit-Change-Number: 13920
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 15:28:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13920 )

Change subject: doc: REST API url is /banks, not /bankds
..

doc: REST API url is /banks, not /bankds

The documentation didn't agree with the code. Let's fix it

Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0
Closes: OS#3963
---
M doc/manuals/chapters/remsim-server.adoc
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/doc/manuals/chapters/remsim-server.adoc 
b/doc/manuals/chapters/remsim-server.adoc
index e5ab58d..01d24b2 100644
--- a/doc/manuals/chapters/remsim-server.adoc
+++ b/doc/manuals/chapters/remsim-server.adoc
@@ -40,14 +40,14 @@

 No other HTTP operation is implemented.

- /api/backend/v1/bankds
+ /api/backend/v1/banks

 *GET* obtains a JSON list where each element represents one currently
 connected `osmo-remsim-bankd`.

 No other HTTP operation is implemented.

- /api/backend/v1/bankds/:bank_id
+ /api/backend/v1/banks/:bank_id

 *GET* obtains a single JSON object representing one specific currently
 connected `osmo-remsim-bankd`.

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0
Gerrit-Change-Number: 13920
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13921 )

Change subject: bankd: Don't read CSV file until _after_ handling options
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
Gerrit-Change-Number: 13921
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 15:28:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13137 )

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..


Patch Set 20:

(1 comment)

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c@156
PS9, Line 156: DEBUGP
> And I would rather share the work load :P
https://osmocom.org/issues/3988



--
To view, visit https://gerrit.osmocom.org/13137
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: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 20
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 15:26:51 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds

2019-05-08 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13920


Change subject: doc: REST API url is /banks, not /bankds
..

doc: REST API url is /banks, not /bankds

The documentation didn't agree with the code. Let's fix it

Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0
Closes: OS#3963
---
M doc/manuals/chapters/remsim-server.adoc
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/20/13920/1

diff --git a/doc/manuals/chapters/remsim-server.adoc 
b/doc/manuals/chapters/remsim-server.adoc
index e5ab58d..01d24b2 100644
--- a/doc/manuals/chapters/remsim-server.adoc
+++ b/doc/manuals/chapters/remsim-server.adoc
@@ -40,14 +40,14 @@

 No other HTTP operation is implemented.

- /api/backend/v1/bankds
+ /api/backend/v1/banks

 *GET* obtains a JSON list where each element represents one currently
 connected `osmo-remsim-bankd`.

 No other HTTP operation is implemented.

- /api/backend/v1/bankds/:bank_id
+ /api/backend/v1/banks/:bank_id

 *GET* obtains a single JSON object representing one specific currently
 connected `osmo-remsim-bankd`.

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0
Gerrit-Change-Number: 13920
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options

2019-05-08 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13921


Change subject: bankd: Don't read CSV file until _after_ handling options
..

bankd: Don't read CSV file until _after_ handling options

Otherwise "--help" won't work if the CSV cannot be found/read.

Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
---
M src/bankd/bankd_main.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/21/13921/1

diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index 8ac5909..268794b 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -91,11 +91,7 @@
OSMO_STRLCPY_ARRAY(bankd->comp_id.sw_version, PACKAGE_VERSION);
/* FIXME: other members of app_comp_id */

-   /* Np lock or mutex required for the pcsc_slot_names list, as this is 
only
-* read once during bankd initialization, when the worker threads 
haven't
-* started yet */
INIT_LLIST_HEAD(>pcsc_slot_names);
-   OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 
0);
 }

 /* create + start a new bankd_worker thread */
@@ -309,6 +305,11 @@
signal(SIGMAPDEL, handle_sig_mapdel);
signal(SIGUSR1, handle_sig_usr1);

+   /* Np lock or mutex required for the pcsc_slot_names list, as this is 
only
+* read once during bankd initialization, when the worker threads 
haven't
+* started yet */
+   OSMO_ASSERT(bankd_pcsc_read_slotnames(g_bankd, "bankd_pcsc_slots.csv") 
== 0);
+
/* Connection towards remsim-server */
rc = server_conn_fsm_alloc(g_bankd, srvc);
if (rc < 0) {

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d
Gerrit-Change-Number: 13921
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13137

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

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..

large refactoring: support inter-BSC and inter-MSC Handover

3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles:
- MSC-A is responsible for managing subscribers,
- MSC-I is the gateway to the RAN.
- MSC-T is a second transitory gateway to another RAN during Handover.

After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while
the original MSC-A retains the responsibility of subscriber management.

MSC-T exists in this patch but is not yet used, since Handover is only prepared
for, not yet implemented.

Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC
roles.

Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications:
- all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc
  instance,
- messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface
  (GSUP),
- no call routing between MSC-A and -I via MNCC necessary.

This is the largest code bomb I have submitted, ever. Out of principle, I
apologize to everyone trying to read this as a whole. Unfortunately, I see no
sense in trying to split this patch into smaller bits. It would be a huge
amount of work to introduce these changes in separate chunks, especially if
each should in turn be useful and pass all test suites. So, unfortunately, we
are stuck with this code bomb.

The following are some details and rationale for this rather huge refactoring:

* separate MSC subscriber management from ran_conn

struct ran_conn is reduced from the pivotal subscriber management entity it has
been so far to a mere storage for an SCCP connection ID and an MSC subscriber
reference.

The new pivotal subscriber management entity is struct msc_a -- struct msub
lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however
use msc_a, since MSC-A is where all the interesting stuff happens.

Before handover, msc_i is an FSM implementation that encodes to the local
ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM
implementation that instead forwards via/from GSUP. Same goes for the msc_a
struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the
msc_a->fi is an FSM implementation that merely forwards via/from GSUP.

* New SCCP implementation for RAN access

To be able to forward BSSAP and RANAP messages via the GSUP interface, the
individual message layers need to be cleanly separated. The IuCS implementation
used until now (iu_client from libosmo-ranap) did not provide this level of
separation, and needed a complete rewrite. It was trivial to implement this in
such a way that both BSSAP and RANAP can be handled by the same SCCP code,
hence the new SCCP-RAN layer also replaces BSSAP handling.

sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN
connections. A set of callback functions provides implementation specific
details.

* RAN Abstraction (BSSAP vs. RANAP)

The common SCCP implementation did set the theme for the remaining refactoring:
make all other MSC code paths entirely RAN-implementation-agnostic.

ran_infra.c provides data structures that list RAN implementation specifics,
from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra
pointer hence allows complete abstraction of RAN implementations:

- managing connected RAN peers (BSC, RNC) in ran_peer.c,
- classifying and de-/encoding RAN PDUs,
- recording connected LACs and cell IDs and sending out Paging requests to
  matching RAN peers.

* RAN RESET now also for RANAP

ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also
supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide
proper RESET handling, which it so far duly ignores. (TODO)

* RAN de-/encoding abstraction

The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP
implementations transparently, but also to be able to optionally handle RAN on
distinct levels. Before Handover, all RAN messages are handled by the MSC-A
role.  However, after an inter-MSC Handover, a standalone MSC-I will need to
decode RAN PDUs, at least in order to manage Assignment of RTP streams between
BSS/RNC and MNCC call forwarding.

ran_msg.h provides a common API with abstraction for:

- receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and
  MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP
  or RANAP;
- sending RAN events: ran_enc_msg is the counterpart to compose RAN messages
  that should be encoded to either BSSMAP or RANAP and passed down to the
  BSC/RNC and MS/UE.

The RAN-specific implementations are completely contained 

Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init()

2019-05-08 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13919


Change subject: Print error message if application fails to call rate_ctr_init()
..

Print error message if application fails to call rate_ctr_init()

Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd
Closes: OS#3580
---
M src/rate_ctr.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/13919/1

diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 90e6502..99ec523 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -217,6 +217,10 @@
unsigned int size;
struct rate_ctr_group *group;

+   if (!osmo_timer_pending(_ctr_timer))
+   LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use 
libosmocore rate_ctr "
+   "without calling rate_ctr_init() at start-up. Rate 
counters won't work!\n");
+
if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) {
unsigned int new_idx = 
rate_ctr_get_unused_name_idx(desc->group_name_prefix);
LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists 
for index %u,"

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


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Hello Vadim Yanitskiy, Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/13913

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

Change subject: deal with rate_ctr_group_alloc() returning NULL
..

deal with rate_ctr_group_alloc() returning NULL

Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Related: #3701
---
M src/gb/gprs_bssgp.c
M src/gb/gprs_ns.c
M src/rate_ctr.c
3 files changed, 9 insertions(+), 2 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13137 )

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..


Patch Set 9:

(4 comments)

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c
File src/libmsc/call_leg.c:

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@158
PS9, Line 158: rtps = data;
> > it is to clarify the type of the data argument [...] […]
The way I usually do it is define a local variable that indicates the *data 
type, and then use it in various switch cases. Here it happens to be only the 
one case...

Why are we arguing about this? :)


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@178
PS9, Line 178: struct call_leg *cl = fi->priv;
> Also same opinion, variable is not needed for that: […]
indeed, it's not type safety, it is merely "type safety".

The way I usually do it is assign fi->priv to a local variable of the correct 
type and then use it in various places of that function. Here it happens to be 
only the one, and also happens to be passed as a void*.

Nevertheless I prefer to keep that style consistent across the entire file.


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@290
PS9, Line 290: call_leg_ensure_rtp_alloc
> Well, call_leg_rtp_alloc() also would just return 0 if it was already called 
> for a given RTP stream. […]
oh. what was I thinking.


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c@156
PS9, Line 156: DEBUGP
> > This is legacy logging, not sure if we really need to change all of it now? 
> > […]
And I would rather share the work load :P



--
To view, visit https://gerrit.osmocom.org/13137
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: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 9
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 15:00:16 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13137

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

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..

large refactoring: support inter-BSC and inter-MSC Handover

3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles:
- MSC-A is responsible for managing subscribers,
- MSC-I is the gateway to the RAN.
- MSC-T is a second transitory gateway to another RAN during Handover.

After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while
the original MSC-A retains the responsibility of subscriber management.

MSC-T exists in this patch but is not yet used, since Handover is only prepared
for, not yet implemented.

Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC
roles.

Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications:
- all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc
  instance,
- messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface
  (GSUP),
- no call routing between MSC-A and -I via MNCC necessary.

This is the largest code bomb I have submitted, ever. Out of principle, I
apologize to everyone trying to read this as a whole. Unfortunately, I see no
sense in trying to split this patch into smaller bits. It would be a huge
amount of work to introduce these changes in separate chunks, especially if
each should in turn be useful and pass all test suites. So, unfortunately, we
are stuck with this code bomb.

The following are some details and rationale for this rather huge refactoring:

* separate MSC subscriber management from ran_conn

struct ran_conn is reduced from the pivotal subscriber management entity it has
been so far to a mere storage for an SCCP connection ID and an MSC subscriber
reference.

The new pivotal subscriber management entity is struct msc_a -- struct msub
lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however
use msc_a, since MSC-A is where all the interesting stuff happens.

Before handover, msc_i is an FSM implementation that encodes to the local
ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM
implementation that instead forwards via/from GSUP. Same goes for the msc_a
struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the
msc_a->fi is an FSM implementation that merely forwards via/from GSUP.

* New SCCP implementation for RAN access

To be able to forward BSSAP and RANAP messages via the GSUP interface, the
individual message layers need to be cleanly separated. The IuCS implementation
used until now (iu_client from libosmo-ranap) did not provide this level of
separation, and needed a complete rewrite. It was trivial to implement this in
such a way that both BSSAP and RANAP can be handled by the same SCCP code,
hence the new SCCP-RAN layer also replaces BSSAP handling.

sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN
connections. A set of callback functions provides implementation specific
details.

* RAN Abstraction (BSSAP vs. RANAP)

The common SCCP implementation did set the theme for the remaining refactoring:
make all other MSC code paths entirely RAN-implementation-agnostic.

ran_infra.c provides data structures that list RAN implementation specifics,
from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra
pointer hence allows complete abstraction of RAN implementations:

- managing connected RAN peers (BSC, RNC) in ran_peer.c,
- classifying and de-/encoding RAN PDUs,
- recording connected LACs and cell IDs and sending out Paging requests to
  matching RAN peers.

* RAN RESET now also for RANAP

ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also
supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide
proper RESET handling, which it so far duly ignores. (TODO)

* RAN de-/encoding abstraction

The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP
implementations transparently, but also to be able to optionally handle RAN on
distinct levels. Before Handover, all RAN messages are handled by the MSC-A
role.  However, after an inter-MSC Handover, a standalone MSC-I will need to
decode RAN PDUs, at least in order to manage Assignment of RTP streams between
BSS/RNC and MNCC call forwarding.

ran_msg.h provides a common API with abstraction for:

- receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and
  MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP
  or RANAP;
- sending RAN events: ran_enc_msg is the counterpart to compose RAN messages
  that should be encoded to either BSSMAP or RANAP and passed down to the
  BSC/RNC and MS/UE.

The RAN-specific implementations are completely contained 

Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13137 )

Change subject: large refactoring: support inter-BSC and inter-MSC Handover
..


Patch Set 9:

(2 comments)

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c
File src/libmsc/call_leg.c:

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@78
PS9, Line 78: talloc_zero
> > The talloc API does not provide a macro similar to talloc_zero() that names 
> > the struct [...] […]
hmm, I didn't see that! even the first on top. All I saw was talloc_size(). I 
apologize for being blind.


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c
File src/libmsc/e_link.c:

https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@77
PS9, Line 77: *e = (struct e_link) {
> the point is that the compiler is unable to optimize away initializing the 
> same bit of memory *twice […]
Every time micro optimisation comes up I think we should actually start some 
profiling effort that tells us how much time is spent where. Then we could 
sensibly argue about performance changes with hard data to support it. I think 
there are quite a few things we do far more often that are a lot worse than 
this, O(N) things instead of O(1). Comes to mind: iterating entire linked-lists 
over all items to find the conn for a received message / the vsub for a 
subscriber / ...; iterating value_string[] instead of using array index; 
copying msgb around to get enough headroom.

Compared to those, I suspect that this is really not worth even commenting 
about. Writing about this double-zero-init likely took more time than osmo-msc 
would spend doing this in ten years of operation.



--
To view, visit https://gerrit.osmocom.org/13137
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: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 9
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 14:43:25 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13918 )

Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC
..

port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
---
M common/chapters/port_numbers.adoc
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index 6309c66..355e41c 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -41,6 +41,8 @@
 |TCP|4261|telnet (VTY)|osmo-hnbgw
 |TCP|4262|Control Interface|osmo-hnbgw
 |TCP|4263|Control Interface|osmo-gbproxy
+|TCP|4264|telnet (VTY)|osmo-cbc
+|TCP|4265|Control Interface|osmo-cbc
 |UDP|4729|GSMTAP|Almost every osmocom project
 |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat
 |UDP|2427|GSMTAP|osmo-pcu, osmo-bts

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
Gerrit-Change-Number: 13918
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13913
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: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 14:21:00 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13918 )

Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC
..


Patch Set 1:

How about include/osmocom/vty/ports.h where we have OSMO_VTY_PORT_*?


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
Gerrit-Change-Number: 13918
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 08 May 2019 14:19:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-hlr[master]: Document subscribers create on demand feature

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13715 )

Change subject: Document subscribers create on demand feature
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13715
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: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9
Gerrit-Change-Number: 13715
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 14:18:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn()

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13719 )

Change subject: db_hlr.c: add db_subscr_exists_by_msisdn()
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/13719
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: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2
Gerrit-Change-Number: 13719
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 14:15:16 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi()

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13712 )

Change subject: db_hlr.c: add db_subscr_exists_by_imsi()
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/13712
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: I63818c0dd4fd22b41dadeeba2a07a651b5454c54
Gerrit-Change-Number: 13712
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 14:14:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13711 )

Change subject: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args
..


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/13711/2/src/db.h
File src/db.h:

https://gerrit.osmocom.org/#/c/13711/2/src/db.h@121
PS2, Line 121: int nam_cs, int nam_ps
Alternatively, we could have a bitmask here, so we would be able to extend it 
later on. In particular:

  #define SUBSCR_FLAG_NAM_CS (1 << 0)
  #define SUBSCR_FLAG_NAM_PS (1 << 1)

  ...

  int db_subscr_create(..., uint8_t flags);

and the function call itself would look cleaner:

  /* Create a subscriber with both CS and PS domains allowed */
  db_subscr_create(..., SUBSCR_FLAG_NAM_CS | SUBSCR_FLAG_NAM_PS);


https://gerrit.osmocom.org/#/c/13711/2/src/db.h@121
PS2, Line 121: int
Since this is just yes or no, you could use bool.


https://gerrit.osmocom.org/#/c/13711/2/src/db_hlr.c
File src/db_hlr.c:

https://gerrit.osmocom.org/#/c/13711/2/src/db_hlr.c@47
PS2, Line 47: (1: enable, 0: disable)
... so there would be no need to clarify possible values.



--
To view, visit https://gerrit.osmocom.org/13711
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: I1a6dd85387723dab5487c53b33d2d9ec6d05d006
Gerrit-Change-Number: 13711
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 14:01:38 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: Create subscribers on demand

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13713 )

Change subject: Create subscribers on demand
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c
File src/hlr.c:

https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c@154
PS2, Line 154: 15
AFAIR, I just used a random number, because in the original patch the MSISDN 
length was hard-coded. Do we have any constant like MSISDN_MAX_LEN in 
libosmocore or wherever?

In any case, we're limited by OSMO_MAX_RAND_ID_LEN (16).


https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c@178
PS2, Line 178: continue
I just realized that we may end up with an infinity loop here, if 
osmo_get_rand_id() constantly fails. Probably, we need to limit the amount of 
attempts somehow...



--
To view, visit https://gerrit.osmocom.org/13713
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: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Gerrit-Change-Number: 13713
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:54:16 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

2019-05-08 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13918


Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC
..

port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
---
M common/chapters/port_numbers.adoc
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index 6309c66..355e41c 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -41,6 +41,8 @@
 |TCP|4261|telnet (VTY)|osmo-hnbgw
 |TCP|4262|Control Interface|osmo-hnbgw
 |TCP|4263|Control Interface|osmo-gbproxy
+|TCP|4264|telnet (VTY)|osmo-cbc
+|TCP|4265|Control Interface|osmo-cbc
 |UDP|4729|GSMTAP|Almost every osmocom project
 |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat
 |UDP|2427|GSMTAP|osmo-pcu, osmo-bts

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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
Gerrit-Change-Number: 13918
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre)

2019-05-08 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13886 )

Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast 
Centre)
..

Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre)

Change-Id: I2075420048b43973c800ba0fc389f4b559437233
---
M include/osmocom/ctrl/ports.h
M include/osmocom/vty/ports.h
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h
index b65bd00..25d2491 100644
--- a/include/osmocom/ctrl/ports.h
+++ b/include/osmocom/ctrl/ports.h
@@ -22,4 +22,6 @@
 #define OSMO_CTRL_PORT_HLR 4259
 #define OSMO_CTRL_PORT_HNBGW   4262
 #define OSMO_CTRL_PORT_GBPROXY 4263
+/* 4264 used by VTY interface */
+#define OSMO_CTRL_PORT_CBC 4265
 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */
diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h
index 5a8faed..201e115 100644
--- a/include/osmocom/vty/ports.h
+++ b/include/osmocom/vty/ports.h
@@ -33,4 +33,5 @@
 #define OSMO_VTY_PORT_GGSN 4260
 #define OSMO_VTY_PORT_HNBGW4261
 /* 4262-4263 used by control interface */
+#define OSMO_VTY_PORT_CBC  4264
 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */

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

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


Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre)

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13886 )

Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast 
Centre)
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13886
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: I2075420048b43973c800ba0fc389f4b559437233
Gerrit-Change-Number: 13886
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 13:50:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13918 )

Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf
Gerrit-Change-Number: 13918
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 13:50:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13887 )

Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c
File src/gsm/gsm0808_utils.c:

https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c@802
PS1, Line 802:  gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, 
>id_list[i]);
> Can you really have different id_discr in encoding of list in CBSP? Otherwise 
> it makes sense to keep […]
the "probelm" in CBSP is that there are two types of lists: One where there's a 
single global "discr" followed by a list of items of identical type.  There's 
also other lists where each element in the list has a separate "discr" inside 
the element.  And in order to supprot both from a single encode/decode 
function, we need to leave list iteration to the user and pass in the discr 
into the function.



--
To view, visit https://gerrit.osmocom.org/13887
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: I6cc567798e20365e6587e6b2988e834306d8c80c
Gerrit-Change-Number: 13887
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 13:46:10 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13913 )

Change subject: deal with rate_ctr_group_alloc() returning NULL
..


Patch Set 1:

> The doc/vty stuff in this patch doesn't seem related.

thanks.  The removal of those two files is happening virtually on every build 
here, and I always have to stash/revere those changes on every libosmocore 
commit during recent weeks/months :(


--
To view, visit https://gerrit.osmocom.org/13913
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: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Gerrit-Change-Number: 13913
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 13:43:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-hlr[master]: Create subscribers on demand

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13713 )

Change subject: Create subscribers on demand
..


Patch Set 2: Code-Review-1

(2 comments)

I think both network access mode (PS or CS) and random MSISDN assignment should 
be separate independent parameters. For example, one may not want to assign 
MSISDNs, but still allow PS, CS, or both... At least for PS, having a valid 
MSISDN is not mandatory I think.

https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h
File src/hlr.h:

https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h@63
PS2, Line 63: int
unsigned


https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c
File src/hlr_vty.c:

https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c@365
PS2, Line 365: NAM (Numeric Assignment Module)
I thought it's "Network Access Mode" :D



--
To view, visit https://gerrit.osmocom.org/13713
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: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Gerrit-Change-Number: 13713
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:43:06 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL

2019-05-08 Thread Harald Welte
Hello Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/13913

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

Change subject: deal with rate_ctr_group_alloc() returning NULL
..

deal with rate_ctr_group_alloc() returning NULL

Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc
Related: #3701
---
M src/gb/gprs_bssgp.c
M src/gb/gprs_ns.c
2 files changed, 8 insertions(+), 0 deletions(-)


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

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


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13712 )

Change subject: db_hlr.c: add db_subscr_exists_by_imsi()
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13712
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: I63818c0dd4fd22b41dadeeba2a07a651b5454c54
Gerrit-Change-Number: 13712
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:34:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13917 )

Change subject: osmux: Document func and return different rc upon osmux init 
failure
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e
Gerrit-Change-Number: 13917
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 13:39:01 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: Create subscribers on demand

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13713 )

Change subject: Create subscribers on demand
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c
File src/hlr_vty.c:

https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c@362
PS2, Line 362: both
> 'both' looks confusing, what about 'full'? Since this is related to 'access' 
> => 'full access'.
it's a bit tricky.  I think 3GPP calls it "combined".  You can e.g. do a 
"combined" LU+RAU to talk to both to the CS and PS plane.

To make it more obvious, we also could ismply call it "cs+ps" or "cs-and-ps" or 
the like.



--
To view, visit https://gerrit.osmocom.org/13713
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: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Gerrit-Change-Number: 13713
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:37:37 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure

2019-05-08 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13917


Change subject: osmux: Document func and return different rc upon osmux init 
failure
..

osmux: Document func and return different rc upon osmux init failure

Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/17/13917/1

diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index bfb88bc..3a4e396 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -671,12 +671,17 @@
rtp->codec->frame_duration_den;
 }

+/*! Initializes osmux socket if not yet initialized. Parses Osmux CID from 
MGCP line.
+ *  \param[in] endp Endpoint willing to initialize osmux
+ *  \param[in] line Line X-Osmux from MGCP header msg to parse
+ *  \returns OSMUX CID, -1 for wildcard, -2 on parse error, -3 on osmux 
initalize error
+ */
 static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line)
 {
if (!endp->cfg->osmux_init) {
if (osmux_init(OSMUX_ROLE_BSC, endp->cfg) < 0) {
LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init 
OSMUX\n");
-   return -1;
+   return -3;
}
LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "OSMUX socket has been set 
up\n");
}

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e
Gerrit-Change-Number: 13917
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old o...

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13912 )

Change subject: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with 
old osmo-bsc
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a
Gerrit-Change-Number: 13912
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 08 May 2019 13:29:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn()

2019-05-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13719 )

Change subject: db_hlr.c: add db_subscr_exists_by_msisdn()
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13719
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: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2
Gerrit-Change-Number: 13719
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:35:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: Create subscribers on demand

2019-05-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13713 )

Change subject: Create subscribers on demand
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c
File src/hlr_vty.c:

https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c@362
PS2, Line 362: both
'both' looks confusing, what about 'full'? Since this is related to 'access' => 
'full access'.



--
To view, visit https://gerrit.osmocom.org/13713
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: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Gerrit-Change-Number: 13713
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 08 May 2019 13:26:19 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: Document subscribers create on demand feature

2019-05-08 Thread osmith
osmith has uploaded a new patch set (#3) to the change originally created by 
Vadim Yanitskiy. ( https://gerrit.osmocom.org/13715 )

Change subject: Document subscribers create on demand feature
..

Document subscribers create on demand feature

Add a new section in the subscribers chapter, with detailed explanation
of the use cases and related OsmoHLR and OsmoMSC configuration.

Related: OS#2542
Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9
---
M doc/manuals/chapters/subscribers.adoc
1 file changed, 21 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9
Gerrit-Change-Number: 13715
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 


Change in osmo-hlr[master]: add lu-ignore-nam-cs

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13714 )

Change subject: add lu-ignore-nam-cs
..


Abandoned

We have a nice solution now, that doesn't need this hack :)
--
To view, visit https://gerrit.osmocom.org/13714
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I62e750faab92b142b9ca89ad2de5dc63afaeb61c
Gerrit-Change-Number: 13714
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Harald Welte 


Change in osmo-hlr[master]: add lu-ignore-nam-cs

2019-05-08 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13714 )

Change subject: add lu-ignore-nam-cs
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13714/1/src/hlr_vty.c
File src/hlr_vty.c:

https://gerrit.osmocom.org/#/c/13714/1/src/hlr_vty.c@347
PS1, Line 347:  "Allow subscribers to do the LU (Location Update) for the CS 
domain, even if they should not have access to it."
> I wonder how such long help strings are rendered in the VTY. I've never 
> tried...
FWIW it looked decent in the vty when I tested it.



--
To view, visit https://gerrit.osmocom.org/13714
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: I62e750faab92b142b9ca89ad2de5dc63afaeb61c
Gerrit-Change-Number: 13714
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 08 May 2019 13:09:27 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: Allow both CS and PS by default for subscribers created on demand

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13716 )

Change subject: Allow both CS and PS by default for subscribers created on 
demand
..


Abandoned

I've added vty options to configure the default NAM here: 
https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/
--
To view, visit https://gerrit.osmocom.org/13716
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I6668171f17eeec9f483f6cdd981d5b8b81b09cb0
Gerrit-Change-Number: 13716
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-hlr[master]: src/hlr.c: simplify initial check in subscr_create_on_demand()

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13717 )

Change subject: src/hlr.c: simplify initial check in subscr_create_on_demand()
..


Abandoned

Thanks for the patch, squashed into this one: 
https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/
--
To view, visit https://gerrit.osmocom.org/13717
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: If6b78adc236ef923e0b2e37b4e2407338a4b98b8
Gerrit-Change-Number: 13717
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-hlr[master]: src/hlr.c: fix coding style of subscr_create_on_demand()

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13718 )

Change subject: src/hlr.c: fix coding style of subscr_create_on_demand()
..


Abandoned

Thanks for the patch, squashed into this one: 
https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/
--
To view, visit https://gerrit.osmocom.org/13718
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I1b9aa628e16e20d823eda2098a77c624bc934e11
Gerrit-Change-Number: 13718
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-hlr[master]: Assign random MSISDN to subscribers created on demand

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13720 )

Change subject: Assign random MSISDN to subscribers created on demand
..


Abandoned

Thanks for the patch, squashed into this one: 
https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/
--
To view, visit https://gerrit.osmocom.org/13720
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac
Gerrit-Change-Number: 13720
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-hlr[master]: Document subscribers create on demand feature

2019-05-08 Thread osmith
osmith has uploaded a new patch set (#2) to the change originally created by 
Vadim Yanitskiy. ( https://gerrit.osmocom.org/13715 )

Change subject: Document subscribers create on demand feature
..

Document subscribers create on demand feature

Add a new section in the subscribers chapter, with detailed explanation
of the use cases and related OsmoHLR and OsmoMSC configuration.

Related: OS#2542
Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9
---
M doc/manuals/chapters/subscribers.adoc
1 file changed, 21 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9
Gerrit-Change-Number: 13715
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn()

2019-05-08 Thread osmith
osmith has uploaded a new patch set (#2) to the change originally created by 
Vadim Yanitskiy. ( https://gerrit.osmocom.org/13719 )

Change subject: db_hlr.c: add db_subscr_exists_by_msisdn()
..

db_hlr.c: add db_subscr_exists_by_msisdn()

Check if a subscriber exists without generating an error log entry if
it does not. This is cheaper than db_subscr_get_by_msisdn(), as it
does not fetch the subscriber entry.

subscriber-create-on-demand will use this function to generate
a random unique MSISDN for new subscribers.

Related: OS#2542
Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2
---
M src/db.c
M src/db.h
M src/db_hlr.c
M tests/db/db_test.c
M tests/db/db_test.err
5 files changed, 42 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2
Gerrit-Change-Number: 13719
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 


Change in osmo-hlr[master]: Create subscribers on demand

2019-05-08 Thread osmith
osmith has uploaded a new patch set (#2) to the change originally created by 
Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 )

Change subject: Create subscribers on demand
..

Create subscribers on demand

Add a new vty option and allow to optionally generate a random msisdn,
as well as setting the default NAM:

subscriber-create-on-demand <3-15> (none|cs|ps|both)
subscriber-create-on-demand no-extension

I thought about using an enum or bitfield to store nam_cs and nam_ps,
but I have used booleans instead, to match how it is stored in the
database. Thanks to Vadim for the random MSISDN patch [1], which was
squashed into this one.

[1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac

Related: OS#2542
Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
---
M src/hlr.c
M src/hlr.h
M src/hlr_vty.c
M tests/test_nodes.vty
A tests/test_subscriber_on_demand.vty
5 files changed, 182 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Gerrit-Change-Number: 13713
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 


Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi()

2019-05-08 Thread osmith
osmith has uploaded a new patch set (#2) to the change originally created by 
Vadim Yanitskiy. ( https://gerrit.osmocom.org/13712 )

Change subject: db_hlr.c: add db_subscr_exists_by_imsi()
..

db_hlr.c: add db_subscr_exists_by_imsi()

Check if a subscriber exists without generating an error log entry if
it does not. This is cheaper than db_subscr_get_by_imsi(), as it does
not fetch the subscriber entry. subscriber-create-on-demand will use
this function.

Related: OS#2542
Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54
---
M src/db.c
M src/db.h
M src/db_hlr.c
M tests/db/db_test.c
M tests/db/db_test.err
5 files changed, 40 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54
Gerrit-Change-Number: 13712
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: msc: check-imei-early

2019-05-08 Thread osmith
osmith has abandoned this change. ( https://gerrit.osmocom.org/13916 )

Change subject: msc: check-imei-early
..


Abandoned

Didn't mean to submit this one.
--
To view, visit https://gerrit.osmocom.org/13916
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: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a
Gerrit-Change-Number: 13916
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-msc[master]: remove msc specific db counters

2019-05-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/13800 )

Change subject: remove msc specific db counters
..


Patch Set 1: Code-Review-2

I would like to wait for neels branch to be merged.
@laforge do you agree in removing this?


--
To view, visit https://gerrit.osmocom.org/13800
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: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c
Gerrit-Change-Number: 13800
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 08 May 2019 13:03:16 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: msc: check-imei-early

2019-05-08 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13916


Change subject: msc: check-imei-early
..

msc: check-imei-early

Change-Id: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a
---
M net/templates/osmo-msc.cfg
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/16/13916/1

diff --git a/net/templates/osmo-msc.cfg b/net/templates/osmo-msc.cfg
index 00bf182..bccb621 100644
--- a/net/templates/osmo-msc.cfg
+++ b/net/templates/osmo-msc.cfg
@@ -12,7 +12,7 @@
  mgw remote-ip ${MGW4MSC_IP}
  mgw remote-port ${MGW4MSC_PORT}
  mgw endpoint-domain msc
- check-imei-rqd 1
+ check-imei-rqd early
  # For nano3G:
  iu rab-assign-addr-enc x213
 mncc-int

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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a
Gerrit-Change-Number: 13916
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


  1   2   >