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
Review at https://gerrit.osmocom.org/1830
sccp_sap: Add osmo_sccp_routing_ind to osmo_sccp_addr
Somehow we forgot to include the osmo_sccp_routing_ind in
osmo_sccp_addr. It was defined, but not unsed anywhere :/
Change-Id: I559bc9a5308a46aa1b1c63557a4aec0effb48a0b
---
M include/osmocom/sigtran/sccp_sap.h
M src/sua.c
M src/xua_msg.c
3 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/30/1830/1
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index 0aa565a..cc26c4e 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -136,6 +136,7 @@
struct osmo_sccp_addr {
uint32_t presence;
+ enum osmo_sccp_routing_ind ri;
struct osmo_sccp_gt gt;
uint32_t pc;
uint32_t ssn;
diff --git a/src/sua.c b/src/sua.c
index cdc2cf0..36e31fd 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -670,7 +670,18 @@
ai = ntohs(*(uint16_t*) ¶m->dat[pos]);
pos += 2;
- if (ri != SUA_RI_SSN_PC) {
+ switch (ri) {
+ case SUA_RI_GT:
+ out->ri = OSMO_SCCP_RI_GT;
+ break;
+ case SUA_RI_SSN_PC:
+ out->ri = OSMO_SCCP_RI_SSN_PC;
+ break;
+ case SUA_RI_SSN_IP:
+ out->ri = OSMO_SCCP_RI_SSN_IP;
+ break;
+ case SUA_RI_HOST:
+ default:
LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Routing Indicator not supported yet: %d\n",
iei, ri);
return -ENOTSUP;
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 4a3e013..be3b9a2 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -253,7 +253,19 @@
if (!tmp)
return -ENOMEM;
- msgb_put_u16(tmp, SUA_RI_SSN_PC); /* route on SSN + PC */
+ switch (addr->ri) {
+ case OSMO_SCCP_RI_GT:
+ msgb_put_u16(tmp, SUA_RI_GT);
+ break;
+ case OSMO_SCCP_RI_SSN_PC:
+ msgb_put_u16(tmp, SUA_RI_SSN_PC);
+ break;
+ case OSMO_SCCP_RI_SSN_IP:
+ msgb_put_u16(tmp, SUA_RI_SSN_IP);
+ break;
+ default:
+ return -EINVAL;
+ }
msgb_put_u16(tmp, 7); /* always put all addresses on SCCP side */
if (addr->presence & OSMO_SCCP_ADDR_T_GT) {
--
To view, visit https://gerrit.osmocom.org/1830
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I559bc9a5308a46aa1b1c63557a4aec0effb48a0b
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>