From ab852ee23439725360f28c63d20ab61b0d774b2b Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 24 Oct 2013 01:33:24 +0200 Subject: gb: Fix RESET handling with changing NSEI This modifies the NS stack's behavior to accept RESET and RESET_ACK NSEI changes for NS-VC dynamically created by RESET messages from BSSes. This feature is not used for NS-VC configured via VTY or NS-VC to a SGSN. Sponsored-by: On-Waves ehf --- tests/gb/gprs_ns_test.ok | 49 ++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'tests/gb') diff --git a/tests/gb/gprs_ns_test.ok b/tests/gb/gprs_ns_test.ok index a882488a..5f90d03f 100644 --- a/tests/gb/gprs_ns_test.ok +++ b/tests/gb/gprs_ns_test.ok @@ -186,7 +186,7 @@ result (RESET) = 9 Current NS-VCIs: VCI 0x3344, NSEI 0x1122, peer 0x01020304:3333, blocked VCI 0x1122, NSEI 0x3344, peer 0x01020304:4444, blocked - NS-VC changed NSEI : 1 + NS-VC changed NSEI count : 1 --- Peer port 3333, RESET, VCI is changed back --- @@ -196,7 +196,7 @@ PROCESSING RESET from 0x01020304:3333 ==> got signal NS_REPLACED: 0x1122/1.2.3.4:4444 -> 0x3344/1.2.3.4:3333 ==> got signal NS_RESET, NS-VC 0x1122/1.2.3.4:3333 MESSAGE to BSS, msg length 9 -03 01 82 11 22 04 82 33 44 +03 01 82 11 22 04 82 11 22 MESSAGE to BSS, msg length 1 0a @@ -205,9 +205,9 @@ result (RESET) = 9 Current NS-VCIs: VCI 0x3344, NSEI 0x1122, peer 0x00000000:0, blocked - VCI 0x1122, NSEI 0x3344, peer 0x01020304:3333, blocked + VCI 0x1122, NSEI 0x1122, peer 0x01020304:3333, blocked NS-VC replaced other count: 1 - NS-VC changed NSEI : 1 + NS-VC changed NSEI count : 2 --- Peer port 4444, RESET, NSEI is changed back --- @@ -227,7 +227,7 @@ Current NS-VCIs: VCI 0x3344, NSEI 0x1122, peer 0x00000000:0, blocked VCI 0x1122, NSEI 0x1122, peer 0x01020304:4444, blocked NS-VC replaced other count: 1 - NS-VC changed NSEI : 2 + NS-VC changed NSEI count : 2 --- Setup VC 1 BSS -> SGSN --- @@ -424,18 +424,21 @@ Current NS-VCIs: PROCESSING RESET from 0x01020304:2222 02 00 81 01 01 82 10 01 04 82 f0 00 -==> got signal NS_MISMATCH: 0x1001/1.2.3.4:2222 pdu=2, ie=4 +==> got signal NS_RESET, NS-VC 0x1001/1.2.3.4:2222 MESSAGE to BSS, msg length 9 -03 01 82 10 01 04 82 10 00 +03 01 82 10 01 04 82 f0 00 -result (RESET) = 0 +MESSAGE to BSS, msg length 1 +0a + +result (RESET) = 9 Current NS-VCIs: VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111 - VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked + VCI 0x1001, NSEI 0xf000, peer 0x01020304:2222, blocked NS-VC Block count : 3 NS-VC replaced other count: 1 - NSEI was invalid count : 1 + NS-VC changed NSEI count : 1 --- RESET with invalid NSVCI, BSS -> SGSN --- @@ -456,7 +459,7 @@ Current NS-VCIs: VCI 0xf001, NSEI 0x1000, peer 0x01020304:2222, blocked NS-VC Block count : 3 NS-VC replaced other count: 1 - NSEI was invalid count : 1 + NS-VC changed NSEI count : 2 --- RESET with old NSEI, NSVCI, BSS -> SGSN --- @@ -477,7 +480,7 @@ Current NS-VCIs: VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked NS-VC Block count : 3 NS-VC replaced other count: 1 - NSEI was invalid count : 1 + NS-VC changed NSEI count : 2 --- Unexpected RESET_ACK VC 1, BSS -> SGSN --- @@ -491,7 +494,7 @@ Current NS-VCIs: VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked NS-VC Block count : 3 NS-VC replaced other count: 1 - NSEI was invalid count : 1 + NS-VC changed NSEI count : 2 --- RESET_ACK with invalid NSEI, BSS -> SGSN --- @@ -501,20 +504,22 @@ MESSAGE to BSS, msg length 12 PROCESSING RESET_ACK from 0x01020304:2222 03 01 82 10 01 04 82 f0 00 -==> got signal NS_MISMATCH: 0x1001/1.2.3.4:2222 pdu=3, ie=4 -result (RESET_ACK) = -22 +MESSAGE to BSS, msg length 1 +0a + +result (RESET_ACK) = 1 Current NS-VCIs: VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111 - VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked - NS-VC Block count : 3 + VCI 0x1001, NSEI 0xf000, peer 0x01020304:2222, blocked + NS-VC Block count : 4 NS-VC replaced other count: 1 - NSEI was invalid count : 2 + NS-VC changed NSEI count : 3 --- RESET_ACK with invalid NSVCI, BSS -> SGSN --- MESSAGE to BSS, msg length 12 -02 00 81 01 01 82 10 01 04 82 10 00 +02 00 81 01 01 82 10 01 04 82 f0 00 PROCESSING RESET_ACK from 0x01020304:2222 03 01 82 f0 01 04 82 10 00 @@ -524,11 +529,11 @@ result (RESET_ACK) = -22 Current NS-VCIs: VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111 - VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked - NS-VC Block count : 3 + VCI 0x1001, NSEI 0xf000, peer 0x01020304:2222, blocked + NS-VC Block count : 4 NS-VC replaced other count: 1 + NS-VC changed NSEI count : 3 NS-VCI was invalid count : 1 - NSEI was invalid count : 2 Current NS-VCIs: -- cgit v1.2.3