From b0de90639b5fe9c62ea8165fd1c49efea2f66477 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 24 Dec 2015 14:10:17 +0100 Subject: 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. --- src/hnbgw_rua.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hnbgw_rua.c') 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); -- cgit v1.2.3