Change in ...osmo-bsc[master]: doc/manuals: review and tweak handover docs

2019-06-18 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14515


Change subject: doc/manuals: review and tweak handover docs
..

doc/manuals: review and tweak handover docs

Change-Id: Ib25cee8fd8c243881b99173a9a3036ad19d0f8af
---
M doc/manuals/chapters/handover.adoc
M doc/manuals/chapters/handover_inter_bsc.dot
M doc/manuals/chapters/handover_intra_bsc.dot
3 files changed, 62 insertions(+), 53 deletions(-)



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

diff --git a/doc/manuals/chapters/handover.adoc 
b/doc/manuals/chapters/handover.adoc
index c75b03c..2f9d598 100644
--- a/doc/manuals/chapters/handover.adoc
+++ b/doc/manuals/chapters/handover.adoc
@@ -22,9 +22,7 @@
 is currently not implemented.  However, you may still advertise 3G and 4G 
neighbor cells
 in order to facilitate cell/RAT re-selection to those neighbors.

-At the time of writing, OsmoMSC's inter-BSC handover support is not complete
-yet, so OsmoBSC can perform handover between separate BSS only in conjunction
-with a 3rd party MSC implementation.
+Since 2019, OsmoMSC fully supports both inter-BSC and inter-MSC handover.

 .Handover support in Osmocom at the time of writing
 [cols="^,^,^,^,^"]
@@ -34,6 +32,7 @@
 | OsmoMSC | (not involved, except for codec changes) | (planned)  | (planned)  
| -
 |

+Most handover related procedures are explained in 3GPP TS 48.008.

 === How Handover Works

@@ -45,9 +44,20 @@
 cells, its "neighbors". On the MS/BTS/BSS level, individual cells are
 identified by ARFCN+BSIC (frequency + 6-bit identification code).

-Each BTS is told by the BSC which cells identified by ARFCN+BSIC are its
-adjacent cells. Via System Information, each MS receives a list of these
-ARFCN+BSIC, and the MS then return measurements of reception levels.
+The BSC instructs each BTS with a list of ARFCNs (i.e. GSM frequency bands)
+that qualify as neighbor cells, as part of the System Information Type 2. Each
+MS served by a BTS receives the System Information Type 2 and thus knows which
+ARFCNs to measure for potential handover. Each MS with an active channel then
+returns up to 6 measurements of reception levels (RXLEV) to the BTS, to be
+forwarded to the BSC in RSL Measurement Report messages.
+
+Note that the BTS and MS are told only the ARFCNs, not the BSICs, of neighbor
+cells; the BSICs are however included in the measurements that an MS returns to
+BTS and BSC. Commonly, each ARFCN is owned by one specific operator, so, an MS
+considers all visible cells on a given ARFCN as possible neighbors. However, as
+soon as an MS reports RXLEV of a specific neighbor cell, the BSC needs to know
+which exact cell to possibly handover to, which is why the MS pinpoints the
+specific BSIC that it reported measurements for.

 The BSC is the point of decision whether to do handover or not. This can be a
 hugely complex combination of heuristics, knowledge of cell load and codec
@@ -74,18 +84,18 @@
 Should handover fail at any point, e.g. the new lchan never receives a RACH, or
 the MS reports a Handover Failure, then the new lchan is simply released again,
 and the old lchan remains in use. If the RTP stream has already been switched
-over to the new lchan, it may actually be switched back to the old lchan.
+over to the new lchan, it is switched back to the old lchan.

 This is simple enough if the new cell is managed by the same BSC: the OsmoMGW
 is simply instructed to relay the BTS-side of the RTP stream to another IP
 address and port, and the BSC continues to forward DTAP to the MSC
-transparently. The operation happens completely within the BSS. If the voice
-codec has remained unchanged, the MSC/MNCC may not even be notified that
-anything has happened at all.
+transparently. The operation happens completely within the BSS, except for the
+BSSMAP Handover Performed message sent to the MSC once the handover is
+completed (see 3GPP TS 48.008).

  External / Inter-BSC Handover

-If the adjacent target cell belongs to a different BSS, the RR procedure for
+If the handover target cell belongs to a different BSS, the RR procedure for
 handover remains the same, but we need to tell the _remote_ BSC to allocate the
 new lchan.

@@ -108,7 +118,7 @@
 The first part, identifying the remote BSC, is not as trivial as it sounds: as
 mentioned above, on the level of cell information seen by BTS and MS, the
 neighbor cells are identified by ARFCN+BSIC. However, on the A-interface and in
-the MSC, there is no knowledge of ARFCN+BSIC configurations, and instead each
+the MSC, there is no knowledge of ARFCN+BSIC configurations. Instead, each
 cell is identified by a LAC and CI (Location Area Code and Cell Identifier).

 NOTE: There are several different cell identification types on the A-interface:
@@ -116,15 +126,7 @@
 most of these (see <>). For simplicity, this description
 focuse

Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans

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

Change subject: libmsc: Make sure to not dereference a NULL trans
..


Patch Set 2: Code-Review+1

I tweaked some places to rather use LOG_MSC_A_CAT() if an msc_a is available...


--
To view, visit https://gerrit.osmocom.org/13963
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: Ia14bd28e1db570c487ad8e90e29a69208e2226f2
Gerrit-Change-Number: 13963
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Sat, 11 May 2019 14:57:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans

2019-05-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded a new patch set (#2) to the change originally 
created by tnt. ( https://gerrit.osmocom.org/13963 )

Change subject: libmsc: Make sure to not dereference a NULL trans
..

libmsc: Make sure to not dereference a NULL trans

All those were identified by gcc. At this point in the code, trans is
NULL and so you can't call LOG_TRANS because it will try to access the
log_subsys field.

Instead call LOG_TRANS_CAT with manually specified category where
applicable (or other logging primitive depending on what the surrounding
code does)

Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2
Signed-off-by: Sylvain Munaut 
Tweaked-by: neels
---
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_09_11.c
M src/libmsc/transaction.c
4 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/13963/2
--
To view, visit https://gerrit.osmocom.org/13963
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: Ia14bd28e1db570c487ad8e90e29a69208e2226f2
Gerrit-Change-Number: 13963
Gerrit-PatchSet: 2
Gerrit-Owner: tnt 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans

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

Change subject: libmsc: Make sure to not dereference a NULL trans
..


Patch Set 1: Code-Review+2

In fact this patch is slightly nicer in that it puts the right logging category 
for the file in LOG_TRANS_CAT().
The other patch will also catches all future NULL trans in LOG_TRANS().
So now I think we should actually merge both.


--
To view, visit https://gerrit.osmocom.org/13963
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: Ia14bd28e1db570c487ad8e90e29a69208e2226f2
Gerrit-Change-Number: 13963
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Sat, 11 May 2019 14:26:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again

2019-05-11 Thread Neels Hofmeyr
Hello tnt,

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

https://gerrit.osmocom.org/13992

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

Change subject: make LOG_TRANS() NULL-safe again
..

make LOG_TRANS() NULL-safe again

Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that.

In case a trans is NULL, it is fine to log in the DMSC category, since the
context should still be general (erratic message or other initial problems).

[1] 7f85acea9bb9f80e208820958f4cae63625f3689 / 
I6dfe5b98fb9e884c2dde61d603832dafceb12123
"LOG_TRANS: store subsys in trans, unify USSD logging back to DMM"

Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6
---
M include/osmocom/msc/transaction.h
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/13992/2
--
To view, visit https://gerrit.osmocom.org/13992
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: I6e36c47bf828dd073b36c6301bbeabcc28e101e6
Gerrit-Change-Number: 13992
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-CC: Jenkins Builder (102)


Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans

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

Change subject: libmsc: Make sure to not dereference a NULL trans
..


Patch Set 1:

Instead I suggest https://gerrit.osmocom.org/#/c/osmo-msc/+/13992


--
To view, visit https://gerrit.osmocom.org/13963
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: Ia14bd28e1db570c487ad8e90e29a69208e2226f2
Gerrit-Change-Number: 13963
Gerrit-PatchSet: 1
Gerrit-Owner: tnt 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Sat, 11 May 2019 14:22:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again

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


Change subject: make LOG_TRANS() NULL-safe again
..

make LOG_TRANS() NULL-safe again

Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that.

In case a trans is NULL, it is fine to log in the DMSC category, since the
context should still be general (erratic message or other initial problems).

Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6
---
M include/osmocom/msc/transaction.h
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/include/osmocom/msc/transaction.h 
b/include/osmocom/msc/transaction.h
index 6b82390..a95cdbb 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -27,7 +27,7 @@
 ##args)

 #define LOG_TRANS(trans, level, fmt, args...) \
-LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args)
+LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, 
fmt, ##args)

 enum bridge_state {
BRIDGE_STATE_NONE,

--
To view, visit https://gerrit.osmocom.org/13992
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: I6e36c47bf828dd073b36c6301bbeabcc28e101e6
Gerrit-Change-Number: 13992
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: tnt 


Change in osmo-msc[master]: silence error messages about HANDOVER_END not permitted

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


Change subject: silence error messages about HANDOVER_END not permitted
..

silence error messages about HANDOVER_END not permitted

The MSC_A_EV_HANDOVER_END exists as parent term event for the msc_ho_fsm, but
it is not actually required as functional event, since all cleanup is handled
in msc_ho_fsm_cleanup().

That's why I never bothered to add the event to msc_a_fsm, but of course that
means we get an error message after each (successful and unsuccessful)
handover, that the MSC_A_EV_HANDOVER_END is not permitted.

Allow the event and ignore it to silence the error message.
Explain in a comment.

Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134
---
M src/libmsc/msc_a.c
1 file changed, 12 insertions(+), 0 deletions(-)



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

diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 77dd43d..5137e20 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -646,6 +646,12 @@
msc_ho_start(msc_a, (struct ran_handover_required*)data);
return;

+   case MSC_A_EV_HANDOVER_END:
+   /* Termination event of the msc_ho_fsm. No action needed, it's 
all done in the msc_ho_fsm cleanup. This
+* event only exists because osmo_fsm_inst_alloc_child() 
requires a parent term event; and maybe
+* interesting for logging. */
+   return;
+
case MSC_A_EV_MO_CLOSE:
case MSC_A_EV_CN_CLOSE:
case MSC_A_EV_UNUSED:
@@ -756,6 +762,10 @@
/* RTP streams cleaned up above */
return;

+   case MSC_A_EV_HANDOVER_END:
+   /* msc_ho_fsm does cleanup. */
+   return;
+
default:
OSMO_ASSERT(false);
}
@@ -921,6 +931,7 @@
| S(MSC_EV_CALL_LEG_TERM)
| S(MSC_MNCC_EV_CALL_ENDED)
| S(MSC_A_EV_HANDOVER_REQUIRED)
+   | S(MSC_A_EV_HANDOVER_END)
,
.out_state_mask = 0
| S(MSC_A_ST_RELEASING)
@@ -935,6 +946,7 @@
| S(MSC_A_EV_UNUSED)
| S(MSC_EV_CALL_LEG_TERM)
| S(MSC_MNCC_EV_CALL_ENDED)
+   | S(MSC_A_EV_HANDOVER_END)
,
.out_state_mask = 0
| S(MSC_A_ST_RELEASED)

--
To view, visit https://gerrit.osmocom.org/13966
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: Ie8dc0c0a631b7da43111f329562007766a21b134
Gerrit-Change-Number: 13966
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: add DSS logging category

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

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

https://gerrit.osmocom.org/13942

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

Change subject: add DSS logging category
..

add DSS logging category

Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
---
M include/osmocom/msc/debug.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_09_11.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_tests.c
6 files changed, 23 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/42/13942/2
--
To view, visit https://gerrit.osmocom.org/13942
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: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
Gerrit-Change-Number: 13942
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: add DUSSD logging category

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

Change subject: add DUSSD logging category
..


Patch Set 1:

thanks, I never get the SS / USSD naming right...


--
To view, visit https://gerrit.osmocom.org/13942
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: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
Gerrit-Change-Number: 13942
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 10 May 2019 13:45:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS

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

Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS
..


Patch Set 4:

Apparently this patch has been obsoleted... no use moving the conditinal libs 
to the non-conditional part, is there? I mean, those $LIB... vars will be 
empty, but it's nicer to be explicit, right? Opinons?


--
To view, visit https://gerrit.osmocom.org/7306
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: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7
Gerrit-Change-Number: 7306
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 10 May 2019 13:44:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS

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

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

https://gerrit.osmocom.org/7306

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

Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS
..

build osmo-msc: add "missing" LIBASN1C_LIBS

in osmo-msc/Makefile.am, osmo-msc was actually missing the LIBASN1C_LIBS even
though it included LIBASN1C_CFLAGS. Probably libasn1c is implicitly linked from
libranap.so, but doesn't hurt to name it.

When building without Iu support, the LIBOSMORANAP* and LIBASN1C* vars are
empty, so no need to explicitly switch on BUILD_IU, just name them.

Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7
---
M src/osmo-msc/Makefile.am
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/7306/4
--
To view, visit https://gerrit.osmocom.org/7306
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: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7
Gerrit-Change-Number: 7306
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-msc[master]: call_leg: document the parent_event_* items

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

Change subject: call_leg: document the parent_event_* items
..

call_leg: document the parent_event_* items

Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684
---
M include/osmocom/msc/call_leg.h
M src/libmsc/call_leg.c
2 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h
index 61107ee..d8380f5 100644
--- a/include/osmocom/msc/call_leg.h
+++ b/include/osmocom/msc/call_leg.h
@@ -34,6 +34,7 @@
/* Array indexed by enum rtp_direction. */
enum mgcp_connection_mode crcx_conn_mode[2];

+   /* Events dispatched to the parent fi, see call_leg_alloc() doc. */
uint32_t parent_event_rtp_addr_available;
uint32_t parent_event_rtp_complete;

diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c
index 1b7db2b..46405bc 100644
--- a/src/libmsc/call_leg.c
+++ b/src/libmsc/call_leg.c
@@ -64,6 +64,14 @@
OSMO_ASSERT( osmo_fsm_register(_leg_fsm) == 0 );
 }

