gprs_gmm: gsm48_rx_gmm_att_req(): drop stale PDP contexts on re-Attach
When an MS sends an Attach Request with a known IMSI or P-TMSI, it implies the MS has restarted and lost all its PDP context state. The SGSN must clean up any PDP contexts it still holds for that subscriber; otherwise it will not create new ones upon subsequent PDP Context Activation, causing data connectivity failure after a device reboot.
Some phones, such as the Sony Ericsson Z520, reject or ignore the Activate PDP Context Accept if they dislike the max-sdu-size value in the QoS profile. Make this value configurable via the VTY so it can be adjusted to accommodate such devices.
Some phones, such as the Sony Ericsson Z520, reject or ignore the Activate PDP Context Accept if they dislike the max-sdu-size value in the QoS profile. Make this value configurable via the VTY so it can be adjusted to accommodate such devices.
The Activate PDP Context Accept was always sending sizeof(default_qos) (14 bytes) as the QoS profile length, regardless of what the UE requested. Older modules such as the Air20X may crash and restart during PDP attachment because of that.
In GTP, qos_req.l encodes 1 ARP byte followed by the QoS profile octets, so (qos_req.l - 1) is the actual profile length. Mirror back the same QoS profile length the UE sent in its request, capped at sizeof(default_qos) to avoid overrunning the default_qos buffer. This matters in particular for R97/R98 UEs that send a 3-byte QoS profile and should not receive a 14-byte response.
gprs_gmm: gsm48_rx_gmm_att_req(): drop stale PDP contexts on re-Attach
When an MS sends an Attach Request with a known IMSI or P-TMSI, it implies the MS has restarted and lost all its PDP context state. The SGSN must clean up any PDP contexts it still holds for that subscriber; otherwise it will not create new ones upon subsequent PDP Context Activation, causing data connectivity failure after a device reboot.