Change in osmo-hlr[master]: GSUP routing: use Kind IE

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Apr 10 18:03:09 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13588


Change subject: GSUP routing: use Kind IE
......................................................................

GSUP routing: use Kind IE

Include the GSUP Kind from original message in routing error responses.
Add the Kind to GSUP router logging.

Depends: Ic397a9f2c4a7224e47cab944c72e75ca5592efef (libosmocore)
Change-Id: I8dc3967d9372d63e9d57ca2608dd3316edb234a4
---
M src/hlr.c
1 file changed, 17 insertions(+), 11 deletions(-)



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

diff --git a/src/hlr.c b/src/hlr.c
index 2614f35..6d2f7ac 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -453,6 +453,7 @@
 	/* Prepare error message (before IEs get deallocated) */
 	gsup_err = talloc_zero(hlr_ctx, struct osmo_gsup_message);
 	OSMO_STRLCPY_ARRAY(gsup_err->imsi, gsup->imsi);
+	gsup_err->kind = gsup->kind;
 	gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len);
 	gsup_err->destination_name_len = gsup->destination_name_len;
 	gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR;
@@ -462,8 +463,9 @@
 
 	/* Check for routing IEs */
 	if (!gsup->source_name || !gsup->source_name_len || !gsup->destination_name || !gsup->destination_name_len) {
-		LOGP(DMAIN, LOGL_ERROR, "Can't forward GSUP message for IMSI %s (%s): missing routing IEs\n",
-		     gsup->imsi, osmo_gsup_message_type_name(gsup->message_type));
+		LOGP(DMAIN, LOGL_ERROR, "Can't forward GSUP message for IMSI %s (%s, kind %s): missing routing IEs\n",
+		     gsup->imsi, osmo_gsup_message_type_name(gsup->message_type),
+		     osmo_gsup_kind_name(gsup->kind));
 		goto end;
 	}
 
@@ -480,10 +482,11 @@
 	}
 
 	/* Forward message without re-encoding (so we don't remove unknown IEs) */
-	LOGP(DMAIN, LOGL_NOTICE, "Forwarding GSUP message for IMSI %s from %s to %s: %s\n", gsup->imsi,
+	LOGP(DMAIN, LOGL_NOTICE, "Forwarding GSUP message for IMSI %s from %s to %s: %s, kind %s\n", gsup->imsi,
 	     osmo_quote_str_buf((const char *)gsup->source_name, gsup->source_name_len, buf, sizeof(buf)),
 	     osmo_quote_str((const char *)gsup->destination_name, gsup->destination_name_len),
-	     osmo_gsup_message_type_name(gsup->message_type));
+	     osmo_gsup_message_type_name(gsup->message_type),
+	     osmo_gsup_kind_name(gsup->kind));
 
 	/* Remove incoming IPA header to be able to prepend and outgoing IPA header */
 	msgb_pull_to_l2(msg);
@@ -494,16 +497,19 @@
 	gsup = NULL;
 	if (ret == -ENODEV)
 		LOGP(DMAIN, LOGL_ERROR,
-		     "Can't forward GSUP message for IMSI %s from %s to %s (%s): destination not connected\n", gsup_err->imsi,
-		     osmo_quote_str_buf((const char *)gsup_err->source_name, gsup_err->source_name_len, buf, sizeof(buf)),
-		     osmo_quote_str((const char *)gsup_err->destination_name, gsup_err->destination_name_len),
-		     osmo_gsup_message_type_name(gsup_err->message_type));
-	else if (ret)
-		LOGP(DMAIN, LOGL_ERROR, "Can't forward GSUP message for IMSI %s from %s to %s (%s): unknown error\n",
+		     "Can't forward GSUP message for IMSI %s from %s to %s (%s, kind %s): destination not connected\n",
 		     gsup_err->imsi,
 		     osmo_quote_str_buf((const char *)gsup_err->source_name, gsup_err->source_name_len, buf, sizeof(buf)),
 		     osmo_quote_str((const char *)gsup_err->destination_name, gsup_err->destination_name_len),
-		     osmo_gsup_message_type_name(gsup_err->message_type));
+		     osmo_gsup_message_type_name(gsup_err->message_type),
+		     osmo_gsup_kind_name(gsup_err->kind));
+	else if (ret)
+		LOGP(DMAIN, LOGL_ERROR, "Can't forward GSUP message for IMSI %s from %s to %s (%s, kind %s): unknown error\n",
+		     gsup_err->imsi,
+		     osmo_quote_str_buf((const char *)gsup_err->source_name, gsup_err->source_name_len, buf, sizeof(buf)),
+		     osmo_quote_str((const char *)gsup_err->destination_name, gsup_err->destination_name_len),
+		     osmo_gsup_message_type_name(gsup_err->message_type),
+		     osmo_gsup_kind_name(gsup_err->kind));
 
 end:
 	/* Send error back to source */

-- 
To view, visit https://gerrit.osmocom.org/13588
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dc3967d9372d63e9d57ca2608dd3316edb234a4
Gerrit-Change-Number: 13588
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190410/54d0676c/attachment.html>


More information about the gerrit-log mailing list