+/* Allocate a call leg FSM instance as child of an arbitrary other FSM 
instance.
+ * The call leg FSM dispatches events to its parent FSM instance on specific 
events:
+ * - parent_event_term: dispatch this to the parent FI when the call leg 
terminates (call ended, either planned or by
+ *   failure).
+ * - parent_event_rtp_addr_available: one of the rtp_stream instances managed 
by the call leg has received an RTP
+ *   address from the MGW. The struct rtp_stream instance is passed as data 
argument for the event dispatch.
+ * - parent_event_rtp_complete: one of the rtp_stream instances entered the 
RTP_STREAM_ST_ESTABLISHED state.
+ */
 struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi,
uint32_t parent_event_term,
uint32_t parent_event_rtp_addr_available,

--
To view, visit https://gerrit.osmocom.org/13946
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: Ib099178a0f6ab218646c67c0e7a3d360c81af684
Gerrit-Change-Number: 13946
Gerrit-PatchSet: 2
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 


Change in osmo-msc[master]: call_leg: document the parent_event_* items

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

Change subject: call_leg: document the parent_event_* items
..


Patch Set 2:

wth: DLGLOBAL your program appears to use libosmocore rate_ctr without calling 
rate_ctr_init() at start-up. Rate counters won't work!
where did that come from


--
To view, visit https://gerrit.osmocom.org/13946
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: Ib099178a0f6ab218646c67c0e7a3d360c81af684
Gerrit-Change-Number: 13946
Gerrit-PatchSet: 2
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-Comment-Date: Fri, 10 May 2019 13:19:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset()

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

Change subject: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset()
..


Patch Set 1: Code-Review+2

excellent, this code is from before I started calling _nonfree(), forgot about 
that one...


--
To view, visit https://gerrit.osmocom.org/13953
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: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76
Gerrit-Change-Number: 13953
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 09 May 2019 20:00:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han...

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

Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and 
inter-MSC Handover tests")
..


Patch Set 1: Code-Review-1

the problem here is that it might fix 'latest' USSD tests, but it will break 
tests on 'master'


--
To view, visit https://gerrit.osmocom.org/13947
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: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7
Gerrit-Change-Number: 13947
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 09 May 2019 14:52:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: no HO call forwarding if no RTP stream

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

Change subject: no HO call forwarding if no RTP stream
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c
File src/libmsc/msc_ho.c:

https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c@546
PS1, Line 546: rtp_to_ran = cl ? cl->rtp[RTP_TO_RAN] : NULL;
> Assigning NULL to 'rtp_to_ran' doesn't make sense anymore. […]
makes sense to me. I could do this:

  if (!cl) {
  error...
  }

  if (!cl->rtp[RTP_TO_RAN]) {
  error...
  }

instead I just

  rtp_to_ran = pointer or NULL
  if (!rtp_to_ran) {
error...
  }

so it saves one if()

YMMV, but nothing wrong with this, right?



--
To view, visit https://gerrit.osmocom.org/13940
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: Ia223c2e20e625879ab71fc5c8afd0305fd224c58
Gerrit-Change-Number: 13940
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 09 May 2019 14:31:52 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED

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


Change subject: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED
..

call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED

The event is actually never dispatched and useless, because when an RTP stream
releases, the call_leg terminates directly anyway (which wasn't apparent when
starting to design the call_leg FSM yet).

Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c
---
M include/osmocom/msc/call_leg.h
M include/osmocom/msc/msc_roles.h
M src/libmsc/call_leg.c
M src/libmsc/msc_a.c
M src/libmsc/msc_i.c
M src/libmsc/msc_t.c
6 files changed, 8 insertions(+), 45 deletions(-)



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

diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h
index b8126e8..61107ee 100644
--- a/include/osmocom/msc/call_leg.h
+++ b/include/osmocom/msc/call_leg.h
@@ -36,7 +36,6 @@

uint32_t parent_event_rtp_addr_available;
uint32_t parent_event_rtp_complete;
-   uint32_t parent_event_rtp_released;

/* For internal MNCC, if RTP addresses for endpoints become assigned by 
the MGW, implicitly notify the other
 * call leg's RTP_TO_CN side rtp_stream with 
rtp_stream_remote_addr_available(). */
@@ -58,15 +57,13 @@
 struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi,
uint32_t parent_event_term,
uint32_t parent_event_rtp_addr_available,
-   uint32_t parent_event_rtp_complete,
-   uint32_t parent_event_rtp_released);
+   uint32_t parent_event_rtp_complete);

 void call_leg_reparent(struct call_leg *cl,
   struct osmo_fsm_inst *parent_fi,
   uint32_t parent_event_term,
   uint32_t parent_event_rtp_addr_available,
-  uint32_t parent_event_rtp_complete,
-  uint32_t parent_event_rtp_released);
+  uint32_t parent_event_rtp_complete);

 int call_leg_local_bridge(struct call_leg *cl1, uint32_t call_id1, struct 
gsm_trans *trans1,
  struct call_leg *cl2, uint32_t call_id2, struct 
gsm_trans *trans2);
diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h
index a1fab2f..b22bc7b 100644
--- a/include/osmocom/msc/msc_roles.h
+++ b/include/osmocom/msc/msc_roles.h
@@ -148,7 +148,6 @@

MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE,
MSC_EV_CALL_LEG_RTP_COMPLETE,
-   MSC_EV_CALL_LEG_RTP_RELEASED,
MSC_EV_CALL_LEG_TERM,

/* MNCC has told us to RTP_CREATE, but local RTP port has not yet been 
set up.
diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c
index cb7e6ea..1b7db2b 100644
--- a/src/libmsc/call_leg.c
+++ b/src/libmsc/call_leg.c
@@ -67,8 +67,7 @@
 struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi,
uint32_t parent_event_term,
uint32_t parent_event_rtp_addr_available,
-   uint32_t parent_event_rtp_complete,
-   uint32_t parent_event_rtp_released)
+   uint32_t parent_event_rtp_complete)
 {
struct call_leg *cl;
struct osmo_fsm_inst *fi = osmo_fsm_inst_alloc_child(_leg_fsm, 
parent_fi, parent_event_term);
@@ -82,7 +81,6 @@
.fi = fi,
.parent_event_rtp_addr_available = 
parent_event_rtp_addr_available,
.parent_event_rtp_complete = parent_event_rtp_complete,
-   .parent_event_rtp_released = parent_event_rtp_released,
};

return cl;
@@ -92,8 +90,7 @@
   struct osmo_fsm_inst *new_parent_fi,
   uint32_t parent_event_term,
   uint32_t parent_event_rtp_addr_available,
-  uint32_t parent_event_rtp_complete,
-  uint32_t parent_event_rtp_released)
+  uint32_t parent_event_rtp_complete)
 {
LOG_CALL_LEG(cl, LOGL_DEBUG, "Reparenting from parent %s to parent 
%s\n",
 cl->fi->proc.parent->name, new_parent_fi->name);
@@ -101,7 +98,6 @@
talloc_steal(new_parent_fi, cl->fi);
cl->parent_event_rtp_addr_available = parent_event_rtp_addr_available;
cl->parent_event_rtp_complete = parent_event_rtp_complete;
-   cl->parent_event_rtp_released = parent_event_rtp_released;
 }

 static int call_leg_fsm_timer_cb(struct osmo_fsm_inst *fi)
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 5baed54..77dd43d 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -546,28 +546,15 @@

 static void msc_a_cleanup_rtp_streams(struct msc_a *msc_a, uint32_t event, 
void *

Change in osmo-msc[master]: call_leg: document the parent_event_* items

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


Change subject: call_leg: document the parent_event_* items
..

call_leg: document the parent_event_* items

Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684
---
M include/osmocom/msc/call_leg.h
M src/libmsc/call_leg.c
2 files changed, 9 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h
index 61107ee..d8380f5 100644
--- a/include/osmocom/msc/call_leg.h
+++ b/include/osmocom/msc/call_leg.h
@@ -34,6 +34,7 @@
/* Array indexed by enum rtp_direction. */
enum mgcp_connection_mode crcx_conn_mode[2];

+   /* Events dispatched to the parent fi, see call_leg_alloc() doc. */
uint32_t parent_event_rtp_addr_available;
uint32_t parent_event_rtp_complete;
 
diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c
index 1b7db2b..46405bc 100644
--- a/src/libmsc/call_leg.c
+++ b/src/libmsc/call_leg.c
@@ -64,6 +64,14 @@
OSMO_ASSERT( osmo_fsm_register(_leg_fsm) == 0 );
 }

+/* Allocate a call leg FSM instance as child of an arbitrary other FSM 
instance.
+ * The call leg FSM dispatches events to its parent FSM instance on specific 
events:
+ * - parent_event_term: dispatch this to the parent FI when the call leg 
terminates (call ended, either planned or by
+ *   failure).
+ * - parent_event_rtp_addr_available: one of the rtp_stream instances managed 
by the call leg has received an RTP
+ *   address from the MGW. The struct rtp_stream instance is passed as data 
argument for the event dispatch.
+ * - parent_event_rtp_complete: one of the rtp_stream instances entered the 
RTP_STREAM_ST_ESTABLISHED state.
+ */
 struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi,
uint32_t parent_event_term,
uint32_t parent_event_rtp_addr_available,

--
To view, visit https://gerrit.osmocom.org/13946
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: Ib099178a0f6ab218646c67c0e7a3d360c81af684
Gerrit-Change-Number: 13946
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: add DUSSD logging category

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


Change subject: add DUSSD logging category
..

add DUSSD logging category

Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
---
M include/osmocom/msc/debug.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_09_11.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_tests.c
6 files changed, 23 insertions(+), 17 deletions(-)



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

diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h
index 28ba482..8802360 100644
--- a/include/osmocom/msc/debug.h
+++ b/include/osmocom/msc/debug.h
@@ -22,5 +22,6 @@
DIUCS,
DBSSAP,
DSGS,
+   DUSSD,
Debug_LastEntry,
 };
diff --git a/include/osmocom/msc/transaction.h 
b/include/osmocom/msc/transaction.h
index 6b82390..bd20153 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -168,10 +168,7 @@
case TRANS_SMS:
return DLSMS;
case TRANS_USSD:
-   /* FIXME: traditionally (before LOG_TRANS() was added in 
I2e60964d7a3c06d051debd1c707051a0eb3101ba /
-* ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging 
happened on DMM. Instead, it probably
-* deserves its own logging subsystem. */
-   return DMM;
+   return DUSSD;
default:
break;
}
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 984cc53..b211641 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -271,7 +271,7 @@

if (msc_a) {
struct gsm_network *net = msc_a_net(msc_a);
-   LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging succeeded\n");
+   LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging succeeded\n");

/* Assign connection */
msc_a_get(msc_a, MSC_A_USE_NC_SS);
@@ -297,7 +297,7 @@
/* Count established network-initiated NC SS/USSD sessions */
rate_ctr_inc(>msc_ctrs->ctr[MSC_CTR_NC_SS_MT_ESTABLISHED]);
} else {
-   LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging expired\n");
+   LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging expired\n");

/* TODO: inform HLR about this failure */

diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index e101d89..2c2cc26 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -480,8 +480,11 @@
.description = "SGs Interface (SGsAP)",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
-
-
+   [DUSSD] = {
+   .name = "DUSSD",
+   .description = "Supplementary Services",
+   .enabled = 1, .loglevel = LOGL_NOTICE,
+   },
 };

 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
diff --git a/tests/msc_vlr/msc_vlr_test_ss.err 
b/tests/msc_vlr/msc_vlr_test_ss.err
index 2030715..a409abf 100644
--- a/tests/msc_vlr/msc_vlr_test_ss.err
+++ b/tests/msc_vlr/msc_vlr_test_ss.err
@@ -173,12 +173,12 @@
 DBSSAP 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 RAN decode: DTAP
 DRLL 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER
 DREF VLR subscr IMSI-90170004620:MSISDN-46071 + NCSS: now used by 3 
(attached,active-conn,NCSS)
-DMM trans(NCSS IMSI-90170004620:MSISDN-46071 callref-0x2001 tid-8) New 
transaction
+DUSSD trans(NCSS IMSI-90170004620:MSISDN-46071 callref-0x2001 tid-8) 
New transaction
 DREF 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss)
 DMSC 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_TRANSACTION_ACCEPTED
 DMSC 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 state_chg to MSC_A_ST_COMMUNICATING
 DREF 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 - cm_service_ss: now used by 2 (rx_from_ms,nc_ss)
