aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_rua.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-24 14:10:17 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-24 14:10:17 +0100
commitb0de90639b5fe9c62ea8165fd1c49efea2f66477 (patch)
tree7679bc2aa831d723eca0e4e0807ae3f538945f59 /src/hnbgw_rua.c
parentc89c2a6e6a1a2a34413fd186670753ae1574ce89 (diff)
hnbgw_rua.c: Incoming context IDs are 24bit wide according to spec
so don't try to decode them to u32, which expects 32bit input values.
Diffstat (limited to 'src/hnbgw_rua.c')
-rw-r--r--src/hnbgw_rua.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index fa5a868..c10a9a1 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -278,7 +278,7 @@ static int rua_rx_init_connect(struct msgb *msg, ANY_t *in)
if (rc < 0)
return rc;
- context_id = asn1bitstr_to_u32(&ies.context_ID);
+ context_id = asn1bitstr_to_u24(&ies.context_ID);
/* route to CS (MSC) or PS (SGSN) domain */
switch (ies.cN_DomainIndicator) {
@@ -317,7 +317,7 @@ static int rua_rx_init_disconnect(struct msgb *msg, ANY_t *in)
if (rc < 0)
return rc;
- context_id = asn1bitstr_to_u32(&ies.context_ID);
+ context_id = asn1bitstr_to_u24(&ies.context_ID);
scu_cause = rua_to_scu_cause(&ies.cause);
DEBUGP(DRUA, "RUA Disconnect.req(ctx=0x%x,cause=%s)\n", context_id,
@@ -357,7 +357,7 @@ static int rua_rx_init_dt(struct msgb *msg, ANY_t *in)
if (rc < 0)
return rc;
- context_id = asn1bitstr_to_u32(&ies.context_ID);
+ context_id = asn1bitstr_to_u24(&ies.context_ID);
DEBUGP(DRUA, "RUA Data.req(ctx=0x%x)\n", context_id);