Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Stefan Sperling
Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 160 insertions(+), 129 deletions(-)

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



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 63af3e7..d2511cb 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -212,6 +212,12 @@
/* MSISDN to which to route MO emergency calls */
char *route_to_msisdn;
} emergency;
+
+   /* This is transmitted as IPA Serial Number tag, which is used for GSUP 
routing (e.g. in OsmoHLR).
+ * For inter-MSC handover, the remote MSC's neighbor configuration 
requires to match this name.
+* If no name is set, the IPA Serial Number will be the same as the 
Unit Name,
+* and will be of the form 'MSC-00-00-00-00-00-00' */
+   char *msc_ipa_name;
 };

 struct osmo_esme;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index c0e4864..68e0759 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -312,7 +313,7 @@
 int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub);

 struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops);
-int vlr_start(const char *gsup_unit_name, struct vlr_instance *vlr,
+int vlr_start(struct ipaccess_unit *ipa_dev, struct vlr_instance *vlr,
  const char *gsup_server_addr_str, uint16_t gsup_server_port);

 /* internal use only */
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 95c3183..7fe2c50 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1828,9 +1828,15 @@
 /* Launch the VLR, i.e. its GSUP connection */
 int msc_vlr_start(struct gsm_network *net)
 {
+   struct ipaccess_unit *ipa_dev;
+
OSMO_ASSERT(net->vlr);
-   return vlr_start("MSC", net->vlr, net->gsup_server_addr_str,
-net->gsup_server_port);
+
+   ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
+   ipa_dev->unit_name = "MSC";
+   ipa_dev->serno = net->msc_ipa_name; /* NULL unless configured via VTY */
+
+   return vlr_start(ipa_dev, net->vlr, net->gsup_server_addr_str, 
net->gsup_server_port);
 }

 struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value)
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index e1d1b40..06e1139 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -458,6 +458,18 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_msc_ipa_name,
+  cfg_msc_ipa_name_cmd,
+  "ipa-name NAME",
+  "Set the IPA name of this MSC\n"
+  "A unique name for this MSC. For example: PLMN + redundancy server 
number: MSC-901-70-0. "
+  "This name is used for GSUP routing and must be set if more than one MSC 
is connected to the HLR. "
+  "The default is 'MSC-00-00-00-00-00-00'.\n")
+{
+   gsmnet->msc_ipa_name = talloc_strdup(gsmnet, argv[0]);
+   return CMD_SUCCESS;
+}
+
 static int config_write_msc(struct vty *vty)
 {
vty_out(vty, "msc%s", VTY_NEWLINE);
@@ -491,6 +503,9 @@
gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);
}

+   if (gsmnet->msc_ipa_name)
+   vty_out(vty, " ipa-name %s%s", gsmnet->msc_ipa_name, 
VTY_NEWLINE);
+
mgcp_client_config_write(vty, " ");
 #ifdef BUILD_IU
ranap_iu_vty_config_write(vty, " ");
@@ -1483,6 +1498,7 @@
install_element(MSC_NODE, _msc_cs7_instance_iu_cmd);
install_element(MSC_NODE, _msc_paging_response_timer_cmd);
install_element(MSC_NODE, _msc_emergency_msisdn_cmd);
+   install_element(MSC_NODE, _msc_ipa_name_cmd);

mgcp_client_vty_init(msc_network, MSC_NODE, _network->mgw.conf);
 

Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 8: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 8
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:51:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Stefan Sperling
Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 160 insertions(+), 129 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/12177/8
--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 8
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 7:

(2 comments)

https://gerrit.osmocom.org/#/c/12177/6/src/libvlr/vlr.c
File src/libvlr/vlr.c:

https://gerrit.osmocom.org/#/c/12177/6/src/libvlr/vlr.c@1217
PS6, Line 1217:   const char *gsup_server_addr_str, uint16_t 
gsup_server_port)
> (still got the space indent here from the earlier patch set)
Fixed in next patch set.


https://gerrit.osmocom.org/#/c/12177/6/tests/msc_vlr/msc_vlr_tests.c
File tests/msc_vlr/msc_vlr_tests.c:

https://gerrit.osmocom.org/#/c/12177/6/tests/msc_vlr/msc_vlr_tests.c@556
PS6, Line 556:  struct osmo_oap_client_config 
*oap_config)
> (for some reason gerrit shows indenting changes above?) […]
Fixed in next patch set.



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:30:51 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Stefan Sperling
Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 159 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/12177/7
--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 6: Code-Review+2

(2 comments)

nice! maybe fix that space first

https://gerrit.osmocom.org/#/c/12177/6/src/libvlr/vlr.c
File src/libvlr/vlr.c:

https://gerrit.osmocom.org/#/c/12177/6/src/libvlr/vlr.c@1217
PS6, Line 1217:const char *gsup_server_addr_str, uint16_t 
gsup_server_port)
(still got the space indent here from the earlier patch set)


https://gerrit.osmocom.org/#/c/12177/6/tests/msc_vlr/msc_vlr_tests.c
File tests/msc_vlr/msc_vlr_tests.c:

https://gerrit.osmocom.org/#/c/12177/6/tests/msc_vlr/msc_vlr_tests.c@556
PS6, Line 556:struct osmo_oap_client_config *oap_config)
(for some reason gerrit shows indenting changes above?)

(when I wrote this, it should have lined up with '(' ... we could fix that now)



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 10:59:49 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 5
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 10 Dec 2018 17:00:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-10 Thread Stefan Sperling
Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 159 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/12177/5
--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 5
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 4: Code-Review+1

(3 comments)

https://gerrit.osmocom.org/#/c/12177/4/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/12177/4/src/libmsc/msc_vty.c@464
PS4, Line 464: .
Usually, we don't use dots in VTY, in particular for a single sentence.


https://gerrit.osmocom.org/#/c/12177/4/src/libvlr/vlr.c
File src/libvlr/vlr.c:

https://gerrit.osmocom.org/#/c/12177/4/src/libvlr/vlr.c@1225
PS4, Line 1225:
Unrelated ws.


https://gerrit.osmocom.org/#/c/12177/4/tests/msc_vlr/msc_vlr_tests.c
File tests/msc_vlr/msc_vlr_tests.c:

https://gerrit.osmocom.org/#/c/12177/4/tests/msc_vlr/msc_vlr_tests.c@564
PS4, Line 564:
ws



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 10 Dec 2018 16:08:16 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-07 Thread Stefan Sperling
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 161 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/12177/4
--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-07 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12177/3/tests/msc_vlr/Makefile.am
File tests/msc_vlr/Makefile.am:

https://gerrit.osmocom.org/#/c/12177/3/tests/msc_vlr/Makefile.am@22
PS3, Line 22: osmo_gsup_client_create
> I think this is useless now.
Yes, well spotted. Fixed in next patch set.



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 07 Dec 2018 13:10:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-06 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12177/3/tests/msc_vlr/Makefile.am
File tests/msc_vlr/Makefile.am:

https://gerrit.osmocom.org/#/c/12177/3/tests/msc_vlr/Makefile.am@22
PS3, Line 22: osmo_gsup_client_create
I think this is useless now.



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 06 Dec 2018 19:53:42 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-06 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 3:

(2 comments)

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/gsm_04_08.c@1834
PS2, Line 1834: ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
> could use a static struct, then no talloc, and no changes in the test 
> expectations? […]
The API says that ipa_dev must be allocated in the same talloc context as the 
one which ends up as the first argument to osmo_gsup_client_create2().


https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/msc_vty.c@464
PS2, Line 464:   "Set the IPA name of this MSC.\n"
> "This is transmitted as IPA Serial Number tag, which is used for GSUP routing 
> (e.g. in OsmoHLR). […]
Fixed in next patch set.



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 06 Dec 2018 18:51:45 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-06 Thread Stefan Sperling
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 173 insertions(+), 122 deletions(-)


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


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 2: Code-Review+1

(3 comments)

we can drop the API compat stuff.

If you like also cut out the tests expectations stuff with a static ipa_dev -- 
even though my idea is slightly ugly (but then again we do keep a lot of global 
state anyway, and there will never be more than one gsm_network and vlr)

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/gsm_04_08.c@1834
PS2, Line 1834: ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
could use a static struct, then no talloc, and no changes in the test 
expectations?

though ... technically your patch this is nicer


https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/12177/2/src/libmsc/msc_vty.c@464
PS2, Line 464:   "Set the IPA name of this MSC (by default, no name is 
set)\n"
"This is transmitted as IPA Serial Number tag, which is used for GSUP routing 
(e.g. in OsmoHLR).
  For inter-MSC handover, the remote MSC's neighbor configuration requires to 