-DMM trans(NCSS IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x2001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER
+DUSSD trans(NCSS IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x2001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER
 GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 
2001080971004026f0300420013101013515a11302010102013b300b04010f0406aa510c061b010a0103
 DREF 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 

Change in osmo-msc[master]: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM

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


Change subject: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM
..

LOG_TRANS: store subsys in trans, unify USSD logging back to DMM

Instead of calling trans_log_subsys() for each LOG_TRANS() log line, rather
store in trans->log_subsys once on trans_alloc() and use that.

Do not fall back to the RAN's own subsystem (DBSSAP / DIUCS), it makes little
sense and may cause logging to switch subsystems depending on the RAN state.

In trans_log_subsys(), add missing switch cases:

- Log silent call transactions also on CC.
- Log USSD on DMM.

About USSD: we currently have no dedicated USSD logging category. As a result,
after LOG_TRANS() was introduced [1], USSD logged on DBSSAP/DIUCS or DMSC,
depending on whether a RAN was associated with the trans or not. Before that
change, USSD always logged on DMM, so, until we have a separate logging
category for USSD, consistenly use DMM again.

[1] in I2e60964d7a3c06d051debd1c707051a0eb3101ba / 
ff7074a0c7b62025473d8f1a950905ac2cb2f31c

Related: coverity CID 198453
Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123
---
M include/osmocom/msc/transaction.h
M src/libmsc/transaction.c
M tests/msc_vlr/msc_vlr_test_ss.err
3 files changed, 18 insertions(+), 11 deletions(-)



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

diff --git a/include/osmocom/msc/transaction.h 
b/include/osmocom/msc/transaction.h
index 99aca55..6b82390 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -27,7 +27,7 @@
 ##args)

 #define LOG_TRANS(trans, level, fmt, args...) \
-LOG_TRANS_CAT(trans, trans_log_subsys(trans), level, fmt, ##args)
+LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args)

 enum bridge_state {
BRIDGE_STATE_NONE,
@@ -60,6 +60,8 @@

/* What kind of transaction */
enum trans_type type;
+   /* Which category to log on, for LOG_TRANS(). */
+   int log_subsys;

/* The current transaction ID */
uint8_t transaction_id;
@@ -161,13 +163,17 @@
return DMSC;
switch (trans->type) {
case TRANS_CC:
+   case TRANS_SILENT_CALL:
return DCC;
case TRANS_SMS:
return DLSMS;
+   case TRANS_USSD:
+   /* FIXME: traditionally (before LOG_TRANS() was added in 
I2e60964d7a3c06d051debd1c707051a0eb3101ba /
+* ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging 
happened on DMM. Instead, it probably
+* deserves its own logging subsystem. */
+   return DMM;
default:
break;
}
-   if (trans->msc_a)
-   return trans->msc_a->c.ran->log_subsys;
return DMSC;
 }
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index b909cd8..d6f8c3b 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -146,6 +146,7 @@
.callref = callref,
.net = net,
};
+   trans->log_subsys = trans_log_subsys(trans);
vlr_subscr_get(vsub, trans_vsub_use(type));
llist_add_tail(>entry, >trans_list);

diff --git a/tests/msc_vlr/msc_vlr_test_ss.err 
b/tests/msc_vlr/msc_vlr_test_ss.err
index 5592488..2030715 100644
--- a/tests/msc_vlr/msc_vlr_test_ss.err
+++ b/tests/msc_vlr/msc_vlr_test_ss.err
@@ -173,12 +173,12 @@
 DBSSAP 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 RAN decode: DTAP
 DRLL 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER
 DREF VLR subscr IMSI-90170004620:MSISDN-46071 + NCSS: now used by 3 
(attached,active-conn,NCSS)
-DMSC trans(NCSS IMSI-90170004620:MSISDN-46071 callref-0x2001 tid-8) 
New transaction
+DMM trans(NCSS IMSI-90170004620:MSISDN-46071 callref-0x2001 tid-8) New 
transaction
 DREF 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss)
 DMSC 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_TRANSACTION_ACCEPTED
 DMSC 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 state_chg to MSC_A_ST_COMMUNICATING
 DREF 
msc_a(IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 - cm_service_ss: now used by 2 (rx_from_ms,nc_ss)
-DBSSAP trans(NCSS IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x2001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER
+DMM trans(NCSS IMSI-90170004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x2001 tid-8) Received SS/USSD msg GSM048

Change in osmo-msc[master]: no HO call forwarding if no RTP stream

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


Change subject: no HO call forwarding if no RTP stream
..

no HO call forwarding if no RTP stream

Fixes: coverity CID 198447
Related: OS#3992 (does not fix, just related)
Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58
---
M src/libmsc/msc_ho.c
1 file changed, 5 insertions(+), 0 deletions(-)



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

diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c
index 9d130c5..3a4258c 100644
--- a/src/libmsc/msc_ho.c
+++ b/src/libmsc/msc_ho.c
@@ -552,6 +552,11 @@
return -EINVAL;
}

+   if (!rtp_to_ran) {
+   msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, 
"Unexpected: no RTP stream is set up\n");
+   return -EINVAL;
+   }
+
/* Backup old cell's RTP IP:port and codec data */
msc_a->ho.old_cell.ran_remote_rtp = rtp_to_ran->remote;
msc_a->ho.old_cell.codec = rtp_to_ran->codec;

--
To view, visit https://gerrit.osmocom.org/13940
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: Ia223c2e20e625879ab71fc5c8afd0305fd224c58
Gerrit-Change-Number: 13940
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: make msc_a_vsub() and others NULL-safe

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


Change subject: make msc_a_vsub() and others NULL-safe
..

make msc_a_vsub() and others NULL-safe

Fixes: coverity CID 198451
Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4
---
M src/libmsc/msc_a.c
M src/libmsc/msc_i.c
M src/libmsc/msc_t.c
3 files changed, 10 insertions(+), 0 deletions(-)



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

diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 675f932..5baed54 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -73,16 +73,22 @@

 struct vlr_subscr *msc_a_vsub(const struct msc_a *msc_a)
 {
+   if (!msc_a)
+   return NULL;
return msub_vsub(msc_a->c.msub);
 }

 struct msc_i *msc_a_msc_i(const struct msc_a *msc_a)
 {
+   if (!msc_a)
+   return NULL;
return msub_msc_i(msc_a->c.msub);
 }

 struct msc_t *msc_a_msc_t(const struct msc_a *msc_a)
 {
+   if (!msc_a)
+   return NULL;
return msub_msc_t(msc_a->c.msub);
 }

diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c
index 6badba6..05df9cb 100644
--- a/src/libmsc/msc_i.c
+++ b/src/libmsc/msc_i.c
@@ -332,6 +332,8 @@

 struct vlr_subscr *msc_i_vsub(const struct msc_i *msc_i)
 {
+   if (!msc_i)
+   return NULL;
return msub_vsub(msc_i->c.msub);
 }

diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c
index ec5531f..c6bba47 100644
--- a/src/libmsc/msc_t.c
+++ b/src/libmsc/msc_t.c
@@ -902,6 +902,8 @@

 struct vlr_subscr *msc_t_vsub(const struct msc_t *msc_t)
 {
+   if (!msc_t)
+   return NULL;
return msub_vsub(msc_t->c.msub);
 }


--
To view, visit https://gerrit.osmocom.org/13939
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: Icd146ae512236a09cad080ed3eb85944e8f5cee4
Gerrit-Change-Number: 13939
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: ran_a_make_handover_request(): allow no encryption

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


Change subject: ran_a_make_handover_request(): allow no encryption
..

ran_a_make_handover_request(): allow no encryption

Fixes: coverity CID 198454
Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f
---
M src/libmsc/ran_msg_a.c
1 file changed, 2 insertions(+), 1 deletion(-)



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

diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 2e498a2..ba0990d 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -1068,7 +1068,8 @@

.speech_version_used = n->speech_version_used,

-   .chosen_encryption_algorithm_serving = 
n->geran.chosen_encryption->alg_id,
+   .chosen_encryption_algorithm_serving =
+   n->geran.chosen_encryption ? 
n->geran.chosen_encryption->alg_id : 0,

.old_bss_to_new_bss_info_raw = n->old_bss_to_new_bss_info_raw,
.old_bss_to_new_bss_info_raw_len = 
n->old_bss_to_new_bss_info_raw_len,

--
To view, visit https://gerrit.osmocom.org/13938
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: Ifb83ab2a8b6148b457224687ffada2dff4c3204f
Gerrit-Change-Number: 13938
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: comment: apply function renames to message cycle explanation

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


Change subject: comment: apply function renames to message cycle explanation
..

comment: apply function renames to message cycle explanation

The misnomed 'nas_decode' and 'nas_encode' APIs have been renamed to
'ran_decode' and 'ran_encode', which was forgotten in the large comment
explaining the message path in sccp_ran.h. Apply the rename there.

Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d
---
M include/osmocom/msc/sccp_ran.h
1 file changed, 12 insertions(+), 12 deletions(-)



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

diff --git a/include/osmocom/msc/sccp_ran.h b/include/osmocom/msc/sccp_ran.h
index b7da314..f190d91 100644
--- a/include/osmocom/msc/sccp_ran.h
+++ b/include/osmocom/msc/sccp_ran.h
@@ -13,17 +13,17 @@
  *  msc_a_up_l3()
msc_a_tx_dtap_to_i(dtap_msgb)
  *   ^|
  *   |v
- *  msc_a_nas_decode_cb(struct nas_dec_msg)  
msc_a_nas_enc(struct nas_enc_msg)
+ *  msc_a_ran_decode_cb(struct ran_dec_msg)  
msc_a_ran_enc(struct ran_enc_msg)
  *   ^^.  |
  *   |  -Decode NAS-  |   .  NAS  v
- *   ||  .   
ran_infra[type]->nas_encode(struct nas_enc_msg)
- *  nas_a_decode_l2()nas_iu_decode_l2() . |
  |
+ *   ||  .   
ran_infra[type]->ran_encode(struct ran_enc_msg)
+ *  ran_a_decode_l2()ran_iu_decode_l2() . |
  |
  *   ^^.  v
  v
- *   ||   .  
nas_a_encode()nas_iu_encode()
- *  ran_infra[type]->nas_dec_l2() |
  |
+ *   ||   .  
ran_a_encode()ran_iu_encode()
+ *  ran_infra[type]->ran_dec_l2() |
  |
  *   ^| -Encode 
BSSAP/RANAP- |
  *   |v
  v
- *  msc_a_nas_dec()   
msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I)
+ *  msc_a_ran_dec()   
msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I)
  *   ^|
  *   | MSC-A  v
  *. msc_a FSM .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . msc_a FSM .  
.  .  .  .  .  .  .  .  .
@@ -78,12 +78,12 @@
  *
  * MSC-A:
  * - Receives MSC_A_EV_FROM_I_COMPLETE_LAYER_3 AN-APDU, notices an_proto 
indicating BSSAP or RANAP.
- * - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP 
or RANAP.
- * - contained information is passed to msc_a_nas_decode_cb().
+ * - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP 
or RANAP.
+ * - contained information is passed to msc_a_ran_decode_cb().
  * - which msc_a starts Complete-L3 and VLR procedures,
  * - associates msub with a vlr_subscr,
  * - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly 
other more specialized tx functions)
- * - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as 
BSSAP or RANAP.
+ * - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as 
BSSAP or RANAP.
  * - passes as AN-APDU to MSC-I in 
MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal.
  *
  * MSC-I, receiving AN-APDU from local MSC-A:
@@ -147,10 +147,10 @@
  *
  *   MSC-A role:
  *   - Receives MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST, notices 
an_proto indicating BSSAP or RANAP.
- *   - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP 
or RANAP.
- *   - contained information is passed to msc_a_nas_decode_cb().
+ *   - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP 
or RANAP.
+ *   - contained information is passed to msc_a_ran_decode_cb().
  *   - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly 
other more specialized tx functions)
- *   - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as 
BSSAP or RANAP.
+ *   - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as 
BSSAP or RANAP.
  *   - passes as AN-APDU to MSC-I in 
MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal.
  *
  *   MS

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)
 {
st

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)
 {
st

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 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 Ciph

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-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-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover

2019-05-08 Thread Neels Hofmeyr
smocom/msc/ran_msg_iu.h
A include/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,670 insertions(+), 22,995 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/20
--
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: newpatchset
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 


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
smocom/msc/ran_msg_iu.h
A include/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,679 insertions(+), 22,995 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/19
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 19
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 


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-hlr[master]: use new OSMO_IMSI_BUF_SIZE

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

Change subject: use new OSMO_IMSI_BUF_SIZE
..

use new OSMO_IMSI_BUF_SIZE

Depends: Id11ada4c96b79f7f0ad58185ab7dbf24622fb770 (libosmocore)
Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939
---
M src/hlr_ussd.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 50a0167..4024780 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -150,7 +150,7 @@
/* link us to hlr->ss_sessions */
struct llist_head list;
/* imsi of this session */
-   char imsi[GSM23003_IMSI_MAX_DIGITS+2];
+   char imsi[OSMO_IMSI_BUF_SIZE];
/* ID of this session (unique per IMSI) */
uint32_t session_id;
/* state of the session */

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939
Gerrit-Change-Number: 13589
Gerrit-PatchSet: 5
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 


Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file

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

Change subject: osmo-hlr: allow configuring db path from cfg file
..

osmo-hlr: allow configuring db path from cfg file

So far, the cmdline argument was the only way to set a database config file.
Add a similar config to VTY as 'hlr' / 'database'. The cmdline arg is stronger
than the 'database' cfg item. DB is not reloaded from VTY command.

Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8
---
M src/hlr.c
M src/hlr.h
M src/hlr_vty.c
M tests/test_nodes.vty
4 files changed, 25 insertions(+), 3 deletions(-)

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



diff --git a/src/hlr.c b/src/hlr.c
index d9ebaf7..0bea590 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -626,7 +626,7 @@
bool db_upgrade;
 } cmdline_opts = {
.config_file = "osmo-hlr.cfg",
-   .db_file = "hlr.db",
+   .db_file = NULL,
.daemonize = false,
.db_upgrade = false,
 };
@@ -741,6 +741,7 @@
INIT_LLIST_HEAD(_hlr->iuse_list);
INIT_LLIST_HEAD(_hlr->ss_sessions);
INIT_LLIST_HEAD(_hlr->ussd_routes);
+   g_hlr->db_file_path = talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH);

/* Init default (call independent) SS session guard timeout value */
g_hlr->ncss_guard_timeout = NCSS_GUARD_TIMEOUT_DEFAULT;
@@ -779,9 +780,12 @@
exit(1);
}

-   g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file, true, 
cmdline_opts.db_upgrade);
+   if (cmdline_opts.db_file)
+   osmo_talloc_replace_string(g_hlr, _hlr->db_file_path, 
cmdline_opts.db_file);
+
+   g_hlr->dbc = db_open(hlr_ctx, g_hlr->db_file_path, true, 
cmdline_opts.db_upgrade);
if (!g_hlr->dbc) {
-   LOGP(DMAIN, LOGL_FATAL, "Error opening database\n");
+   LOGP(DMAIN, LOGL_FATAL, "Error opening database %s\n", 
osmo_quote_str(g_hlr->db_file_path, -1));
exit(1);
}

diff --git a/src/hlr.h b/src/hlr.h
index 00fa43c..e2e96a4 100644
--- a/src/hlr.h
+++ b/src/hlr.h
@@ -25,6 +25,8 @@
 #include 
 #include 

+#define HLR_DEFAULT_DB_FILE_PATH "hlr.db"
+
 struct hlr_euse;

 struct hlr {
@@ -32,6 +34,7 @@
struct osmo_gsup_server *gs;

/* DB context */
+   char *db_file_path;
struct db_context *dbc;

/* Control Interface */
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index d0a623a..e4cc4be 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -74,6 +74,8 @@
vty_out(vty, "hlr%s", VTY_NEWLINE);
if (g_hlr->store_imei)
vty_out(vty, " store-imei%s", VTY_NEWLINE);
+   if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, 
HLR_DEFAULT_DB_FILE_PATH))
+   vty_out(vty, " database %s%s", g_hlr->db_file_path, 
VTY_NEWLINE);
return CMD_SUCCESS;
 }

@@ -224,6 +226,15 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_database, cfg_database_cmd,
+   "database PATH",
+   "Set the path to the HLR database file\n"
+   "Relative or absolute file system path to the database file (default is 
'" HLR_DEFAULT_DB_FILE_PATH "')\n")
+{
+   osmo_talloc_replace_string(g_hlr, _hlr->db_file_path, argv[0]);
+   return CMD_SUCCESS;
+}
+
 struct cmd_node euse_node = {
EUSE_NODE,
"%s(config-hlr-euse)# ",
@@ -380,6 +391,8 @@

install_element(GSUP_NODE, _hlr_gsup_bind_ip_cmd);

+   install_element(HLR_NODE, _database_cmd);
+
install_element(HLR_NODE, _euse_cmd);
install_element(HLR_NODE, _no_euse_cmd);
install_node(_node, config_write_euse);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index d90fa70..a4e53db 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -75,6 +75,7 @@
   exit
   end
   gsup
+  database PATH
   euse NAME
   no euse NAME
   ussd route prefix PREFIX internal (own-msisdn|own-imsi)
@@ -124,6 +125,7 @@
 ...
 hlr
  store-imei
+ database hlr_vty_test.db
  gsup
   bind ip 127.0.0.1
  ussd route prefix *#100# internal own-msisdn

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8
Gerrit-Change-Number: 13586
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


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

2019-05-07 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 18:

it's bloody time, too. what a marathon.


--
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: 18
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 03:36:01 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2019-05-07 Thread Neels Hofmeyr
an_msg_iu.h
A include/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,672 insertions(+), 22,989 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/18
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 18
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
an_msg_iu.h
A include/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,666 insertions(+), 22,989 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/17
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 17
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
an_msg_iu.h
A include/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,654 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/16
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 16
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
150 files changed, 35,653 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/15
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 15
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
150 files changed, 35,652 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/14
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 14
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
150 files changed, 35,646 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/13
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 13
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 Thread Neels Hofmeyr
/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
M tests/sms_queue/sms_queue_test.c
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,647 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/12
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 12
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


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

2019-05-07 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 11:

found something in msc_new_msc_t_for_handover_request() instead. WTF though 
with that super odd error message!?!?


--
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: 11
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 00:07:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2019-05-07 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 11:

> Patch Set 11: Verified-1
>
> Build Failed
>
> https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-msc/1524/ : FAILURE

the build says

In file included from 
/build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_common.h:45:0,
 from 
/build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_client.h:6,
 from ../../include/osmocom/msc/gsm_data.h:16,
 from e_link.c:27:
e_link.c: In function ‘msc_a_i_t_gsup_rx’:
/build/deps/install/stow/libosmocore/include/osmocom/core/logging.h:95:5: 
error: ‘msub’ may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
 logp2(ss, level, __FILE__, __LINE__, cont, fmt, ##args); \
 ^
e_link.c:155:15: note: ‘msub’ was declared here
  struct msub *msub;
   ^

and I completely don't understand this. line 155 in e_link.c is a completely 
unrelated place in the code, and I can't find any code path where an 
uninitialized msub might be used in msc_a_i_t_gsup_rx() :/


--
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: 11
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 08 May 2019 00:02:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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

https://gerrit.osmocom.org/13612

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

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/12/13612/4
--
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: newpatchset
Gerrit-Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb
Gerrit-Change-Number: 13612
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


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

2019-05-07 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:

(28 comments)

hmm, my idea was to have received this review a lot earlier. I am N times 
through final-final and absolutely final testing after patch changes. I 
appreciate the review, but to be honest I personally need to get this load off 
my shoulders. I am applying your review thus far, but would prefer to not 
squash more modifications into this patch set, but rather move on to separate 
follow-up patches after this.

This patch being in limbo is a huge burden:

- having to continuously rebase it keeps introducing merge conflicts that are 
completely loaded onto my shoulders -- I have to understand and adjust to all 
other work going on; this limbo has been going on for far too long and by now 
is profoundly impacting my private life (stress / frustration).

- Secondly, squashing changes into the patch set happens sort of hidden, not 
seen in the git history; I've often had to revisit the reflog to analyse past 
versions of the patch set to fix bugs introduced by modifications squashed into 
this -- that's not how version control should happen.

So please, unless you have absolutely critical bugs that need fixing, let's 
move to merge + separate patches as soon as possible.

Nevertheless: many thanks for reviewing this with close scrutiny!
If you can, by all means please go on to do so!

https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am
File include/osmocom/msc/Makefile.am:

https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am@9
PS9, Line 9: gsm_04_11.h \
> Looks like a meaningless change.
I think I decided to alphabetically sort (vim ':sort' command) ... can we just 
keep this?


https://gerrit.osmocom.org/#/c/13137/6/include/osmocom/msc/msc_roles.h
File include/osmocom/msc/msc_roles.h:

https://gerrit.osmocom.org/#/c/13137/6/include/osmocom/msc/msc_roles.h@379
PS6, Line 379: struct an_apdu {
 :  /* accessNetworkProtocolId */
 :  enum osmo_gsup_access_network_protocol an_proto;
 :  /* signalInfo */
 :  struct msgb *msg;
 :  /* If this AN-APDU is sent between MSCs, additional information 
from the E-interface messaging, like the
 :   * Handover Number, will placed/available here. Otherwise may 
be left NULL. */
 :  const struct osmo_gsup_message *e_info;
 : };
> hmm, indeed, didn't see that... […]
In the end decided against using the msgb->cb[], because it makes the type 
conversions a lot more complex / ugly.


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@34
PS9, Line 34: LOG_CALL_LEG
> LOGPFSML can handle fi=NULL, so we probably don't need this macro.
indeed it ended up being a simplistic wrapper, but it is my preferred pattern 
to keep FSM specific log macros. That way we can trivially tweak all log 
context for a given object in a single place.


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@78
PS9, Line 78: fi
> AFAICS, you're using 'fi' as the talloc-parent in order to deallocate it 
> automatically when the 'fi' […]
I want the struct and the fi to be one talloc unit, and I specifically do not 
want to have to remember to talloc_free in a cleanup function.

It is also a functional requirement to keep the struct around until the FSM 
instance frees to avoid all sorts of complex freeing cascades hitting 
use-after-free problems. See 
http://git.osmocom.org/libosmocore/commit/?id=1f9cc018618e7d1e9a7a37e1ef08e059a4e02e87
 -- which would be quite useless if the cleanup function freed the struct 
separately.

You will see this exact pattern in *all* of the FSM instance implementations I 
have written, both in osmo-bsc and here. I appreciate your opinion, but will 
not adjust this pattern.

I don't understand what you mean by "no need to init dummy call_leg_fsm on line 
#59." -- line 59 has the global FSM definition, which is not the FSM instance 
that is allocated here based on that singleton FSM definition. Again this is a 
common pattern.


https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@78
PS9, Line 78: talloc_zero
> Since you're doing *cl = (struct call_leg) { ... […]
you mean I don't need to talloc_zero()? Below cl = (struct...){...} can be seen 
as syntactic sugar to not have to repeat cl-> in every line, and to make clear 
that the struct is fully initialized.
The talloc API does not provide a macro similar to talloc_zero() that names the 
struct but doesn't zero initialize.
What is the reason for this statement, optimization? I would just keep it as 
is, no point in changing it?


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

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

2019-05-07 Thread Neels Hofmeyr
/osmocom/msc/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
M tests/sms_queue/sms_queue_test.c
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,647 insertions(+), 22,990 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/10
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 10
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...

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

Change subject: hlr.c: fix: properly print the original message type in 
read_cb_forward()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13898
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: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39
Gerrit-Change-Number: 13898
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 07 May 2019 14:44:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb()

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

Change subject: hlr.c: fix possible msgb memleaks in read_cb()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13900
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: I1226eeb24d7657e2782760fab1b49d5581ab53e2
Gerrit-Change-Number: 13900
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 07 May 2019 14:41:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...

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

Change subject: hlr.c: fix: properly print the original message type in 
read_cb_forward()
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c
File src/hlr.c:

https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c@502
PS1, Line 502:  LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not 
connected\n");
> Why not using gsup here instead of gsup_err, and then moving all gsup_err 
> allocation after "end" tag […]
because msg is already deallocated when we reach here



--
To view, visit https://gerrit.osmocom.org/13898
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: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39
Gerrit-Change-Number: 13898
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 07 May 2019 14:43:03 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: hlr.c: check the presence of msgb->l2h in read_cb()

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

Change subject: hlr.c: check the presence of msgb->l2h in read_cb()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13899
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: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b
Gerrit-Change-Number: 13899
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 07 May 2019 14:42:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..


Patch Set 6:

(1 comment)

https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn
File msc/BSC_ConnectionHandler.ttcn:

https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn@486
PS4, Line 486:  }
> Is there any way to make such messages more informative than '1', '2', ... […]
Feel free to add more info at the end, but please keep the numbers at the 
beginnig.
The reason for the numbers is that when I search through the log, I can very 
easily see which parts happened.
e.g. if you see 1, 2, 4, 5, 7, 6, 3, you can easily figure out that 8 and 9 are 
missing. Wouldn't be that easy with prose.



--
To view, visit https://gerrit.osmocom.org/13616
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: I162985045bb5e129977a3a797b656e30220990df
Gerrit-Change-Number: 13616
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:44:47 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..

msc: mo and mt voice call tests: add lots of missing parts

Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a
voice call setup.  For example, f_mo_call_establish() used to be satisfied with
just two CRCX, but no actual RTP connections being made.

Add numerous MNCC and MGCP messages more closely resembling an actual call.

The main reason is to achieve a state that passes both current osmo-msc master
as well as the upcoming inter-MSC Handover refactoring.

Add log markers to f_*_call_*(): often when a test halts, it is not at all
clear why. With these log markers it is saner to figure out what has happened
and what hasn't.

Change-Id: I162985045bb5e129977a3a797b656e30220990df
---
M library/L3_Templates.ttcn
M library/MGCP_Templates.ttcn
M library/MNCC_Types.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
5 files changed, 231 insertions(+), 93 deletions(-)

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



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 6099303..4d71f27 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -1271,12 +1271,12 @@
 }


