From 5405a104bbe7d3711fe6f19ea7d0fce50ef91147 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 24 Oct 2013 01:33:23 +0200 Subject: gb: Fix NS RESET/RESET_ACK abnormal cases This changes the implementations for the reception of RESET and RESET_ACK to be compatible with 3GPP TS 08.16, 7.3.1: - Just send a RESET_ACK with correct values back to the SGSN when a RESET with an invalid NSVCI or NSEI has been received. - Check RESET_ACK for matching NSEI and NSVCI. - Ignore unexpected RESET_ACKs. In addition, use RESET_ACK from a BSS to update the BSS source address based on the NSVCI to be tolerant with changing UDP source addresses/ports. Sponsored-by: On-Waves ehf --- include/osmocom/gprs/gprs_ns.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index b28c58d6..296800e4 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -36,6 +36,7 @@ enum ns_timeout { #define NSE_S_BLOCKED 0x0001 #define NSE_S_ALIVE 0x0002 +#define NSE_S_RESET 0x0004 /*! \brief Osmocom NS link layer types */ enum gprs_ns_ll { @@ -199,12 +200,16 @@ enum signal_ns { S_NS_UNBLOCK, S_NS_ALIVE_EXP, /* Tns-alive expired more than N times */ S_NS_REPLACED, /* nsvc object is replaced (sets old_nsvc) */ + S_NS_MISMATCH, /* got an unexpected IE (sets msg, pdu_type, ie_type) */ }; struct ns_signal_data { struct gprs_nsvc *nsvc; struct gprs_nsvc *old_nsvc; uint8_t cause; + uint8_t pdu_type; + uint8_t ie_type; + struct msgb *msg; }; void gprs_ns_set_log_ss(int ss); -- cgit v1.2.3