[PATCH] openbsc[master]: ussd: Add band-aid for interrogationSS

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/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Tue Jul 12 15:58:11 UTC 2016


Review at  https://gerrit.osmocom.org/503

ussd: Add band-aid for interrogationSS

This is a speculative change for interrogateSS and by not answering
the request the radio connection would remain open long.

The SS/USSD code is from a time where none of knew much about GSM. We
do not support SS but should reject it. We have checked for an empty
string in the text field to guess if it is a result/release to not send
more information. The right way forward is to decode the ASN1 into the
fields REQUEST/RESULT(last).

Fix an issue and make the code worse. Assume ss_code > 0 to see if this
is a interrogate invoke. The issue is that code 0 is a well defined
value but unlikely to be used.

MAP ASN1 definition:

SS-Code ::= OCTET STRING (SIZE (1))
        -- This type is used to represent the code identifying a single
        -- supplementary service, a group of supplementary services, or
        -- all supplementary services. The services and abbreviations
        -- used are defined in TS 3GPP TS 22.004 [5]. The internal structure is
        -- defined as follows:
        --
        -- bits 87654321: group (bits 8765), and specific service
        -- (bits 4321)

allSS                   SS-Code ::= '00000000'B

Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5
---
M openbsc/src/libmsc/ussd.c
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/03/503/1

diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c
index 7f01eae..5fcd447 100644
--- a/openbsc/src/libmsc/ussd.c
+++ b/openbsc/src/libmsc/ussd.c
@@ -58,9 +58,17 @@
 		return rc;
 	}
 
-	/* Release-Complete */
-	if (req.text[0] == '\0')
+	if (req.text[0] == '\0') {
+		if (req.ss_code > 0) {
+			/* Assume interrogateSS or modification of it and reject */
+			rc = gsm0480_send_ussd_reject(conn, msg, &req);
+			msc_release_connection(conn);
+			return rc;
+		}
+	} else {
+		/* Still assuming a Release-Complete */
 		return 0;
+	}
 
 	if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.text)) {
 		DEBUGP(DMM, "USSD: Own number requested\n");

-- 
To view, visit https://gerrit.osmocom.org/503
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>



More information about the gerrit-log mailing list