-template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := {
+template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid, BIT1 
tid_remote := '0'B) := {
discriminator := '0011'B,
tiOrSkip := {
transactionId := {
tio := int2bit(tid, 3),
-   tiFlag := '0'B,
+   tiFlag := tid_remote,
tIExtension := omit
}
},
diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn
index f720553..506100f 100644
--- a/library/MGCP_Templates.ttcn
+++ b/library/MGCP_Templates.ttcn
@@ -286,6 +286,22 @@
}
}

+   function f_mgcp_contains_par(MgcpMessage msg, MgcpInfoCode code) return 
boolean {
+   var MgcpParameterList pars;
+   if (ischosen(msg.command)) {
+   pars := msg.command.params;
+   } else {
+   pars := msg.response.params;
+   }
+   for (var integer i := 0; i < lengthof(pars); i := i + 1) {
+   var MgcpParameter par := pars[i];
+   if (par.code == code) {
+   return true;
+   }
+   }
+   return false;
+   }
+
function f_mgcp_extract_par(MgcpMessage msg, MgcpInfoCode code) return 
charstring {
var MgcpParameterList pars;
if (ischosen(msg.command)) {
@@ -317,6 +333,13 @@
return f_mgcp_extract_par(msg, code);
}

+   function f_MgcpCmd_contains_par(MgcpCommand cmd, MgcpInfoCode code) 
return boolean {
+   var MgcpMessage msg := {
+   command := cmd
+   }
+   return f_mgcp_contains_par(msg, code);
+   }
+
function f_MgcpResp_extract_conn_id(MgcpResponse resp) return 
MgcpConnectionId {
return str2hex(f_MgcpResp_extract_par(resp, "I"));
}
diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn
index a3714b1..f5028d2 100644
--- a/library/MNCC_Types.ttcn
+++ b/library/MNCC_Types.ttcn
@@ -1874,14 +1874,17 @@
 template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := 
ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);

 /* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side 
IP/Port) */
-template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?) := {
+template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?,
+template uint32_t ip := ?,
+template uint32_t rtp_port := ?,
+template uint32_t payload_type := ?) := {
msg_type := MNCC_RTP_CREATE,
u := {
rtp := {
callref := call_id,
-   ip := ?,
-   rtp_port := ?,
-   payload_type := ?,
+   ip := ip,
+   rtp_port := rtp_port,
+   payload_type := payload_type,
payload_msg_type := ?
}
}
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 1750bf5..44d3c6d 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -551,6 +551,8 @@
/* CC related parameters */
hexstring called_party, /* whom are we calling 
*/
integer transac

Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..


Patch Set 6:

merging now because this reaches a state where both the old osmo-msc and the 
new osmo-msc pass the tests


--
To view, visit https://gerrit.osmocom.org/13616
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: I162985045bb5e129977a3a797b656e30220990df
Gerrit-Change-Number: 13616
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:46:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..


Patch Set 6: Code-Review+2

re-adding previous +2, and deciding that vadim's comments aren't merge 
critical, no offense intended


--
To view, visit https://gerrit.osmocom.org/13616
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: I162985045bb5e129977a3a797b656e30220990df
Gerrit-Change-Number: 13616
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:45:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients

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

Change subject: hlr.c: forward GSUP messages between clients
..


Patch Set 13:

(3 comments)

https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c
File src/hlr.c:

https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c@469
PS13, Line 469: session_id
> AFAIR, libosmocore doesn't encode the OSMO_GSUP_SESSION_ID_IE if 
> gsup_msg->session_state == 0. […]
(So far none of the forwarded messages use a session id or session state.
For MAP/DIAMETER compatibility, that might be necessary/nice-to-have in the 
future though)


https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c@485
PS13, Line 485: if (!msgb_l2(msg) || !msgb_l2len(msg))
> This check is redundant and not actually needed, since we do 
> osmo_gsup_decode(msgb_l2(msg), msgb_l2l […]
I see it as an initial sanity check. If msgb_l2() is NULL, we may run into 
segfaults, if the len is 0, we should reject it. I'd rather keep this check. 
This comes from buggy code actually killing osmo-hlr, instead it should merely 
complain and continue to run.


https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c@501
PS13, Line 501: LOGP_GSUP_FWD
> Here we would see 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' as the message name, 
> because we don't store the o […]
Ok, you are saying the logging fails to log the initial message, and instead 
logs the Routing Error reply.
Nice catch.

The problem is that at this point the initial msg has already been discarded...
maybe LOG_GSUP_FWD should have a separate arg passing the original message type?



--
To view, visit https://gerrit.osmocom.org/13006
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: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5
Gerrit-Change-Number: 13006
Gerrit-PatchSet: 13
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:38:52 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file

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

Change subject: osmo-hlr: allow configuring db path from cfg file
..


Patch Set 4:

(1 comment)

(comment on earlier patch set)

https://gerrit.osmocom.org/#/c/13586/1/src/hlr.c
File src/hlr.c:

https://gerrit.osmocom.org/#/c/13586/1/src/hlr.c@739
PS1, Line 739:
> Makes sense, took me a while to understand what you mean. […]
no, can't. The g_hlr->db_file_path needs to be a talloc allocated string from 
the start.
This first populates the NULL string with a talloc string.
So we can't make this conditional.

That said, maybe you are confused by the "replace", instead I could assign a 
talloc string directly, because I know anyway that it is always NULL here.



--
To view, visit https://gerrit.osmocom.org/13586
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: I87b8673324e1e6225afb758fb4963ff3279ea3d8
Gerrit-Change-Number: 13586
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:17:00 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file

2019-05-07 Thread Neels Hofmeyr
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13586

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

Change subject: osmo-hlr: allow configuring db path from cfg file
..

osmo-hlr: allow configuring db path from cfg file

So far, the cmdline argument was the only way to set a database config file.
Add a similar config to VTY as 'hlr' / 'database'. The cmdline arg is stronger
than the 'database' cfg item. DB is not reloaded from VTY command.

Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8
---
M src/hlr.c
M src/hlr.h
M src/hlr_vty.c
M tests/test_nodes.vty
4 files changed, 25 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/86/13586/4
--
To view, visit https://gerrit.osmocom.org/13586
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: I87b8673324e1e6225afb758fb4963ff3279ea3d8
Gerrit-Change-Number: 13586
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients

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

Change subject: hlr.c: forward GSUP messages between clients
..

hlr.c: forward GSUP messages between clients

Allow clients to forward any GSUP message between clients. Determine the
sender and receiver from the new {source,dest}_name{,_len} IEs. Reject
messages with a forged source name.

This will be used for the inter-MSC handover.

Depends: Ic00b0601eacff6d72927cea51767801142ee75db (libosmocore.git)
Related: OS#3793
Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5
---
M src/hlr.c
1 file changed, 79 insertions(+), 0 deletions(-)

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



diff --git a/src/hlr.c b/src/hlr.c
index 19cfebb..8078db0 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -441,6 +441,82 @@
return osmo_gsup_conn_send(conn, msg_out);
 }

+static char namebuf[255];
+#define LOGP_GSUP_FWD(gsup, level, fmt, args ...) \
+   LOGP(DMAIN, level, "Forward %s (class=%s, IMSI=%s, %s->%s): " fmt, \
+osmo_gsup_message_type_name(gsup->message_type), \
+osmo_gsup_message_class_name(gsup->message_class), \
+gsup->imsi, \
+osmo_quote_str((const char *)gsup->source_name, 
gsup->source_name_len), \
+osmo_quote_str_buf2(namebuf, sizeof(namebuf), (const char 
*)gsup->destination_name, gsup->destination_name_len), \
+## args)
+
+static int read_cb_forward(struct osmo_gsup_conn *conn, struct msgb *msg, 
const struct osmo_gsup_message *gsup)
+{
+   int ret = -EINVAL;
+   struct osmo_gsup_message *gsup_err;
+
+   /* FIXME: it would be better if the msgb never were deallocated 
immediately by osmo_gsup_addr_send(), which a
+* select-loop volatile talloc context could facilitate. Then we would 
still be able to access gsup-> members
+* (pointing into the msgb) even after sending failed, and we wouldn't 
need to copy this data before sending: */
+   /* Prepare error message (before IEs get deallocated) */
+   gsup_err = talloc_zero(hlr_ctx, struct osmo_gsup_message);
+   OSMO_STRLCPY_ARRAY(gsup_err->imsi, gsup->imsi);
+   gsup_err->message_class = gsup->message_class;
+   gsup_err->destination_name = talloc_memdup(gsup_err, 
gsup->destination_name, gsup->destination_name_len);
+   gsup_err->destination_name_len = gsup->destination_name_len;
+   gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR;
+   gsup_err->session_id = gsup->session_id;
+   gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, 
gsup->source_name_len);
+   gsup_err->source_name_len = gsup->source_name_len;
+
+   /* Check for routing IEs */
+   if (!gsup->source_name || !gsup->source_name_len || 
!gsup->destination_name || !gsup->destination_name_len) {
+   LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing routing IEs\n");
+   goto end;
+   }
+
+   /* Verify source name (e.g. "MSC-00-00-00-00-00-00") */
+   if (gsup_route_find(conn->server, gsup->source_name, 
gsup->source_name_len) != conn) {
+   LOGP_GSUP_FWD(gsup, LOGL_ERROR, "mismatching source name\n");
+   goto end;
+   }
+
+   if (!msgb_l2(msg) || !msgb_l2len(msg)) {
+   LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing or empty l2 data\n");
+   goto end;
+   }
+
+   /* Forward message without re-encoding (so we don't remove unknown IEs) 
*/
+   LOGP_GSUP_FWD(gsup, LOGL_INFO, "checks passed, forwarding\n");
+
+   /* Remove incoming IPA header to be able to prepend an outgoing IPA 
header */
+   msgb_pull_to_l2(msg);
+   ret = osmo_gsup_addr_send(g_hlr->gs, gsup->destination_name, 
gsup->destination_name_len, msg);
+   /* AT THIS POINT, THE msg MAY BE DEALLOCATED and the data like 
gsup->imsi, gsup->source_name etc may all be
+* invalid and cause segfaults. */
+   msg = NULL;
+   gsup = NULL;
+   if (ret == -ENODEV)
+   LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not 
connected\n");
+   else if (ret)
+   LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "unknown error %i\n", ret);
+
+end:
+   /* Send error back to source */
+   if (ret) {
+   struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP 
forward ERR response");
+   OSMO_ASSERT(msg_err);
+   osmo_gsup_encode(msg_err, gsup_err);
+   LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", 
osmo_gsup_message_type_name(gsup_err->message_type));
+   osmo_gsup_conn_send(conn, msg_err);
+   }
+   talloc_free(gsup_err);
+   if (msg

Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients

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

Change subject: hlr.c: forward GSUP messages between clients
..


Patch Set 13: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13006
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: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5
Gerrit-Change-Number: 13006
Gerrit-PatchSet: 13
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 07 May 2019 13:08:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-sccp[master]: add osmo_sccp_inst_unused_conn_id()

2019-05-07 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change. ( https://gerrit.osmocom.org/13278 )

Change subject: add osmo_sccp_inst_unused_conn_id()
..


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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I6e1b4897f4143b97bf90bfd8d0ae5d50bbd2e1dd
Gerrit-Change-Number: 13278
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc

2019-05-07 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13881

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

Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc
..

gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc

Avoid deprecation warning: use gsm48_decode_bcd_number2() instead of
gsm48_decode_bcd_number().

Validate the return value and add error handling.

Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8
---
M src/libmsc/gsm_04_11.c
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/81/13881/3
--
To view, visit https://gerrit.osmocom.org/13881
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: Ibef71c46d72d2d43123e68f73e5ed554a69243d8
Gerrit-Change-Number: 13881
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


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

2019-05-07 Thread Neels Hofmeyr
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13138

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

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/13138/9
--
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: newpatchset
Gerrit-Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec
Gerrit-Change-Number: 13138
Gerrit-PatchSet: 9
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Max 


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

2019-05-07 Thread Neels Hofmeyr
/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
M tests/sms_queue/sms_queue_test.c
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,644 insertions(+), 22,989 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/9
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 9
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

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

https://gerrit.osmocom.org/13616

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..

msc: mo and mt voice call tests: add lots of missing parts

Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a
voice call setup.  For example, f_mo_call_establish() used to be satisfied with
just two CRCX, but no actual RTP connections being made.

Add numerous MNCC and MGCP messages more closely resembling an actual call.

The main reason is to achieve a state that passes both current osmo-msc master
as well as the upcoming inter-MSC Handover refactoring.

Add log markers to f_*_call_*(): often when a test halts, it is not at all
clear why. With these log markers it is saner to figure out what has happened
and what hasn't.

Change-Id: I162985045bb5e129977a3a797b656e30220990df
---
M library/L3_Templates.ttcn
M library/MGCP_Templates.ttcn
M library/MNCC_Types.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
5 files changed, 231 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/16/13616/6
--
To view, visit https://gerrit.osmocom.org/13616
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: I162985045bb5e129977a3a797b656e30220990df
Gerrit-Change-Number: 13616
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


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

2019-05-06 Thread Neels Hofmeyr
/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
M tests/sms_queue/sms_queue_test.c
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,651 insertions(+), 22,989 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/8
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 8
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-msc[master]: fix various missing line endings in logging

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

Change subject: fix various missing line endings in logging
..

fix various missing line endings in logging

Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5
---
M src/libmsc/gsm_04_11.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index da0744a..71069dc 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -425,7 +425,7 @@
/* unknown subscriber, try local */
goto try_local;
if (rc < 0) {
-   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", 
rc);
+   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: 
%d\n", rc);
rc = GSM411_RP_CAUSE_MO_TEMP_FAIL;
/* rc will be logged by gsm411_send_rp_error() */
rate_ctr_inc(>network->msc_ctrs->ctr[
@@ -451,7 +451,7 @@
if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) {

rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]);
} else if (rc < 0) {
-   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", 
rc);
+   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: 
%d\n", rc);
rc = GSM411_RP_CAUSE_MO_TEMP_FAIL;
/* rc will be logged by gsm411_send_rp_error() */
rate_ctr_inc(>network->msc_ctrs->ctr[
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 1afdbec..c6d8805 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1241,7 +1241,7 @@
  PR_ARQ_E_TMSI_ACK, NULL);
} else {
LOGVSUBP(LOGL_NOTICE, vsub,
-"gratuitous TMSI REALLOC COMPL");
+"gratuitous TMSI REALLOC COMPL\n");
return -EINVAL;
}
 }
diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c
index 3040158..fccb6d3 100644
--- a/src/libvlr/vlr_access_req_fsm.c
+++ b/src/libvlr/vlr_access_req_fsm.c
@@ -141,7 +141,7 @@
 * will start handling pending paging transactions. */

if (!fi->proc.parent) {
-   LOGPFSML(fi, LOGL_ERROR, "No parent FSM");
+   LOGPFSML(fi, LOGL_ERROR, "No parent FSM\n");
return;
}
osmo_fsm_inst_dispatch(fi->proc.parent,

--
To view, visit https://gerrit.osmocom.org/13890
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: I013eb0eeb5673c06034465020e5dc5230f45ddf5
Gerrit-Change-Number: 13890
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-msc[master]: fix various missing line endings in logging

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

Change subject: fix various missing line endings in logging
..


Patch Set 1: Code-Review+2

triviality +2


--
To view, visit https://gerrit.osmocom.org/13890
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: I013eb0eeb5673c06034465020e5dc5230f45ddf5
Gerrit-Change-Number: 13890
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 07 May 2019 00:22:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

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

Change subject: fix inter-BSC-HO-incoming for AoIP (2/2)
..

fix inter-BSC-HO-incoming for AoIP (2/2)

For AoIP, the AoIP Transport Layer Address IE must be included in the Handover
Request Acknowledge message, so the MSC can send RTP to the right place. Add
this IE for AoIP.

Depends: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 (libosmocore)
Depends: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore)
Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 31 insertions(+), 6 deletions(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 470ae42..e79a344 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 

 #define IP_V4_ADDR_LEN 4

@@ -1214,14 +1215,38 @@
 {
struct msgb *msg;
struct gsm_lchan *new_lchan = conn->ho.new_lchan;
+   struct sockaddr_storage ss;
+   struct gsm0808_handover_request_ack params = {
+   .l3_info = rr_ho_command->data,
+   .l3_info_len = rr_ho_command->len,
+   .chosen_channel_present = true,
+   .chosen_channel = gsm0808_chosen_channel(new_lchan->type, 
new_lchan->tch_mode),
+   .chosen_encr_alg = new_lchan->encr.alg_id,
+   .chosen_speech_version = 
gsm0808_permitted_speech(new_lchan->type, new_lchan->tch_mode),
+   };
+
+   if (gscon_is_aoip(conn)) {
+   struct osmo_sockaddr_str to_msc_rtp;
+   const struct mgcp_conn_peer *rtp_info = 
osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc);
+   if (!rtp_info) {
+   LOG_HO(conn, LOGL_ERROR,
+  "Handover Request Acknowledge: no RTP address 
known to send as"
+  " AoIP Transport Layer Address\n");
+   return -EINVAL;
+   }
+   if (osmo_sockaddr_str_from_str(_msc_rtp, rtp_info->addr, 
rtp_info->port)) {
+   LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: 
cannot encode AoIP Transport Layer\n");
+   return -EINVAL;
+   }
+   if (osmo_sockaddr_str_to_sockaddr(_msc_rtp, )) {
+   LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: 
cannot encode AoIP Transport Layer\n");
+   return -EINVAL;
+   }
+   params.aoip_transport_layer = 
+   }
 
LOG_HO(conn, LOGL_DEBUG, "Sending BSSMAP Handover Request 
Acknowledge\n");
-   msg = gsm0808_create_handover_request_ack(rr_ho_command->data, 
rr_ho_command->len,
- 
gsm0808_chosen_channel(new_lchan->type,
-
new_lchan->tch_mode),
- new_lchan->encr.alg_id,
- 
gsm0808_permitted_speech(new_lchan->type,
-  
new_lchan->tch_mode));
+   msg = gsm0808_create_handover_request_ack2();
msgb_free(rr_ho_command);
if (!msg)
return -ENOMEM;

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

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


Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines

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

Change subject: abis_rsl.c: missing newlines on log lines
..


Patch Set 1: Code-Review+2

triviality +2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3
Gerrit-Change-Number: 13889
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Mon, 06 May 2019 23:12:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines

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

Change subject: abis_rsl.c: missing newlines on log lines
..

abis_rsl.c: missing newlines on log lines

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

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



diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 0117435..bc07457 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1899,7 +1899,7 @@
struct gsm_lchan *lchan = msg->lchan;

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK 
message for unconfigured lchan\n");
return -EINVAL;
}

@@ -1930,7 +1930,7 @@
rate_ctr_inc(_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]);

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK 
message for unconfigured lchan\n");
return -EINVAL;
}
osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, 
LCHAN_RTP_EV_IPACC_CRCX_NACK, 0);
@@ -1944,7 +1944,7 @@
struct gsm_lchan *lchan = msg->lchan;

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK 
message for unconfigured lchan\n");
return -EINVAL;
}

@@ -1968,7 +1968,7 @@
rate_ctr_inc(_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]);

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK 
message for unconfigured lchan\n");
return -EINVAL;
}
osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, 
LCHAN_RTP_EV_IPACC_MDCX_NACK, 0);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3
Gerrit-Change-Number: 13889
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (1/2)

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

Change subject: fix inter-BSC-HO-incoming for AoIP (1/2)
..

fix inter-BSC-HO-incoming for AoIP (1/2)

Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is
done establishing. For AoIP, the local RTP address towards the MSC already
needs to be known before the Handover Request Acknowledge is sent, so the AoIP
Transport Layer Address IE can be included. This patch only modifies the
handover FSM, a subsequent patch adds the IE.

Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b
---
M include/osmocom/bsc/handover_fsm.h
M src/osmo-bsc/handover_fsm.c
2 files changed, 105 insertions(+), 86 deletions(-)

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



diff --git a/include/osmocom/bsc/handover_fsm.h 
b/include/osmocom/bsc/handover_fsm.h
index 4db0890..7c2145e 100644
--- a/include/osmocom/bsc/handover_fsm.h
+++ b/include/osmocom/bsc/handover_fsm.h
@@ -28,10 +28,10 @@
HO_ST_NOT_STARTED,

HO_ST_WAIT_LCHAN_ACTIVE,
+   HO_ST_WAIT_MGW_ENDPOINT_TO_MSC,
HO_ST_WAIT_RR_HO_DETECT,
HO_ST_WAIT_RR_HO_COMPLETE,
HO_ST_WAIT_LCHAN_ESTABLISHED,
-   HO_ST_WAIT_MGW_ENDPOINT_TO_MSC,

/* The inter-BSC Outgoing Handover FSM has completely separate states, 
but since it makes sense for it
 * to also live in conn->ho.fi, it should share the same event enum. 
From there it is merely
@@ -46,11 +46,11 @@
HO_EV_LCHAN_ACTIVE,
HO_EV_LCHAN_ESTABLISHED,
HO_EV_LCHAN_ERROR,
+   HO_EV_MSC_MGW_OK,
+   HO_EV_MSC_MGW_FAIL,
HO_EV_RR_HO_DETECT,
HO_EV_RR_HO_COMPLETE,
HO_EV_RR_HO_FAIL,
-   HO_EV_MSC_MGW_OK,
-   HO_EV_MSC_MGW_FAIL,
HO_EV_CONN_RELEASING,

HO_OUT_EV_BSSMAP_HO_COMMAND,
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index c044407..442f7be 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -162,10 +162,10 @@

 static const struct osmo_tdef_state_timeout ho_fsm_timeouts[32] = {
[HO_ST_WAIT_LCHAN_ACTIVE] = { .T = 23042 },
+   [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 },
[HO_ST_WAIT_RR_HO_DETECT] = { .T = 23042 },
[HO_ST_WAIT_RR_HO_COMPLETE] = { .T = 23042 },
[HO_ST_WAIT_LCHAN_ESTABLISHED] = { .T = 23042 },
-   [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 },
[HO_OUT_ST_WAIT_HO_COMMAND] = { .T = 7 },
[HO_OUT_ST_WAIT_CLEAR] = { .T = 8 },
 };
@@ -878,10 +878,24 @@
 static void ho_fsm_wait_lchan_active(struct osmo_fsm_inst *fi, uint32_t event, 
void *data)
 {
struct gsm_subscriber_connection *conn = ho_fi_conn(fi);
+   struct handover *ho = >ho;
switch (event) {

case HO_EV_LCHAN_ACTIVE:
-   ho_fsm_state_chg(HO_ST_WAIT_RR_HO_DETECT);
+   /* - If the lchan is voiceless, no need to even think about the 
MGW.
+* - If this is an intra-BSC Handover, we already have an RTP 
stream towards the MSC and aren't
+*   touching it.
+* - If we're on SCCPlite, the MSC manages the MGW endpoint, 
all we do is the BTS side CI, so we can
+*   skip the part that would CRCX towards the MSC.
+* So create an MSC side endpoint CI only if a voice lchan is 
established for an incoming inter-BSC
+* handover on AoIP. Otherwise go on to send a Handover Command 
and wait for the Detect.
+*/
+   if (ho->new_lchan->activate.info.requires_voice_stream
+   && (ho->scope & HO_INTER_BSC_IN)
+   && gscon_is_aoip(conn))
+   ho_fsm_state_chg(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC);
+   else
+   ho_fsm_state_chg(HO_ST_WAIT_RR_HO_DETECT);
return;

case HO_EV_LCHAN_ERROR:
@@ -894,6 +908,75 @@
}
 }

+/* Only for voice, only for inter-BSC Handover into this BSC, and only for 
AoIP:
+ *
+ * Establish the MGW endpoint CI that points towards the MSC. This needs to 
happen after the lchan (lchan_rtp_fsm) has
+ * created an MGW endpoint with the first CRCX, so that an endpoint is 
available, and before sending the Handover
+ * Request Acknowledge, so that the RTP address and port established towards 
the MSC can be included in the Handover
+ * Request Acknowledge message.
+ * (For SCCPlite, the MSC manages the CN side endpoint CI itself, and we don't 
need to send any RTP address in the
+ * Handover Request Acknowledge.)
+ *
+ * Actually, it should be possible to kick this off even above in 
handover_start_inter_bsc_in(), to do the CRCX towards
+ * the MSC at the same time as establishing the lchan. The 
gscon_ensure_mgw_endpoint() doesn't care which one of
+ * lchan_rtp_fsm or handover_start_inter_bsc_in()

Change in osmo-ttcn3-hacks[master]: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup

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


Change subject: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup
..

bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup

Randomly, this test issues the Clear Command so fast that the MGW has not yet
been set up, and hence the test cannot possibly see DLCX for endpoint conns
that haven't been set up at all. So, simply wait a bit before clearing.

Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3
---
M bsc/BSC_Tests.ttcn
1 file changed, 3 insertions(+), 0 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index fb43d5e..0583b30 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3195,6 +3195,9 @@
}
log("Handover Command chan_nr is", actual_new_chan_nr);

+   /* For deterministic test results, give some time for the MGW endpoint 
to be configured */
+   f_sleep(1.0);
+
/* Now the MSC forwards the RR Handover Command to the other BSC, which
 * tells the MS to handover to the new lchan. In this case, the MS
 * reports a Handover Failure to the old BSS, which forwards a BSSMAP

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3
Gerrit-Change-Number: 13891
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: fix various missing line endings in logging

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


Change subject: fix various missing line endings in logging
..

fix various missing line endings in logging

Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5
---
M src/libmsc/gsm_04_11.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
3 files changed, 4 insertions(+), 4 deletions(-)



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

diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index da0744a..71069dc 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -425,7 +425,7 @@
/* unknown subscriber, try local */
goto try_local;
if (rc < 0) {
-   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", 
rc);
+   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: 
%d\n", rc);
rc = GSM411_RP_CAUSE_MO_TEMP_FAIL;
/* rc will be logged by gsm411_send_rp_error() */
rate_ctr_inc(>network->msc_ctrs->ctr[
@@ -451,7 +451,7 @@
if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) {

rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]);
} else if (rc < 0) {
-   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", 
rc);
+   LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: 
%d\n", rc);
rc = GSM411_RP_CAUSE_MO_TEMP_FAIL;
/* rc will be logged by gsm411_send_rp_error() */
rate_ctr_inc(>network->msc_ctrs->ctr[
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 1afdbec..c6d8805 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1241,7 +1241,7 @@
  PR_ARQ_E_TMSI_ACK, NULL);
} else {
LOGVSUBP(LOGL_NOTICE, vsub,
-"gratuitous TMSI REALLOC COMPL");
+"gratuitous TMSI REALLOC COMPL\n");
return -EINVAL;
}
 }
diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c
index 3040158..fccb6d3 100644
--- a/src/libvlr/vlr_access_req_fsm.c
+++ b/src/libvlr/vlr_access_req_fsm.c
@@ -141,7 +141,7 @@
 * will start handling pending paging transactions. */

if (!fi->proc.parent) {
-   LOGPFSML(fi, LOGL_ERROR, "No parent FSM");
+   LOGPFSML(fi, LOGL_ERROR, "No parent FSM\n");
return;
}
osmo_fsm_inst_dispatch(fi->proc.parent,

--
To view, visit https://gerrit.osmocom.org/13890
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: I013eb0eeb5673c06034465020e5dc5230f45ddf5
Gerrit-Change-Number: 13890
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (1/2)

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

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

https://gerrit.osmocom.org/13797

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

Change subject: fix inter-BSC-HO-incoming for AoIP (1/2)
..

fix inter-BSC-HO-incoming for AoIP (1/2)

Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is
done establishing. For AoIP, the local RTP address towards the MSC already
needs to be known before the Handover Request Acknowledge is sent, so the AoIP
Transport Layer Address IE can be included. This patch only modifies the
handover FSM, a subsequent patch adds the IE.

Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b
---
M include/osmocom/bsc/handover_fsm.h
M src/osmo-bsc/handover_fsm.c
2 files changed, 105 insertions(+), 86 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b
Gerrit-Change-Number: 13797
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines

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


Change subject: abis_rsl.c: missing newlines on log lines
..

abis_rsl.c: missing newlines on log lines

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



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

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 0117435..bc07457 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1899,7 +1899,7 @@
struct gsm_lchan *lchan = msg->lchan;

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK 
message for unconfigured lchan\n");
return -EINVAL;
}

@@ -1930,7 +1930,7 @@
rate_ctr_inc(_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]);

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK 
message for unconfigured lchan\n");
return -EINVAL;
}
osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, 
LCHAN_RTP_EV_IPACC_CRCX_NACK, 0);
@@ -1944,7 +1944,7 @@
struct gsm_lchan *lchan = msg->lchan;

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK 
message for unconfigured lchan\n");
return -EINVAL;
}

@@ -1968,7 +1968,7 @@
rate_ctr_inc(_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]);

if (!lchan->fi_rtp) {
-   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK 
message for unconfigured lchan");
+   LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK 
message for unconfigured lchan\n");
return -EINVAL;
}
osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, 
LCHAN_RTP_EV_IPACC_MDCX_NACK, 0);

-- 
To view, visit https://gerrit.osmocom.org/13889
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: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3
Gerrit-Change-Number: 13889
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

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

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

https://gerrit.osmocom.org/13585

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

Change subject: fix inter-BSC-HO-incoming for AoIP (2/2)
..

fix inter-BSC-HO-incoming for AoIP (2/2)

For AoIP, the AoIP Transport Layer Address IE must be included in the Handover
Request Acknowledge message, so the MSC can send RTP to the right place. Add
this IE for AoIP.

Depends: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 (libosmocore)
Depends: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore)
Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 31 insertions(+), 6 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts

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

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

https://gerrit.osmocom.org/13616

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

Change subject: msc: mo and mt voice call tests: add lots of missing parts
..

msc: mo and mt voice call tests: add lots of missing parts

Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a
voice call setup.  For example, f_mo_call_establish() used to be satisfied with
just two CRCX, but no actual RTP connections being made.

Add numerous MNCC and MGCP messages more closely resembling an actual call.

The main reason is to achieve a state that passes both current osmo-msc master
as well as the upcoming inter-MSC Handover refactoring.

Add log markers to f_*_call_*(): often when a test halts, it is not at all
clear why. With these log markers it is saner to figure out what has happened
and what hasn't.

Change-Id: I162985045bb5e129977a3a797b656e30220990df
---
M library/L3_Templates.ttcn
M library/MGCP_Templates.ttcn
M library/MNCC_Types.ttcn
M library/RAN_Emulation.ttcnpp
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
6 files changed, 243 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/16/13616/5
--
To view, visit https://gerrit.osmocom.org/13616
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: I162985045bb5e129977a3a797b656e30220990df
Gerrit-Change-Number: 13616
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc

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


Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc
..

gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc

Avoid deprecation warning: use gsm48_decode_bcd_number2() instead of
gsm48_decode_bcd_number().

Validate the return value and add error handling.

Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8
---
M src/libmsc/gsm_04_11.c
1 file changed, 6 insertions(+), 2 deletions(-)



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

diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 8cbed3e..577a13a 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -508,8 +508,12 @@
gsms->dst.ton = (address_lv[1] >> 4) & 7;
gsms->dst.npi = address_lv[1] & 0xF;
/* convert to real number */
-   gsm48_decode_bcd_number(gsms->dst.addr,
-   sizeof(gsms->dst.addr), address_lv, 1);
+   if (gsm48_decode_bcd_number2(gsms->dst.addr,
+sizeof(gsms->dst.addr), address_lv, 
da_len_bytes, 1)) {
+   LOG_TRANS(trans, LOGL_ERROR, "Failed to decode destination 
Address\n");
+   rc = GSM411_RP_CAUSE_SEMANT_INC_MSG;
+   goto out;
+   }
smsp += da_len_bytes;

gsms->protocol_id = *smsp++;

--
To view, visit https://gerrit.osmocom.org/13881
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: Ibef71c46d72d2d43123e68f73e5ed554a69243d8
Gerrit-Change-Number: 13881
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


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

2019-05-05 Thread Neels Hofmeyr
/ran_peer.h
A include/osmocom/msc/rtp_stream.h
A include/osmocom/msc/sccp_ran.h
M include/osmocom/msc/sgs_iface.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M include/osmocom/msc/vlr_sgs.h
M src/libmsc/Makefile.am
D src/libmsc/a_iface.c
D src/libmsc/a_iface_bssap.c
D src/libmsc/a_reset.c
A src/libmsc/call_leg.c
A src/libmsc/cell_id_list.c
A src/libmsc/e_link.c
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_11_gsup.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
D src/libmsc/gsm_subscriber.c
A src/libmsc/gsup_client_mux.c
D src/libmsc/iu_dummy.c
D src/libmsc/iucs.c
D src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
A src/libmsc/mncc_call.c
M src/libmsc/mncc_sock.c
A src/libmsc/msc_a.c
A src/libmsc/msc_a_remote.c
A src/libmsc/msc_ho.c
A src/libmsc/msc_i.c
A src/libmsc/msc_i_remote.c
D src/libmsc/msc_ifaces.c
D src/libmsc/msc_mgcp.c
A src/libmsc/msc_net_init.c
A src/libmsc/msc_t.c
A src/libmsc/msc_t_remote.c
M src/libmsc/msc_vty.c
A src/libmsc/msub.c
A src/libmsc/neighbor_ident.c
A src/libmsc/neighbor_ident_vty.c
D src/libmsc/osmo_msc.c
A src/libmsc/paging.c
M src/libmsc/ran_conn.c
A src/libmsc/ran_infra.c
A src/libmsc/ran_msg.c
A src/libmsc/ran_msg_a.c
A src/libmsc/ran_msg_iu.c
A src/libmsc/ran_peer.c
A src/libmsc/ran_up_l2.c
M src/libmsc/rrlp.c
A src/libmsc/rtp_stream.c
A src/libmsc/sccp_ran.c
M src/libmsc/sgs_iface.c
M src/libmsc/sgs_server.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/libvlr/vlr_sgs.c
M src/libvlr/vlr_sgs_fsm.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.c
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/sms_queue/Makefile.am
M tests/sms_queue/sms_queue_test.c
A tests/test_neighbor_ident.vty
M tests/test_nodes.vty
151 files changed, 35,651 insertions(+), 22,989 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/7
--
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: newpatchset
Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd
Gerrit-Change-Number: 13137
Gerrit-PatchSet: 7
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 


Change in libosmocore[master]: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr

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

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

https://gerrit.osmocom.org/13259

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

Change subject: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr
..

add gsm0808_create_handover_request_ack2 to add AoIP RTP addr

osmo-bsc so far omits the AoIP Transport Layer Address from its Handover
Request Acknowledge message, which breaks inter-BSC Handover for AoIP.
Allow fixing that.

One quirk I really don't like about this: I would prefer to directly use struct
sockaddr_storage as a member of the struct gsm0808_handover_request_ack. Even
though struct sockaddr_storage appears in various function signatures, the
gsm0808.c actually also gets built on embedded systems that lack arpa/inet.h
(for me indicated by the ARM build job on jenkins). Compiling gsm0808.c works
only because the actual coding of struct sockaddr_storage is implemented in
gsm0808_util.c, which (apparently) does not get built on embedded and hence,
even though there are undefined references to e.g.
gsm0808_enc_aoip_trasp_addr() it works.

Related: I4a5acdb2d4a0b947cc0c62067a67be88a3d467ff (osmo-bsc)
Change-Id: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
M src/gsm/libosmogsm.map
3 files changed, 60 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/13259/12
--
To view, visit https://gerrit.osmocom.org/13259
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: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576
Gerrit-Change-Number: 13259
Gerrit-PatchSet: 12
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in libosmocore[master]: BSSMAP: add messages for inter-BSC and inter-MSC Handover

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

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

https://gerrit.osmocom.org/13578

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

Change subject: BSSMAP: add messages for inter-BSC and inter-MSC Handover
..

BSSMAP: add messages for inter-BSC and inter-MSC Handover

Change-Id: I9dac375331f6bea744769e973725d58e35f87226
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
M src/gsm/libosmogsm.map
3 files changed, 241 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/13578/4
--
To view, visit https://gerrit.osmocom.org/13578
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: I9dac375331f6bea744769e973725d58e35f87226
Gerrit-Change-Number: 13578
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: assignment_fsm: Properly support assigning signalling mode TCH/x

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

Change subject: assignment_fsm: Properly support assigning signalling mode TCH/x
..


Patch Set 1:

we see the build error from a preceding patch on the branch which depends on 
libosmocore changes. I could re-arrange the ordering...


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d
Gerrit-Change-Number: 13818
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Fri, 03 May 2019 14:10:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr

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

Change subject: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr
..


Patch Set 11:

ping


--
To view, visit https://gerrit.osmocom.org/13259
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: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576
Gerrit-Change-Number: 13259
Gerrit-PatchSet: 11
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 03 May 2019 14:06:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: move mgw endpoint FSM to osmo-mgw.git

2019-04-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13796

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

Change subject: move mgw endpoint FSM to osmo-mgw.git
..

move mgw endpoint FSM to osmo-mgw.git

osmo-mgw.git also includes fixes of the MGW endpoint FSM, for example
I92a9944acc96398acd6649f9c3c5badec5dd6dcc.

Depends: I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw)
Change-Id: I03e6b48d9b0a5370310d5f56809259ff7909cf9d
---
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/bsc_subscr_conn_fsm.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/lchan_rtp_fsm.h
D include/osmocom/bsc/mgw_endpoint_fsm.h
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/codec_pref.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
D src/osmo-bsc/mgw_endpoint_fsm.c
M src/osmo-bsc/net_init.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_lcls.c
M src/osmo-bsc/osmo_bsc_main.c
M tests/handover/Makefile.am
M tests/handover/handover_test.c
20 files changed, 187 insertions(+), 939 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I03e6b48d9b0a5370310d5f56809259ff7909cf9d
Gerrit-Change-Number: 13796
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: assignment_fsm: Properly support assigning signalling mode TCH/x

