Change in osmo-hlr[master]: gsup_server: send routing error back to the correct peer

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 gerrit-no-reply at lists.osmocom.org
Fri Nov 29 13:30:23 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16336 )


Change subject: gsup_server: send routing error back to the correct peer
......................................................................

gsup_server: send routing error back to the correct peer

If a peer attempts to add a route to an ipa-name that we already have in the
routing system, don't send the routing error to the peer that already has the
name, but to the peer that attempts to re-use it and would cause the collision.

This is fixing a situation where for example a locally attached MSC has name
'MSC-1', and a remote site is proxying GSUP here for a remote MSC that also has
the name 'MSC-1'. Send the routing error back to the proxy, not local 'MSC-1'.

Change-Id: Icafaedc11b5925149d338bdcb987ae985a7323d6
---
M src/gsup_server.c
1 file changed, 9 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/36/16336/1

diff --git a/src/gsup_server.c b/src/gsup_server.c
index 0071827..5c5f917 100644
--- a/src/gsup_server.c
+++ b/src/gsup_server.c
@@ -69,7 +69,15 @@
 	struct msgb *msg = osmo_gsup_msgb_alloc("GSUP Tx");
 	int rc;
 
-	conn = gsup_route_find_gt(server, &req->source_name);
+	if (response->message_type == OSMO_GSUP_MSGT_ROUTING_ERROR
+	    && req->via_proxy.len) {
+		/* If a routing error occured, we need to route back via the immediate sending peer, not via the
+		 * intended final recipient -- because one source of routing errors is a duplicate name for a recipient.
+		 * If we resolve to req->source_name, we may send to a completely unrelated recipient. */
+		conn = gsup_route_find_gt(server, &req->via_proxy);
+	} else {
+		conn = gsup_route_find_gt(server, &req->source_name);
+	}
 	if (!conn) {
 		LOG_GSUP_REQ(req, LOGL_ERROR, "GSUP client that sent this request was disconnected, cannot respond\n");
 		msgb_free(msg);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16336
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Icafaedc11b5925149d338bdcb987ae985a7323d6
Gerrit-Change-Number: 16336
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191129/71ddfea0/attachment.htm>


More information about the gerrit-log mailing list