Change in libosmocore[master]: gprs_ns2: sns: remove the initial SNS NSVC if it's not part

laforge gerrit-no-reply at
Wed Apr 7 14:55:06 UTC 2021

laforge has submitted this change. ( )

Change subject: gprs_ns2: sns: remove the initial SNS NSVC if it's not part

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

 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:, Signalling Weight: 1, Data Weight: 1
 Remote IPv4 Endpoints:, Signalling Weight: 1, Data Weight: 0, Signalling Weight: 0, Data Weight: 1
  3 NS-VC:
   NSVCI none: UNBLOCKED DYNAMIC data_weight=1 sig_weight=0 udp)[]:23000<>[]:23000
   NSVCI none: UNBLOCKED DYNAMIC data_weight=0 sig_weight=1 udp)[]:23000<>[]:23001
   NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[]:23000<>[]:8888

The UNCONFIGURED NSVC should not be present in when SNS is in CONFIGURED.

Related: SYS#5416
Change-Id: I4045ac6c033ae084743b17a16eef4fcff76589b9
M src/gb/gprs_ns2_sns.c
1 file changed, 4 insertions(+), 0 deletions(-)

  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 552e4b8..18f388d 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1368,6 +1368,10 @@
+	/* 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);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4045ac6c033ae084743b17a16eef4fcff76589b9
Gerrit-Change-Number: 23675
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list