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


Change subject: gprs_ns2_sns: correct dynamic calculation
......................................................................

gprs_ns2_sns: correct dynamic calculation

The wrong argument was used to multiply by 4. However it was still
compliant because the SNS code would always supports 16 NSVCs.
Use the correct multiplier.

Fixes: ttnc3 pcu sns test cases
Fixes: 42ad54915285 ("gprs_ns2_sns: dynamic calculate the maximum NS-VCs")

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



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/21618/1

diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index d13d920..5d18d04 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1320,7 +1320,7 @@

                gss->num_ip4_local = count;
                gss->num_max_ip4_remote = 4;
-               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip4_remote * 4, 8);
+               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip4_remote * 
gss->num_ip4_local, 8);
                break;
        case IPv6:
                /* IPv6 */
@@ -1359,7 +1359,7 @@
                }
                gss->num_ip6_local = count;
                gss->num_max_ip6_remote = 4;
-               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip6_remote * 4, 8);
+               gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip6_remote * 
gss->num_ip6_local, 8);
                break;
        }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I58d706c6fffb4237b90b37cade4dc00c6aba6ac9
Gerrit-Change-Number: 21618
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-MessageType: newchange

Reply via email to