Change in osmo-sgsn[master]: LLC: Don't use hard-coded N201-U / N201-I values in XID

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Apr 12 15:08:48 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13624


Change subject: LLC: Don't use hard-coded N201-U / N201-I values in XID
......................................................................

LLC: Don't use hard-coded N201-U / N201-I values in XID

The N201 values are negotiated per SAPI, and there are default values
per each SAPI.  Let's use those rather than hard-coded values.

Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f
---
M src/gprs/gprs_llc.c
1 file changed, 5 insertions(+), 2 deletions(-)



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

diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c
index 1cb0f5d..2111e10 100644
--- a/src/gprs/gprs_llc.c
+++ b/src/gprs/gprs_llc.c
@@ -61,17 +61,20 @@
 	struct gprs_llc_xid_field xid_version;
 	struct gprs_llc_xid_field xid_n201u;
 	struct gprs_llc_xid_field xid_n201i;
+	uint16_t n201_u, n201_i;
 
 	xid_version.type = GPRS_LLC_XID_T_VERSION;
 	xid_version.data = (uint8_t *) "\x00";
 	xid_version.data_len = 1;
 
+	n201_u = htons(lle->params.n201_u);
 	xid_n201u.type = GPRS_LLC_XID_T_N201_U;
-	xid_n201u.data = (uint8_t *) "\x05\xf0";
+	xid_n201u.data = (uint8_t *) &n201_u;
 	xid_n201u.data_len = 2;
 
+	n201_i = htons(lle->params.n201_i);
 	xid_n201i.type = GPRS_LLC_XID_T_N201_I;
-	xid_n201i.data = (uint8_t *) "\x05\xf0";
+	xid_n201i.data = (uint8_t *) &n201_i;
 	xid_n201i.data_len = 2;
 
 	/* Add locally managed XID Fields */

-- 
To view, visit https://gerrit.osmocom.org/13624
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: I447a3c6dd85311772a6e219c62dc820d2726857f
Gerrit-Change-Number: 13624
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190412/2282ca39/attachment.html>


More information about the gerrit-log mailing list