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
This commit is contained in:
Alexander Couzens 2021-01-27 21:02:13 +01:00 committed by lynxis lazus
parent 0018d3e0ec
commit caf73b803c
5 changed files with 11 additions and 21 deletions

View File

@ -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.

View File

@ -21,9 +21,9 @@ ns
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
!

View File

@ -23,9 +23,9 @@ ns
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
!

View File

@ -31,9 +31,9 @@ ns
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
!

View File

@ -328,11 +328,6 @@ static bool file_exists(const char *path)
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 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
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) {