aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-12 17:01:32 +0200
committerlaforge <laforge@osmocom.org>2019-11-30 18:50:50 +0000
commit4146121cc996bed1fb1707a2ab8bca6786cd054d (patch)
tree27954336a144acb65d2141ec42200737a84df58a
parent85386dcfad9f9a81938dfc411ac1a4f916726361 (diff)
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
-rw-r--r--src/sgsn/gprs_llc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c
index ed5d55ef6..6e22e65c0 100644
--- a/src/sgsn/gprs_llc.c
+++ b/src/sgsn/gprs_llc.c
@@ -69,17 +69,20 @@ static int gprs_llc_generate_xid(uint8_t *bytes, int bytes_len,
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 */