From bfd67d2f69d49003095c2aec624ba38e85aa8bd5 Mon Sep 17 00:00:00 2001 From: Keith Date: Mon, 29 Apr 2019 18:23:10 +0100 Subject: Echo zero byte XID-Field of Type L3_PAR After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Closes: OS#3426 Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 --- src/gprs/gprs_sndcp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gprs/gprs_sndcp.c b/src/gprs/gprs_sndcp.c index 23d1e9a22..d9aa1e576 100644 --- a/src/gprs/gprs_sndcp.c +++ b/src/gprs/gprs_sndcp.c @@ -1120,6 +1120,14 @@ int sndcp_sn_xid_ind(struct gprs_llc_xid_field *xid_field_indication, OSMO_ASSERT(xid_field_response); OSMO_ASSERT(lle); + /* Some phones send zero byte length SNDCP frames + * and do require a confirmation response. */ + if (xid_field_indication->data_len == 0) { + xid_field_response->type = GPRS_LLC_XID_T_L3_PAR; + xid_field_response->data_len = 0; + return 0; + } + /* Parse SNDCP-CID XID-Field */ comp_fields = gprs_sndcp_parse_xid(&version, lle->llme, xid_field_indication->data, -- cgit v1.2.3