Change in osmo-sgsn[master]: sgsn: migrate to the new gprs_ns2_vty configuration

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Jan 28 21:20:00 UTC 2021


lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/22501 )

Change subject: sgsn: migrate to the new gprs_ns2_vty configuration
......................................................................

sgsn: migrate to the new gprs_ns2_vty configuration

Change the whole vty configuration for NS to be more flexible
and support more setups. Old configurations are invalid.

API change which must be synchronized with libosmocore

For further information see:
https://osmocom.org/projects/libosmocore/wiki/Network_service_(NS)

Depends-on: I8c3f2afecc74b78f7f914f7dce166cbcb63444eb (libosmocore)
Change-Id: Ie9306ab4d4738c2c57a69987086e22771b30657e
---
M TODO-RELEASE
M doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg
M doc/examples/osmo-sgsn/osmo-sgsn.cfg
M doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg
M src/sgsn/sgsn_main.c
5 files changed, 11 insertions(+), 21 deletions(-)

Approvals:
  daniel: Looks good to me, approved
  lynxis lazus: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1e409b5..5514897 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -1,3 +1,4 @@
 #component	what		description / commit summary line
 manual				needs common chapter cs7-config.adoc, vty_cpu_sched.adoc from osmo-gsm-manuals > 0.3.0
 configure.ac	libosmocore	depend on next released libosmocore after 1.4.x with hashtable support
+sgsn		vty/config	change the configuration of the vty config. old configuration are invalid.
diff --git a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg b/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg
index 85112f4..7abe7b3 100644
--- a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg
+++ b/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg
@@ -21,9 +21,9 @@
  timer tns-test 30
  timer tns-alive 3
  timer tns-alive-retries 10
- encapsulation udp local-ip 127.0.0.1
- encapsulation udp local-port 23000
- encapsulation framerelay-gre enabled 0
+ bind udp local
+  listen 127.0.0.1 23000
+  accept-ipaccess
 !
 bssgp
 !
diff --git a/doc/examples/osmo-sgsn/osmo-sgsn.cfg b/doc/examples/osmo-sgsn/osmo-sgsn.cfg
index 3be4d49..11413c1 100644
--- a/doc/examples/osmo-sgsn/osmo-sgsn.cfg
+++ b/doc/examples/osmo-sgsn/osmo-sgsn.cfg
@@ -23,9 +23,9 @@
  timer tns-test 30
  timer tns-alive 3
  timer tns-alive-retries 10
- encapsulation udp local-ip 127.0.0.1
- encapsulation udp local-port 23000
- encapsulation framerelay-gre enabled 0
+ bind udp local
+  listen 127.0.0.1 23000
+  accept-ipaccess
 !
 bssgp
 !
diff --git a/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg b/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg
index f60c076..fd5a205 100644
--- a/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg
+++ b/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg
@@ -31,9 +31,9 @@
  timer tns-test 30
  timer tns-alive 3
  timer tns-alive-retries 10
- encapsulation udp local-ip 127.0.0.1
- encapsulation udp local-port 23000
- encapsulation framerelay-gre enabled 0
+ bind udp local
+  listen 127.0.0.1 23000
+  accept-ipaccess
 !
 bssgp
 !
diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c
index 19039f6..f6eac60 100644
--- a/src/sgsn/sgsn_main.c
+++ b/src/sgsn/sgsn_main.c
@@ -328,11 +328,6 @@
 int main(int argc, char **argv)
 {
 	int rc;
-	struct osmo_sockaddr_str bind_address = {
-		.af = AF_INET,
-		.ip = "0.0.0.0",
-		.port = 23000,
-	};
 #if BUILD_IU
 	struct osmo_sccp_instance *sccp;
 #endif
@@ -402,7 +397,7 @@
 	sgsn_inst_init(sgsn);
 
 
-	gprs_ns2_vty_init(sgsn_nsi, &bind_address);
+	gprs_ns2_vty_init(sgsn_nsi);
 	bssgp_vty_init();
 	gprs_llc_vty_init();
 	gprs_sndcp_vty_init();
@@ -449,12 +444,6 @@
 		exit(2);
 	}
 
-	rc = gprs_ns2_vty_create();
-	if (rc < 0) {
-		LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen on NSIP socket\n");
-		exit(2);
-	}
-
 	gprs_ns2_dynamic_create_nse(sgsn_nsi, true);
 
 	if (sgsn->cfg.dynamic_lookup) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/22501
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ie9306ab4d4738c2c57a69987086e22771b30657e
Gerrit-Change-Number: 22501
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210128/d1bde98c/attachment.htm>


More information about the gerrit-log mailing list