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

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'gsup ipa-name' VTY command which overrides the default
IPA name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'gsup ipa-name' option can only be set via the config file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 36 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Max: Looks good to me, but someone else must approve
  Stefan Sperling: Looks good to me, approved



diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index 3a34ff9..c80355d 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -124,6 +124,12 @@
enum ranap_nsap_addr_enc rab_assign_addr_enc;
} iu;
 #endif
+
+   /* This is transmitted as IPA Serial Number tag, which is used for GSUP 
routing (e.g. in OsmoHLR).
+* This name must be set in a multi-SGSN network, and it must be unique 
to each SGSN.
+* If no name is set, the IPA Serial Number will be the same as the 
Unit Name,
+* and will be of the form 'SGSN-00-00-00-00-00-00' */
+   char *sgsn_ipa_name;
 };

 struct sgsn_instance {
diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c
index 4ab45c2..484c7ef 100644
--- a/src/gprs/gprs_subscriber.c
+++ b/src/gprs/gprs_subscriber.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,15 +64,20 @@
 int gprs_subscr_init(struct sgsn_instance *sgi)
 {
const char *addr_str;
+   struct ipaccess_unit *ipa_dev;
 
if (!sgi->cfg.gsup_server_addr.sin_addr.s_addr)
return 0;

addr_str = inet_ntoa(sgi->cfg.gsup_server_addr.sin_addr);

-   sgi->gsup_client = osmo_gsup_client_create(
+   ipa_dev = talloc_zero(sgi, struct ipaccess_unit);
+   ipa_dev->unit_name = "SGSN";
+   ipa_dev->serno = sgi->cfg.sgsn_ipa_name; /* NULL unless configured via 
VTY */
+
+   sgi->gsup_client = osmo_gsup_client_create2(
sgi,
-   "SGSN",
+   ipa_dev,
addr_str, sgi->cfg.gsup_server_port,
_read_cb,
>cfg.oap);
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 601b3c5..3757c07 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -203,6 +203,8 @@
vty_out(vty, " encryption %s%s",
get_value_string(gprs_cipher_names, g_cfg->cipher),
VTY_NEWLINE);
+   if (g_cfg->sgsn_ipa_name)
+   vty_out(vty, " gsup ipa-name %s%s", g_cfg->sgsn_ipa_name, 
VTY_NEWLINE);
if (g_cfg->gsup_server_addr.sin_addr.s_addr)
vty_out(vty, " gsup remote-ip %s%s",
inet_ntoa(g_cfg->gsup_server_addr.sin_addr), 
VTY_NEWLINE);
@@ -1075,6 +1077,25 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_gsup_ipa_name,
+   cfg_gsup_ipa_name_cmd,
+   "gsup ipa-name NAME",
+   "GSUP Parameters\n"
+   "Set the IPA name of this SGSN\n"
+   "A unique name for this SGSN. For example: PLMN + redundancy server 
number: SGSN-901-70-0. "
+   "This name is used for GSUP routing and must be set if more than one 
SGSN is connected to the network. "
+   "The default is 'SGSN-00-00-00-00-00-00'.\n")
+{
+   if (vty->type != VTY_FILE) {
+   vty_out(vty, "The IPA name cannot be changed at run-time; "
+   "It can only be set in the configuraton file.%s", 
VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   g_cfg->sgsn_ipa_name = talloc_strdup(tall_vty_ctx, argv[0]);
+   return CMD_SUCCESS;
+}
+
 DEFUN(cfg_gsup_remote_ip, cfg_gsup_remote_ip_cmd,
"gsup remote-ip A.B.C.D",
"GSUP Parameters\n"
@@ -1365,6 +1386,7 @@
install_element(SGSN_NODE, _imsi_acl_cmd);
install_element(SGSN_NODE, _auth_policy_cmd);
install_element(SGSN_NODE, _encrypt_cmd);
+   install_element(SGSN_NODE, _gsup_ipa_name_cmd);
install_element(SGSN_NODE, _gsup_remote_ip_cmd);
install_element(SGSN_NODE, _gsup_remote_port_cmd);
install_element(SGSN_NODE, _gsup_oap_id_cmd);

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

Gerrit-Project: 

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

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

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


Patch Set 7: Code-Review+2


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 17:06:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-20 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12243 )

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


Patch Set 7: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:43:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

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

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


Patch Set 7: Code-Review+1

Ok, fine for me now :)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:22:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

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

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


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@1092
PS5, Line 1092: return CMD_WARNING;
> Please read the long discussion above before adding further input to this 
> topic.

It seems to be kinda hidden in later patch sets :(
See https://gerrit.osmocom.org/c/osmo-sgsn/+/12243/3/src/gprs/sgsn_vty.c#1195



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:15:20 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

2018-12-20 Thread Stefan Sperling
Hello Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'gsup ipa-name' VTY command which overrides the default
IPA name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'gsup ipa-name' option can only be set via the config file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 36 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 


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

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

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


Patch Set 6:

(2 comments)

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@181
PS5, Line 181: ipa-name
> Missing "gsup" prefix. […]
Ooops, thanks nice catch.


https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@1092
PS5, Line 1092: "It can only be se
> Could we just warn user that this change has no effect until restart? […]
Please read the long discussion above before adding further input to this topic.



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:11:52 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 6: Code-Review-1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:08:25 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

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

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


Patch Set 5:

(3 comments)

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@181
PS5, Line 181: ipa-name
Missing "gsup" prefix. Maybe rather place it together with other GSUP 
parameters?


https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@1084
PS5, Line 1084:
Other DEFUNs are using a single tab here as far as I can see.


https://gerrit.osmocom.org/#/c/12243/5/src/gprs/sgsn_vty.c@1092
PS5, Line 1092: return CMD_WARNING;
Could we just warn user that this change has no effect until restart?
Or would it break anything at run-time?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 5
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 15:07:37 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

2018-12-20 Thread Stefan Sperling
Hello Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'gsup ipa-name' VTY command which overrides the default
IPA name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'gsup ipa-name' option can only be set via the config file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 37 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 


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

2018-12-20 Thread Stefan Sperling
Hello Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'gsup ipa-name' VTY command which overrides the default
IPA name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'gsup ipa-name' option can only be set via the config file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 36 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 5
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 


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

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

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


Patch Set 4:

> Patch Set 4: Code-Review-1
>
> Please see: https://gerrit.osmocom.org/#/c/osmo-msc/+/12387/

OK we discussed this internally and I'll update this patch. Thanks.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 14:40:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 4: Code-Review-1

Please see: https://gerrit.osmocom.org/#/c/osmo-msc/+/12387/


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 12:09:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-20 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Thu, 20 Dec 2018 11:53:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-18 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12243 )

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


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Tue, 18 Dec 2018 18:23:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-18 Thread Stefan Sperling
Hello Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'ipa-name' VTY command which overrides the default IPA
name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'ipa-name' option can only be set via the configuration file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 36 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: osmith 


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

2018-12-18 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1195
PS3, Line 1195: if (!parsing_config_file) {
> if (vty->type != VTY_FILE)

Neat, didn't know about it. Aside of that, Just copy-pasting part of last 
Stefan reply as either commit message or comment next to vty type check should 
be enough to get this merged.



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: osmith 
Gerrit-Comment-Date: Tue, 18 Dec 2018 17:54:40 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1195
PS3, Line 1195: if (!parsing_config_file) {
> my question: do things break when changing during run-time? […]
I can't enumerate the consequences of changing this name on the fly.
What seems obvious is that changing this name will result in some IPA 
connections using name A and others using name B.
Likewise for routes which get installed in the HLR which refers to these names, 
both of which point towards the same SGSN.

Will this cause real harm? I cannot tell. Will connections using the old name 
be negatively impacted? Maybe.
What I am pretty certain about is that it risks putting the system into an 
inconsistent state.
What I also know is that this is an unprecedented use case because Osmocom has 
never run in multi-MSC/multi-SGSN setups
which means that we cannot really judge the consequences based on past 
experience. We'd have to do a lot of testing and
code audit to be sure of the consequences. And all that for what looks like an 
edge-case to me which should never happen
in real multi-MSC/multi-SGSN deployments as far as I can tell.

So I'll turn the question around on you again:
Why would you want to change this name without also restarting the process?
What is the use case for this?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 18 Dec 2018 10:51:33 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1195
PS3, Line 1195: if (!parsing_config_file) {
> OK, so say the user changes the ipa-name. And now we print a warning that 
> they did something bad. […]
my question: do things break when changing during run-time?
If they break, then rejecting is justified and explain why in a comment or the 
vty out message.

Do things not break, and simply have no effect?
Then that is how many other vty options already work, and matches the feeling 
that we're editing cached config that doesn't necessarily have an effect on the 
running program. It matches the current scheme, and that can be allowed.

For example in osmo-bsc you can edit the pchan settings of time slots, and you 
can write them back to config file, but they will only have an effect when you 
re-connect the OML. Re-connect OML can be done by 'do bts 0 drop oml' or 
something, or a program restart.

(...still valid: just use vty->type)



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 19:39:54 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

2018-12-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 16:29:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

>
 > I really don't see why a regular user would want to clear the name,
 > write the config, and then configure the name again to prevent the
 > network from falling apart:
 >
 > no ipa-name
 > write file
 > ipa-name 'SGSN-911-123456879'

Why this third ipa-name? The scenario I describe is I want to revert to 
default, I don't need to know which is it. Does this ipa-name really need to 
match the same token in another node? If that's the case for HLR, then I get 
your point and we can skip adding it since then in prod networks it will always 
be set to something specific.

 >
 > Just to save the effort of removing one line from the saved file?

I'd say one of the main points of using a VTY is that you don't ever need to 
modify the file directly. You may have access to the VTY but not the cfg file.

 >
 > Considering that multi-SGSN and multi-MSC setups will be an
 > exception rather than the norm, how often do you think users will
 > even run into this?
 > Do you have a concrete situation where you would use this yourself?

If I followed this logic when implementing stuff I'll be laying on the sofa 
right now :P

 > Or are you arguing based on "consistency is good" (which it isn't
 > in this case, I would say)?

consistency is good. Being able to modify the value back to default without 
touching the cfg file is also good.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 16:18:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

> Not necessarily. I think I already described it. You could simply print it 
> won't be applied until next restart, but still give the option that it is 
> saved so next time you start it it will be taken into account. Otherwise user 
> really needs to modify the cfg file manually.

I really don't see why a regular user would want to clear the name, write the 
config, and then configure the name again to prevent the network from falling 
apart:

no ipa-name
write file
ipa-name 'SGSN-911-123456879'

Just to save the effort of removing one line from the saved file?

Considering that multi-SGSN and multi-MSC setups will be an exception rather 
than the norm, how often do you think users will even run into this?
Do you have a concrete situation where you would use this yourself? Or are you 
arguing based on "consistency is good" (which it isn't in this case, I would 
say)?

If I were an admin of such a network, I'd be incredibly happy to have a unique 
identifier in all my configuration files saved from different SGSN/MSC.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 16:09:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

> > I was just replying that I still lack a "no ipa-name" in order to
 > be able to go back to default before saving the config, but I
 > didn't really understand your arguments against it, I was just
 > stating I don't get them and trying to explain why. I know your
 > patch currently doesn't do that.
 >
 >
 > OK, I see. I don't think 'no ipa-name' is a good idea, for the same
 > reasons that changing the name at runtime is not a good idea. As I
 > understand, the semantics of 'no ipa-name' would include switching
 > the IPA name back to the default name at run-time, would it not?

Not necessarily. I think I already described it. You could simply print it 
won't be applied until next restart, but still give the option that it is saved 
so next time you start it it will be taken into account. Otherwise user really 
needs to modify the cfg file manually.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 16:01:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

> I was just replying that I still lack a "no ipa-name" in order to be able to 
> go back to default before saving the config, but I didn't really understand 
> your arguments against it, I was just stating I don't get them and trying to 
> explain why. I know your patch currently doesn't do that.


OK, I see. I don't think 'no ipa-name' is a good idea, for the same reasons 
that changing the name at runtime is not a good idea. As I understand, the 
semantics of 'no ipa-name' would include switching the IPA name back to the 
default name at run-time, would it not?


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:44:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

> > Patch Set 3:
 > >
 > > > I don't see a beneficial use case in clearing the IPA name
 > before
 > >  > saving the current config. Why would anyone want to omit that
 > name?
 > >  > If we require the name to be stored in the config file, why
 > should
 > >  > it not always be saved when the file gets written out?
 > >
 > >
 > > I don't get you there. I don't see anywhere that it is REQUIRED
 > that the name is stored in the config file. That's why we have
 > defaults right? When storing the config back into the cfg file we
 > usually have same approach. If it's the default value, don't save
 > it, because it means the user simply wants the default value and we
 > may decide later that another default value is better, this way the
 > user can benefit from it for free. It also keeps config files
 > shorter and easy to find "user specific values".
 >
 > But... wait... my patch saves the ipa-name to the config file only
 > if the user has overridden it. If the user does not change it, the
 > 'ipa-name' line won't appear in the saved configuration.
 >
 > You sound like you believed we'd save the default name
 > "MSC-00-00-00-00-00-00"?
 > That is not the case!
 >
 > Does this address your concern or did I misunderstand you?

I was just replying that I still lack a "no ipa-name" in order to be able to go 
back to default before saving the config, but I didn't really understand your 
arguments against it, I was just stating I don't get them and trying to explain 
why. I know your patch currently doesn't do that.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:33:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1195
PS3, Line 1195: if (!parsing_config_file) {
> instead you can do […]
OK, so say the user changes the ipa-name. And now we print a warning that they 
did something bad.

Can you tell me:

1) What would the resulting system behaviour be?
2) And what should this warning say?

>From my point my view, the resulting behaviour is essentially undefined, so 
>the warning would have to say something like: "We are sorry, you have just 
>changed an option which should not be changed at run-time because it leads to 
>what essentially amounts to undefined behaviour of our application. Have fun!"



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:31:52 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

> Patch Set 3:
>
> > I don't see a beneficial use case in clearing the IPA name before
>  > saving the current config. Why would anyone want to omit that name?
>  > If we require the name to be stored in the config file, why should
>  > it not always be saved when the file gets written out?
>
>
> I don't get you there. I don't see anywhere that it is REQUIRED that the name 
> is stored in the config file. That's why we have defaults right? When storing 
> the config back into the cfg file we usually have same approach. If it's the 
> default value, don't save it, because it means the user simply wants the 
> default value and we may decide later that another default value is better, 
> this way the user can benefit from it for free. It also keeps config files 
> shorter and easy to find "user specific values".

But... wait... my patch saves the ipa-name to the config file only if the user 
has overridden it. If the user does not change it, the 'ipa-name' line won't 
appear in the saved configuration.

You sound like you believed we'd save the default name "MSC-00-00-00-00-00-00"?
That is not the case!

Does this address your concern or did I misunderstand you?


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:28:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

> I don't see a beneficial use case in clearing the IPA name before
 > saving the current config. Why would anyone want to omit that name?
 > If we require the name to be stored in the config file, why should
 > it not always be saved when the file gets written out?


I don't get you there. I don't see anywhere that it is REQUIRED that the name 
is stored in the config file. That's why we have defaults right? When storing 
the config back into the cfg file we usually have same approach. If it's the 
default value, don't save it, because it means the user simply wants the 
default value and we may decide later that another default value is better, 
this way the user can benefit from it for free. It also keeps config files 
shorter and easy to find "user specific values".


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:11:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1195
PS3, Line 1195: if (!parsing_config_file) {
instead you can do

  if (vty->type != VTY_FILE)

A comment should explain why this is necessary. We have other commands that 
allow changing the value and write back the config, even though they have no 
immediate effect on the running program. I think it's good to print a warning, 
but do you really need to forbid tweaking the config?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 15:09:42 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


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

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

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1454
PS3, Line 1454: parsing_config_file = true;
> Why initializing it here instead of where it's declared?
At present what you suggest would of course be equivalent, but code evolves 
over time. If we set the flag to true during program init already, then the 
flag's effect might change if calls into the VTY code made during program 
startup are ever changed in the future.
This flag should only be set while vty_read_ocnfig_file is running, so setting 
it before and after calling this function makes that very explicit. Should I 
add a comment which mentions this?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 11:46:41 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

2018-12-13 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12243 )

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1454
PS3, Line 1454: parsing_config_file = true;
Why initializing it here instead of where it's declared?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 13 Dec 2018 15:39:38 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 3:

For reasons I outlined above, patch set 3 adds the restriction that the 
'ipa-name' option must be set in the configuration file and cannot be changed 
at run-time.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 13 Dec 2018 09:24:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-13 Thread Stefan Sperling
Hello Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'ipa-name' VTY command which overrides the default IPA
name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

The 'ipa-name' option can only be set via the configuration file
because changing the IPA name at run-time conflicts with active
GSUP connections and routes configured in the HLR. The osmo-sgsn
program must be restarted if its IPA name needs to change.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 39 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 


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

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

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


Patch Set 2:

> Patch Set 2:
>
>
> They can be left as they are I guess. You can try re-establishing them in the 
> patch if you see it's easy to do so with current code base.

No, I am not going to work on that because I don't think your suggested 
approach makes any sense.

A program restart will look like one GSUP peer and route going away and a new 
GSUP peer and route appearing. And everything that needs to happen for this is 
already implemented by our current code. Compared to simply requiring that the 
problem be restarted. adding additional code paths to handle dynamic peer name 
and route changes at run-time carries a huge potential for bugs and 
side-effects.

Perhaps this is a weak analogy but: A routing protocol daemon (such as OSPF) 
won't change its router ID at run-time either.

> I think it's fine requiring the user to re-start the process for the change 
> to take effect, I was just pointing out that independent of that topic, there 
> should be a "no foobar" for the reason I introduced.

I don't see a beneficial use case in clearing the IPA name before saving the 
current config. Why would anyone want to omit that name? If we require the name 
to be stored in the config file, why should it not always be saved when the 
file gets written out?


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 13 Dec 2018 08:59:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 2:

> Let me try again:
 >
 > Assume this name is used by active GSUP connections. If this name
 > is changed via VTY, what should happen to those active connections?
 > Should those connections be left as they are? Should they be
 > replaced with new connections which use the new name? I don't think
 > there is a trivial answer, is there?
 >
 > I believe the easiest answer is that changing this name should
 > require a restart of osmo-sgsn (and likewise osmo-msc).
 >

They can be left as they are I guess. You can try re-establishing them in the 
patch if you see it's easy to do so with current code base.
I think it's fine requiring the user to re-start the process for the change to 
take effect, I was just pointing out that independent of that topic, there 
should be a "no foobar" for the reason I introduced.


 > If there was a way to mark a VTY option such that it can only be
 > set while the configuration file is being loaded, and not via a
 > run-time VTY shell, then this option would be a good candidate for
 > such treatment.

Agree, that would be handy in general.
You could otherwise check if the link towards the HLR is ON when the VTY 
command is run, and if  that's the case, print warning stating it won't be 
applied until it is reconnected. But still save the new value in order to be 
able to save the changed config if the user desires to do so.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 17:54:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 2:

I forgot one important point: There are routes which refer to this name in 
other components of the network, such as the HLR. What needs to happen to those 
routes when the name is changed? Do we even have the means to synchronize such 
changes across several active GSUP speakers?


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 17:42:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 2:

> Patch Set 2: Code-Review-1
>
> Some people may want to use "no foobar" and then safe config to file. If you 
> don't add the "no foobar" one and it's enabled, it's not possible to disable 
> it and save the cfg.

I don't understand this response. You're not answering my question.

Let me try again:

Assume this name is used by active GSUP connections. If this name is changed 
via VTY, what should happen to those active connections?
Should those connections be left as they are? Should they be replaced with new 
connections which use the new name? I don't think there is a trivial answer, is 
there?

I believe the easiest answer is that changing this name should require a 
restart of osmo-sgsn (and likewise osmo-msc).

If there was a way to mark a VTY option such that it can only be set while the 
configuration file is being loaded, and not via a run-time VTY shell, then this 
option would be a good candidate for such treatment.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 17:35:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 2: Code-Review-1

Some people may want to use "no foobar" and then safe config to file. If you 
don't add the "no foobar" one and it's enabled, it's not possible to disable it 
and save the cfg.


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 17:09:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-12 Thread Stefan Sperling
Hello Pau Espin Pedrol, Max, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12243

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

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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'ipa-name' VTY command which overrides the default IPA
name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 30 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 


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

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

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


Patch Set 2:

(1 comment)

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

https://gerrit.osmocom.org/#/c/12243/1/src/gprs/sgsn_vty.c@1376
PS1, Line 1376: //install_element(SGSN_NODE, _ggsn_remote_port_cmd);
> kind of a weird spot to put it, right in the middle of the ggsn cfg :) better 
> fit is below with the  […]
Fair enough. I've moved it down in the next patch set.



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 17:02:14 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 1:

> Patch Set 1:
>
> actually, the same applies to the osmo-msc patch.
>
> Please add 'no ipa-name'

Does changing this option at run-time make sense?

Currently, the option only affect new connections. Nothing is done to existing 
connections if the name is changed after the fact.
Is managing connections when the name changes something we actually want to do? 
What is bad about requiring a restart in this case?


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 16:55:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

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

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


Patch Set 1:

(1 comment)

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

https://gerrit.osmocom.org/#/c/12243/1/src/gprs/sgsn_vty.c@1376
PS1, Line 1376: install_element(SGSN_NODE, _sgsn_ipa_name_cmd);
kind of a weird spot to put it, right in the middle of the ggsn cfg :) better 
fit is below with the gsup stuff



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 11:07:50 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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


Patch Set 1:

actually, the same applies to the osmo-msc patch.

Please add 'no ipa-name'


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Wed, 12 Dec 2018 11:05:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

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


Patch Set 1: Code-Review-1

(1 comment)

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

https://gerrit.osmocom.org/#/c/12243/1/src/gprs/sgsn_vty.c@351
PS1, Line 351: {
How to go back to default? "no ipa-name" ? or "ipa-name default"?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:23:17 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


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

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


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

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'ipa-name' VTY command which overrides the default IPA
name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 30 insertions(+), 2 deletions(-)



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

diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index 3a34ff9..c80355d 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -124,6 +124,12 @@
enum ranap_nsap_addr_enc rab_assign_addr_enc;
} iu;
 #endif
+
+   /* This is transmitted as IPA Serial Number tag, which is used for GSUP 
routing (e.g. in OsmoHLR).
+* This name must be set in a multi-SGSN network, and it must be unique 
to each SGSN.
+* If no name is set, the IPA Serial Number will be the same as the 
Unit Name,
+* and will be of the form 'SGSN-00-00-00-00-00-00' */
+   char *sgsn_ipa_name;
 };

 struct sgsn_instance {
diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c
index 4ab45c2..484c7ef 100644
--- a/src/gprs/gprs_subscriber.c
+++ b/src/gprs/gprs_subscriber.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,15 +64,20 @@
 int gprs_subscr_init(struct sgsn_instance *sgi)
 {
const char *addr_str;
+   struct ipaccess_unit *ipa_dev;

if (!sgi->cfg.gsup_server_addr.sin_addr.s_addr)
return 0;

addr_str = inet_ntoa(sgi->cfg.gsup_server_addr.sin_addr);

-   sgi->gsup_client = osmo_gsup_client_create(
+   ipa_dev = talloc_zero(sgi, struct ipaccess_unit);
+   ipa_dev->unit_name = "SGSN";
+   ipa_dev->serno = sgi->cfg.sgsn_ipa_name; /* NULL unless configured via 
VTY */
+
+   sgi->gsup_client = osmo_gsup_client_create2(
sgi,
-   "SGSN",
+   ipa_dev,
addr_str, sgi->cfg.gsup_server_port,
_read_cb,
>cfg.oap);
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 601b3c5..ebf77ba 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -177,6 +177,9 @@
vty_out(vty, " gtp local-ip %s%s",
inet_ntoa(g_cfg->gtp_listenaddr.sin_addr), VTY_NEWLINE);

+   if (g_cfg->sgsn_ipa_name)
+   vty_out(vty, " ipa-name %s%s", g_cfg->sgsn_ipa_name, 
VTY_NEWLINE);
+
llist_for_each_entry(gctx, _ggsn_ctxts, list) {
if (gctx->id == UINT32_MAX)
continue;
@@ -338,6 +341,18 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_sgsn_ipa_name,
+  cfg_sgsn_ipa_name_cmd,
+  "ipa-name NAME",
+  "Set the IPA name of this SGSN\n"
+  "A unique name for this SGSN. For example: PLMN + redundancy server 
number: SGSN-901-70-0. "
+  "This name is used for GSUP routing and must be set if more than one 
SGSN is connected to the network. "
+  "The default is 'SGSN-00-00-00-00-00-00'.\n")
+{
+   g_cfg->sgsn_ipa_name = talloc_strdup(tall_vty_ctx, argv[0]);
+   return CMD_SUCCESS;
+}
+
 #if 0
 DEFUN(cfg_ggsn_remote_port, cfg_ggsn_remote_port_cmd,
"ggsn <0-255> remote-port <0-65535>",
@@ -1358,6 +1373,7 @@
install_node(_node, config_write_sgsn);
install_element(SGSN_NODE, _sgsn_bind_addr_cmd);
install_element(SGSN_NODE, _ggsn_remote_ip_cmd);
+   install_element(SGSN_NODE, _sgsn_ipa_name_cmd);
//install_element(SGSN_NODE, _ggsn_remote_port_cmd);
install_element(SGSN_NODE, _ggsn_gtp_version_cmd);
install_element(SGSN_NODE, _ggsn_echo_interval_cmd);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling