summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gsup_server.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gsup_server.c b/src/gsup_server.c
index d431637..b0e1858 100644
--- a/src/gsup_server.c
+++ b/src/gsup_server.c
@@ -185,9 +185,15 @@ static int osmo_gsup_server_ccm_cb(struct ipa_server_conn *conn,
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 %s IE and"
+ " cannot be routed\n",
+ conn->addr, conn->port,
+ ipa_ccm_idtag_name(IPAC_IDTAG_SERNR));
+ return -EINVAL;
+ }
+ gsup_route_add(clnt, addr, addr_len);
return 0;
}