[PATCH] osmo-bts[master]: paging.c: Fix encoding of optional Mobile ID RR PAGING TYPE ...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Feb 24 18:19:40 UTC 2018


Review at  https://gerrit.osmocom.org/6881

paging.c: Fix encoding of optional Mobile ID RR PAGING TYPE 1 / 2

It seems we have been encoding PAGING REQUEST TYPE 1 and
PAGING REQUEST TYPE 2 erroneously all the time.  The optional last
Mobile Identity in those messages are TLV, not just LV.

This is a quite serious bug in one of the most fundamental parts of
the Radio Resource layer, and it has likely stayed hidden for a long
time as usually in small networks there's a low paging load, reducing
the amount of pressure to put multiple identities in one PAGING REQUEST
message.

Change-Id: Icc320ed130d0c29e9260a6a2aabe52e7346c3888
Closes: OS#2993
---
M src/common/paging.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/81/6881/1

diff --git a/src/common/paging.c b/src/common/paging.c
index c5c23d7..4c4fd19 100644
--- a/src/common/paging.c
+++ b/src/common/paging.c
@@ -290,7 +290,7 @@
 	pt1->cneed2 = chan2 & 3;
 	cur = lv_put(pt1->data, identity1_lv[0], identity1_lv+1);
 	if (identity2_lv)
-		cur = lv_put(cur, identity2_lv[0], identity2_lv+1);
+		cur = tlv_put(cur, GSM48_IE_MOBILE_ID, identity2_lv[0], identity2_lv+1);
 
 	pt1->l2_plen = L2_PLEN(cur - out_buf);
 
@@ -316,7 +316,7 @@
 	cur = out_buf + sizeof(*pt2);
 
 	if (identity3_lv)
-		cur = lv_put(pt2->data, identity3_lv[0], identity3_lv+1);
+		cur = tlv_put(pt2->data, GSM48_IE_MOBILE_ID, identity3_lv[0], identity3_lv+1);
 
 	pt2->l2_plen = L2_PLEN(cur - out_buf);
 

-- 
To view, visit https://gerrit.osmocom.org/6881
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc320ed130d0c29e9260a6a2aabe52e7346c3888
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list