Change in libosmocore[master]: gprs_ns2_sns: dynamic calculate the maximum NS-VCs

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
Sun Dec 6 03:39:42 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21556 )


Change subject: gprs_ns2_sns: dynamic calculate the maximum NS-VCs
......................................................................

gprs_ns2_sns: dynamic calculate the maximum NS-VCs

The previous hard-coded value could be not enough if the user configures
too many local binds. Allow at least 8 NS-VCs. In case the user
configures too many binds (> 2) increase the maximum NS-VCs to allow
the SGSN to have 4 redundant connections.

Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7
---
M src/gb/gprs_ns2_sns.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/21556/1

diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 9091c9a..efd77a1 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1320,6 +1320,7 @@
 
 		gss->num_ip4_local = count;
 		gss->num_max_ip4_remote = 4;
+		gss->num_max_nsvcs = gss->num_max_ip4_remote + 4;
 		break;
 	case IPv6:
 		/* IPv6 */
@@ -1358,11 +1359,10 @@
 		}
 		gss->num_ip6_local = count;
 		gss->num_max_ip6_remote = 4;
+		gss->num_max_nsvcs = gss->num_max_ip6_remote + 4;
 		break;
 	}
 
-	gss->num_max_nsvcs = 8;
-
 	return osmo_fsm_inst_dispatch(nse->bss_sns_fi, GPRS_SNS_EV_START, NULL);
 
 err:

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7
Gerrit-Change-Number: 21556
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201206/3371b832/attachment.htm>


More information about the gerrit-log mailing list