summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-01-31 17:36:20 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-03-13 11:10:14 +0100
commit3dc2b23f39e81bfe733aae0e06e16b93e1f67d68 (patch)
treef01a0358be2a338fd7cb985120f629e8041ab16d
parentd9ea09c9a2bc148cbe22e56949e179972c3ed70d (diff)
pcu_sock: fix paging group calculation
The offset for the data buffer, where the last three imsi digits are stored is wrong. Here we correct the problem. Change-Id: Iefdbd451e4935b199cfb565f995771a82a19624e
-rw-r--r--openbsc/src/libbsc/pcu_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/pcu_sock.c b/openbsc/src/libbsc/pcu_sock.c
index 4e61df9..575784e 100644
--- a/openbsc/src/libbsc/pcu_sock.c
+++ b/openbsc/src/libbsc/pcu_sock.c
@@ -414,9 +414,9 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
"invalid/small length %d\n", data_req->len);
break;
}
- tlli = *((uint32_t *)data_req->data);
- pag_grp = extract_paging_group(bts,data_req->data);
+ memcpy(&tlli,data_req->data,sizeof(tlli));
+ pag_grp = extract_paging_group(bts,data_req->data+4);
msg = msgb_alloc(data_req->len - 7, "pcu_pch");
if (!msg) {