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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/1952
fix: properly handle error rc by osmo_gsup_conn_ccm_get()
Change-Id: I70e4a5e75dd596052e61df9a6ad52b7f56fb6b26
---
M src/gsup_server.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/52/1952/1
diff --git a/src/gsup_server.c b/src/gsup_server.c
index ea51f7d..1a1cd6c 100644
--- a/src/gsup_server.c
+++ b/src/gsup_server.c
@@ -185,9 +185,14 @@
osmo_tlvp_dump(tlvp, DLGSUP, LOGL_INFO);
addr_len = osmo_gsup_conn_ccm_get(clnt, &addr, IPAC_IDTAG_SERNR);
- if (addr_len)
- gsup_route_add(clnt, addr, addr_len);
+ if (addr_len <= 0) {
+ LOGP(DLGSUP, LOGL_ERROR, "GSUP client %s:%u has no"
+ " IDTAG_SERNR IE and cannot be routed\n",
+ conn->addr, conn->port);
+ return -EINVAL;
+ }
+ gsup_route_add(clnt, addr, addr_len);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/1952
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70e4a5e75dd596052e61df9a6ad52b7f56fb6b26
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>