match this name.
  If no name is set, the IPA Serial Number will be the same as the Unit Name,
  and will be of the form 'MSC-00-00-00-00-00-00'."

Feel free to use any number of lines for a doc string (only end the last one in 
\n), vty will automatically format the output (I hope).

We can also add this text later...


https://gerrit.osmocom.org/#/c/12177/2/src/libvlr/vlr.c
File src/libvlr/vlr.c:

https://gerrit.osmocom.org/#/c/12177/2/src/libvlr/vlr.c@1222
PS2, Line 1222: int vlr_start2(struct ipaccess_unit *ipa_dev, struct 
vlr_instance *vlr,
since we're inside osmo-msc and no-one is including libvlr except the msc 
itself, we can just change the function signature and not be backwards 
compatible.



--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 06 Dec 2018 18:14:06 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-06 Thread Stefan Sperling
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12177

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

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 188 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/12177/2
--
To view, visit https://gerrit.osmocom.org/12177
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: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

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


Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
19 files changed, 187 insertions(+), 118 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 63af3e7..9eca108 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -212,6 +212,9 @@
/* MSISDN to which to route MO emergency calls */
char *route_to_msisdn;
} emergency;
+
+   /* IPA name advertised to GSUP peers. */
+   char *msc_ipa_name;
 };

 struct osmo_esme;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index c0e4864..89a3b2e 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -312,6 +313,8 @@
 int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub);

 struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops);
+int vlr_start2(struct ipaccess_unit *ipa_dev, struct vlr_instance *vlr,
+  const char *gsup_server_addr_str, uint16_t gsup_server_port);
 int vlr_start(const char *gsup_unit_name, struct vlr_instance *vlr,
  const char *gsup_server_addr_str, uint16_t gsup_server_port);

diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 2962760..83eb22c 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1827,9 +1827,16 @@
 /* Launch the VLR, i.e. its GSUP connection */
 int msc_vlr_start(struct gsm_network *net)
 {
+   struct ipaccess_unit *ipa_dev;
+
OSMO_ASSERT(net->vlr);
-   return vlr_start("MSC", net->vlr, net->gsup_server_addr_str,
-net->gsup_server_port);
+
+   ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
+   ipa_dev->unit_name = "MSC";
+   ipa_dev->serno = net->msc_ipa_name; /* NULL unless configured via VTY */
+
+   return vlr_start2(ipa_dev, net->vlr, net->gsup_server_addr_str,
+ net->gsup_server_port);
 }

 struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value)
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index e1d1b40..99a75ab 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -458,6 +458,16 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_msc_ipa_name,
+  cfg_msc_ipa_name_cmd,
+  "ipa-name NAME",
+  "Set the IPA name of this MSC (by default, no name is set)\n"
+  "An arbitrary IPA name for this MSC (for example PLMN + redundancy 
server number: MSC-901-70-0\n")
+{
+   gsmnet->msc_ipa_name = talloc_strdup(gsmnet, argv[0]);
+   return CMD_SUCCESS;
+}
+
 static int config_write_msc(struct vty *vty)
 {
vty_out(vty, "msc%s", VTY_NEWLINE);
@@ -491,6 +501,9 @@
gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);
}

+   if (gsmnet->msc_ipa_name)
+   vty_out(vty, " ipa-name %s%s", gsmnet->msc_ipa_name, 
VTY_NEWLINE);
+
mgcp_client_config_write(vty, " ");
 #ifdef BUILD_IU
ranap_iu_vty_config_write(vty, " ");
@@ -1483,6 +1496,7 @@
install_element(MSC_NODE, _msc_cs7_instance_iu_cmd);
install_element(MSC_NODE, _msc_paging_response_timer_cmd);
install_element(MSC_NODE, _msc_emergency_msisdn_cmd);
+   install_element(MSC_NODE, _msc_ipa_name_cmd);

mgcp_client_vty_init(msc_network, MSC_NODE, _network->mgw.conf);
 #ifdef BUILD_IU
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 76c84de..6e4a532 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1210,6 +1211,30 @@
return vlr;
 }

+static void vlr_init(struct vlr_instance *vlr)
+{
+   vlr->gsup_client->data = vlr;
+
+