2019-04-29 Thread Neels Hofmeyr
e = CH_RATE_HALF;
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL;
+   break;
+   case GSM0808_SIGN_SDCCH:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH;
+   break;
+   case GSM0808_SIGN_SDCCH_FULL_BM:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH;
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL;
+   break;
+   case GSM0808_SIGN_SDCCH_HALF_LM:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH;
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF;
+   break;
+   case GSM0808_SIGN_FULL_BM:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL;
+   break;
+   case GSM0808_SIGN_HALF_LM:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF;
+   break;
+   case GSM0808_SIGN_FULL_PREF:
+   case GSM0808_SIGN_FULL_PREF_NO_CHANGE:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL;
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF;
+   break;
+   case GSM0808_SIGN_HALF_PREF:
+   case GSM0808_SIGN_HALF_PREF_NO_CHANGE:
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF;
+   req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL;
+   break;
+   default:
+   break;
+   }
+
+   for (i = 0; i < nc; i++)
+   req->ch_mode_rate[i].chan_mode = GSM48_CMODE_SIGN;
+
+   req->n_ch_mode_rate = nc;
+
+   return nc > 0 ? 0 : -EINVAL;
+}
+
 /*
  * Handle the assignment request message.
  *
@@ -730,7 +758,6 @@
uint8_t cause;
int rc;
struct assignment_request req = {};
-   struct channel_mode_and_rate ch_mode_rate_pref = {};

if (!conn) {
LOGP(DMSC, LOGL_ERROR,
@@ -851,14 +878,15 @@
}
break;
case GSM0808_CHAN_SIGN:
-   ch_mode_rate_pref = (struct channel_mode_and_rate) {
-   .chan_mode = GSM48_CMODE_SIGN,
-   };
-
req = (struct assignment_request){
.aoip = aoip,
-   .ch_mode_rate_pref = ch_mode_rate_pref,
};
+
+   rc = select_sign_chan(, );
+   if (rc < 0) {
+   cause = GSM0808_CAUSE_INCORRECT_VALUE;
+   goto reject;
+   }
break;
default:
cause = GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS;
diff --git a/tests/codec_pref/codec_pref_test.c 
b/tests/codec_pref/codec_pref_test.c
index bb5468a..ce82f3d 100644
--- a/tests/codec_pref/codec_pref_test.c
+++ b/tests/codec_pref/codec_pref_test.c
@@ -407,7 +407,7 @@

rc = match_codec_pref(_mode_rate, ct, scl, msc, bts, RATE_PREF_NONE);
printf(" * result: rc=%i, full_rate=%i, s15_s0=%04x, chan_mode=%s\n",
-  rc, ch_mode_rate.full_rate, ch_mode_rate.s15_s0, 
gsm48_chan_mode_name(ch_mode_rate.chan_mode));
+  rc, ch_mode_rate.chan_rate == CH_RATE_FULL, ch_mode_rate.s15_s0, 
gsm48_chan_mode_name(ch_mode_rate.chan_mode));

printf("\n");


--
To view, visit https://gerrit.osmocom.org/13818
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: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d
Gerrit-Change-Number: 13818
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: tnt 


Change in libosmocore[master]: osmo_gsup_decode(): properly check IMSI, avoid deprecation

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13817


Change subject: osmo_gsup_decode(): properly check IMSI, avoid deprecation
..

osmo_gsup_decode(): properly check IMSI, avoid deprecation

In osmo_gsup_decode(), call gsm48_decode_bcd_number2() to avoid deprecation
warning, and also actually check the return value to detect invalid IMSI IEs.

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



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/13817/1

diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index a3d9eef..2e6690e 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -332,9 +332,11 @@
 * before the value part already contains this length so we can use it
 * here.
 */
-   OSMO_ASSERT(value[-1] == value_len);
-   gsm48_decode_bcd_number(gsup_msg->imsi, sizeof(gsup_msg->imsi),
-   value - 1, 0);
+   if (gsm48_decode_bcd_number2(gsup_msg->imsi, sizeof(gsup_msg->imsi),
+value - 1, value_len + 1, 0)) {
+   LOGP(DLGSUP, LOGL_ERROR, "Cannot decode IMSI\n");
+   return -GMM_CAUSE_INV_MAND_INFO;
+   }

/* specific parts */
while (data_len > 0) {

--
To view, visit https://gerrit.osmocom.org/13817
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: Iaded84d91baad5386c8f353c283b6b9e40a43b05
Gerrit-Change-Number: 13817
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in libosmocore[master]: add comment to gsm_mncc_bearer_cap.speech_ver

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13814


Change subject: add comment to gsm_mncc_bearer_cap.speech_ver
..

add comment to gsm_mncc_bearer_cap.speech_ver

Change-Id: Ib657b1eb55aab400f3682a89bbd428bdee02581c
---
M include/osmocom/gsm/mncc.h
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/13814/1

diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 7e7d12c..e5e9607 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -15,7 +15,7 @@
int coding; /* Coding Standard */
int radio;  /* Radio Channel Requirement */
int speech_ctm; /* CTM text telephony indication */
-   int speech_ver[8];  /* Speech version indication */
+   int speech_ver[8];  /* Speech version indication, see enum 
gsm48_bcap_speech_ver; -1 marks end */
struct {
enum gsm48_bcap_ra  rate_adaption;
enum gsm48_bcap_sig_access  sig_access;

--
To view, visit https://gerrit.osmocom.org/13814
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: Ib657b1eb55aab400f3682a89bbd428bdee02581c
Gerrit-Change-Number: 13814
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in libosmocore[master]: gsm48_decode_bcd_number2(): allow avoiding deprecation

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13816


Change subject: gsm48_decode_bcd_number2(): allow avoiding deprecation
..

gsm48_decode_bcd_number2(): allow avoiding deprecation

gsm48_decode_bcd_number() is marked as deprecated, so
gsm48_decode_bcd_number2() will cause deprecation warnings as long as it calls
gsm48_decode_bcd_number(). Hence move the code to gsm48_decode_bcd_number2().

Change-Id: I81925e9afb3451de9b8a268d482f79ee20ca14d6
---
M src/gsm/gsm48_ie.c
1 file changed, 29 insertions(+), 27 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/13816/1

diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index 0e5f253..ca6489a 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -55,7 +55,36 @@
const uint8_t *bcd_lv, int h_len)
 {
uint8_t in_len = bcd_lv[0];
+   /* Just assume the input buffer is big enough for the length byte and 
the following data, so pass in_len + 1 for
+* the input buffer size. */
+   return gsm48_decode_bcd_number2(output, output_len, bcd_lv, in_len + 1, 
h_len);
+}
+
+/*! Decode a 'called/calling/connect party BCD number' as in 10.5.4.7.
+ * \param[out] output  Caller-provided output buffer.
+ * \param[in] output_len  sizeof(output).
+ * \param[in] bcd_lv  Length-Value part of to-be-decoded IE.
+ * \param[in] input_len  Size of the bcd_lv buffer for bounds checking.
+ * \param[in] h_len  Length of an optional header between L and V parts.
+ * \return 0 in case of success, negative on error. Errors checked: no or too 
little input data, no or too little
+ * output buffer size, IE length exceeds input data size, decoded number 
exceeds size of the output buffer. The output
+ * is guaranteed to be nul terminated iff output_len > 0.
+ */
+int gsm48_decode_bcd_number2(char *output, size_t output_len,
+const uint8_t *bcd_lv, size_t input_len,
+size_t h_len)
+{
+   uint8_t in_len;
int i;
+   if (output_len < 1)
+   return -ENOSPC;
+   *output = '\0';
+   if (input_len < 1)
+   return -EIO;
+   in_len = bcd_lv[0];
+   /* len + 1: the BCD length plus the length byte itself must fit in the 
input buffer. */
+   if (input_len < in_len + 1)
+   return -EIO;

for (i = 1 + h_len; i <= in_len; i++) {
/* lower nibble */
@@ -76,33 +105,6 @@
return 0;
 }

-/*! Decode a 'called/calling/connect party BCD number' as in 10.5.4.7.
- * \param[out] output  Caller-provided output buffer.
- * \param[in] output_len  sizeof(output).
- * \param[in] bcd_lv  Length-Value part of to-be-decoded IE.
- * \param[in] input_len  Size of the bcd_lv buffer for bounds checking.
- * \param[in] h_len  Length of an optional header between L and V parts.
- * \return 0 in case of success, negative on error. Errors checked: no or too 
little input data, no or too little
- * output buffer size, IE length exceeds input data size, decoded number 
exceeds size of the output buffer. The output
- * is guaranteed to be nul terminated iff output_len > 0.
- */
-int gsm48_decode_bcd_number2(char *output, size_t output_len,
-const uint8_t *bcd_lv, size_t input_len,
-size_t h_len)
-{
-   uint8_t len;
-   if (output_len < 1)
-   return -ENOSPC;
-   *output = '\0';
-   if (input_len < 1)
-   return -EIO;
-   len = bcd_lv[0];
-   /* len + 1: the BCD length plus the length byte itself must fit in the 
input buffer. */
-   if (input_len < len + 1)
-   return -EIO;
-   return gsm48_decode_bcd_number(output, output_len, bcd_lv, h_len);
-}
-
 /*! convert a single ASCII character to call-control BCD */
 static int asc_to_bcd(const char asc)
 {

--
To view, visit https://gerrit.osmocom.org/13816
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: I81925e9afb3451de9b8a268d482f79ee20ca14d6
Gerrit-Change-Number: 13816
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix input len check

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13815


Change subject: gsm48_decode_bcd_number2(): fix input len check
..

gsm48_decode_bcd_number2(): fix input len check

The input_len argument for gsm48_decode_bcd_number2() includes the BCD length
*and* the length byte itself, so add the missing +1.

Also clarify the API doc for the input_len argument.

Change-Id: I87599641325c04aae2be224ec350b1a145039528
---
M src/gsm/gsm48_ie.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/13815/1

diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index 049f5dc..0e5f253 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -80,7 +80,7 @@
  * \param[out] output  Caller-provided output buffer.
  * \param[in] output_len  sizeof(output).
  * \param[in] bcd_lv  Length-Value part of to-be-decoded IE.
- * \param[in] input_len  Size of the buffer to read the IE from.
+ * \param[in] input_len  Size of the bcd_lv buffer for bounds checking.
  * \param[in] h_len  Length of an optional header between L and V parts.
  * \return 0 in case of success, negative on error. Errors checked: no or too 
little input data, no or too little
  * output buffer size, IE length exceeds input data size, decoded number 
exceeds size of the output buffer. The output
@@ -97,7 +97,8 @@
if (input_len < 1)
return -EIO;
len = bcd_lv[0];
-   if (input_len < len)
+   /* len + 1: the BCD length plus the length byte itself must fit in the 
input buffer. */
+   if (input_len < len + 1)
return -EIO;
return gsm48_decode_bcd_number(output, output_len, bcd_lv, h_len);
 }

--
To view, visit https://gerrit.osmocom.org/13815
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: I87599641325c04aae2be224ec350b1a145039528
Gerrit-Change-Number: 13815
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-mgw[master]: constify map_codec_to_pt() ptmap arg

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13813


Change subject: constify map_codec_to_pt() ptmap arg
..

constify map_codec_to_pt() ptmap arg

Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
---
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
2 files changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index ac3e2b1..9b57f10 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -154,7 +154,7 @@
 }

 enum mgcp_codecs map_str_to_codec(const char *str);
-unsigned int map_codec_to_pt(struct ptmap *ptmap, unsigned int ptmap_len,
+unsigned int map_codec_to_pt(const struct ptmap *ptmap, unsigned int ptmap_len,
 enum mgcp_codecs codec);
 enum mgcp_codecs map_pt_to_codec(struct ptmap *ptmap, unsigned int ptmap_len,
 unsigned int pt);
diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 2dcab62..c28f5d2 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -93,7 +93,7 @@
 }

 /* Check the ptmap for illegal mappings */
-static int check_ptmap(struct ptmap *ptmap)
+static int check_ptmap(const struct ptmap *ptmap)
 {
/* Check if there are mappings that leave the IANA assigned dynamic
 * payload type range. Under normal conditions such mappings should
@@ -122,7 +122,7 @@
  *  \ptmap[in] ptmap_len length of the payload type map.
  *  \ptmap[in] codec the codec for which the payload type should be looked up.
  *  \returns assigned payload type */
-unsigned int map_codec_to_pt(struct ptmap *ptmap, unsigned int ptmap_len,
+unsigned int map_codec_to_pt(const struct ptmap *ptmap, unsigned int ptmap_len,
 enum mgcp_codecs codec)
 {
unsigned int i;

--
To view, visit https://gerrit.osmocom.org/13813
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: I030843d2d692b7a73cca8f427df070d2806ab695
Gerrit-Change-Number: 13813
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-mgw[master]: move MGW endpoint FSM from osmo-bsc to here

2019-04-29 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13590

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

Change subject: move MGW endpoint FSM from osmo-bsc to here
..

move MGW endpoint FSM from osmo-bsc to here

Move mgw_endpoint_fsm from osmo-bsc here as osmo_mgcpc_ep_fsm. Apply various
renames for consistency. Use osmo_tdef from libosmocore instead of osmo-bsc's
(so far) local T_defs API.

Change T23042 to T2427001, which is a slightly less arbitrary number and
slightly more extendable in the future (2427 corresponds to the default MGCP
port at osmo-mgw, 001 is the first MGCP timer and so far the only one).

Change-Id: I9a3effd38e72841529df6c135c077116981dea36
---
M include/Makefile.am
A include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
M include/osmocom/mgcp_client/mgcp_client_fsm.h
M src/libosmo-mgcp-client/Makefile.am
A src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
M src/libosmo-mgcp-client/mgcp_client_fsm.c
6 files changed, 866 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9a3effd38e72841529df6c135c077116981dea36
Gerrit-Change-Number: 13590
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


  1   2   3   4   5   6   7   8   9   10   >