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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Nov 30 18:50:51 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/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.

Closes: OS#3954
Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f
---
M src/sgsn/gprs_llc.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c
index ed5d55e..6e22e65 100644
--- a/src/sgsn/gprs_llc.c
+++ b/src/sgsn/gprs_llc.c
@@ -69,17 +69,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/c/osmo-sgsn/+/13624
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f
Gerrit-Change-Number: 13624
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191130/0f480e9e/attachment.htm>


More information about the gerrit-log mailing list