aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-04-06 15:45:47 +0200
committerAlexander Couzens <lynxis@fe80.eu>2021-04-07 16:12:34 +0200
commit53e70090492ed69311cd2d721ffcbf5618274f8b (patch)
treef6cf8dff8649744a3a5465c6c60151128b2f3796
parentcdb2baaa0cd04cff251d4a1cfcc40b2866fae763 (diff)
gprs_ns2: sns: remove the initial SNS NSVC if it's not part
A SNS configuration can be done over a NSVC, however this initial NSVC doesn't need to be part of the configuration. Those NSVC need to be removed when the configuration is done. This wrong behaviour can be seen in the vty `show ns` on NSEI 00001: UDP, ALIVE FSM Instance Name: 'GPRS-NS2-SNS-BSS(NSE00001-SNS)[0x55c72c09b420]', ID: 'NSE00001-SNS' Log-Level: 'DEBUG', State: 'CONFIGURED' Maximum number of remote NS-VCs: 8192, IPv4 Endpoints: 8192, IPv6 Endpoints: 8192 Local IPv4 Endpoints: 10.0.0.1:23000, Signalling Weight: 1, Data Weight: 1 Remote IPv4 Endpoints: 10.0.2.2:23000, Signalling Weight: 1, Data Weight: 0 10.0.2.2:23001, Signalling Weight: 0, Data Weight: 1 3 NS-VC: NSVCI none: UNBLOCKED DYNAMIC data_weight=1 sig_weight=0 udp)[10.0.0.1]:23000<>[10.0.2.2]:23000 NSVCI none: UNBLOCKED DYNAMIC data_weight=0 sig_weight=1 udp)[10.0.0.1]:23000<>[10.0.2.2]:23001 NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[10.0.0.1]:23000<>[10.0.2.2]:8888 The UNCONFIGURED NSVC should not be present in when SNS is in CONFIGURED. Related: SYS#5416 Change-Id: I4045ac6c033ae084743b17a16eef4fcff76589b9
-rw-r--r--src/gb/gprs_ns2_sns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 552e4b8e..18f388d5 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1368,6 +1368,10 @@ static void ns2_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old
}
}
+ /* remove the initial NSVC if the NSVC isn't part of the configuration */
+ if (gss->sns_nsvc->sns_only)
+ gprs_ns2_free_nsvc(gss->sns_nsvc);
+
ns2_prim_status_ind(nse, NULL, 0, GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED);
}