summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-27 14:58:26 +0200
committerHarald Welte <laforge@gnumonks.org>2017-10-27 14:36:26 +0000
commitc755c1d1b02d748cf27cc805d37553894816833a (patch)
tree9758c03bedb73cb8e3b0eed4d593cbeb25481be3
parent4e1dfa8677c6323d22ef7d09103ca1c5c7e57648 (diff)
osmo_sccp_addr_encode(): Fix truncation of point codes
In osmo_sccp_addr_encode(), we accidentially truncated all point codes to 10 bits, where in reality we should have truncated them to 14 bits: One 'f' was missing in the bit-mask. Closes: OS#2441 Change-Id: Iad67b674b5b5fd41996aa898a131e98900842dd8
-rw-r--r--src/sccp2sua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sccp2sua.c b/src/sccp2sua.c
index e435d9f..ac2b2c2 100644
--- a/src/sccp2sua.c
+++ b/src/sccp2sua.c
@@ -245,7 +245,7 @@ int osmo_sccp_addr_encode(struct msgb *msg, const struct osmo_sccp_addr *in)
LOGP(DLSUA, LOGL_ERROR, "Invalid Point Code %u requested\n", in->pc);
return -EINVAL;
}
- msgb_put_u16le(msg, in->pc & 0x3ff);
+ msgb_put_u16le(msg, in->pc & 0x3fff);
}
if (in->presence & OSMO_SCCP_ADDR_T_SSN) {