Change in osmo-sgsn[master]: Echo XID-Field of Type L3_PAR even when zero length

Keith Whyte gerrit-no-reply at lists.osmocom.org
Mon Apr 29 17:43:34 UTC 2019


Keith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/13811


Change subject: Echo XID-Field of Type L3_PAR even when zero length
......................................................................

Echo XID-Field of Type L3_PAR even when zero length

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)

Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4
---
M src/gprs/gprs_llc.c
M src/gprs/gprs_sndcp.c
2 files changed, 15 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/11/13811/1

diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c
index acf4b54..02455b1 100644
--- a/src/gprs/gprs_llc.c
+++ b/src/gprs/gprs_llc.c
@@ -256,11 +256,20 @@
 						struct gprs_llc_xid_field);
 				rc = sndcp_sn_xid_ind(xid_field,
 						      xid_field_response, lle);
-				if (rc == 0)
-					llist_add(&xid_field_response->list,
-						  xid_fields_response);
-				else
+				if (rc == 0) {
+					LOGP(DLLC, LOGL_NOTICE,
+					     "Echoing XID-Field: XID: type %s, data_len=%d, data=%s\n",
+					     get_value_string(gprs_llc_xid_type_names,
+							      xid_field->type),
+					     xid_field->data_len,
+					     osmo_hexdump_nospc(xid_field->data,
+								xid_field->data_len));
+					xid_field_response = gprs_llc_dup_xid_field(lle->llme, xid_field);
+					llist_add(&xid_field_response->list, xid_fields_response);
+				}
+				else {
 					talloc_free(xid_field_response);
+				}
 			}
 		}
 
diff --git a/src/gprs/gprs_sndcp.c b/src/gprs/gprs_sndcp.c
index 23d1e9a..33d8cf6 100644
--- a/src/gprs/gprs_sndcp.c
+++ b/src/gprs/gprs_sndcp.c
@@ -1125,6 +1125,8 @@
 					   xid_field_indication->data,
 					   xid_field_indication->data_len,
 					   NULL);
+	if (comp_fields == NULL)
+		return 0;
 	if (!comp_fields)
 		return -EINVAL;
 

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4
Gerrit-Change-Number: 13811
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190429/9e7f9266/attachment.html>


More information about the gerrit-log mailing list