fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/32170 )
Change subject: gprs: use sane default local UDP ports for NSVSs
......................................................................
gprs: use sane default local UDP ports for NSVSs
0 is not a valid bind port for the PCU and can never work. Let's set
default local UDP ports for NSVSs to (23100 + i), because osmo-sgsn
bind()s at 23000 by default and we don't want any conflists.
Change-Id: Ifadc37c6fd9b5fa9cc2e2c31ee82347693d39aec
Related: OS#5979
---
M src/osmo-bsc/bts_sm.c
M tests/gprs_params.vty
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/70/32170/1
diff --git a/src/osmo-bsc/bts_sm.c b/src/osmo-bsc/bts_sm.c
index ca572f1..958e45e 100644
--- a/src/osmo-bsc/bts_sm.c
+++ b/src/osmo-bsc/bts_sm.c
@@ -80,6 +80,8 @@
sizeof(bts_sm->gprs.nse.timer));
for (i = 0; i < ARRAY_SIZE(bts_sm->gprs.nsvc); i++) {
+ /* sane default value for the local UDP port */
+ bts_sm->gprs.nsvc[i].local_port = 23100 + i;
bts_sm->gprs.nsvc[i].bts = bts;
bts_sm->gprs.nsvc[i].id = i;
bts_sm->gprs.nsvc[i].mo.fi = osmo_fsm_inst_alloc(
diff --git a/tests/gprs_params.vty b/tests/gprs_params.vty
index 87c64b1..3edc540 100644
--- a/tests/gprs_params.vty
+++ b/tests/gprs_params.vty
@@ -42,7 +42,7 @@
gprs ns timer tns-alive 3
gprs ns timer tns-alive-retries 10
gprs nsvc 0 nsvci 0
- gprs nsvc 0 local udp port 0
+ gprs nsvc 0 local udp port 23100
gprs nsvc 1 nsvci 0
- gprs nsvc 1 local udp port 0
+ gprs nsvc 1 local udp port 23101
...
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/32170
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ifadc37c6fd9b5fa9cc2e2c31ee82347693d39aec
Gerrit-Change-Number: 32170
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange