Change in libosmo-sccp[master]: sccp: more SCMG handling: SSA and SSP message handling

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

laforge gerrit-no-reply at lists.osmocom.org
Thu Feb 11 18:04:28 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/22834 )

Change subject: sccp: more SCMG handling: SSA and SSP message handling
......................................................................

sccp: more SCMG handling: SSA and SSP message handling

When a SSP (Subsystem Prohibited) or SSA (Subsystem Available) SCMG
message is received, we must generate the respective primitives towards
the SCCP user.

Change-Id: I149166a25113f5d3e3536f9297bf89ff3139b9e3
---
M src/sccp_scmg.c
1 file changed, 31 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



diff --git a/src/sccp_scmg.c b/src/sccp_scmg.c
index ed16fe7..49e09ca 100644
--- a/src/sccp_scmg.c
+++ b/src/sccp_scmg.c
@@ -167,6 +167,33 @@
 }
 
 
+/* Subsystem Allowed received */
+static int scmg_rx_ssa(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr,
+			const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *ssa)
+{
+	/* Q.714 5.3.3 */
+	if (ssa->affected_ssn == SCCP_SSN_MANAGEMENT)
+		return 0;
+
+	/* if the SSN is not marked as prohibited, ignore */
+
+	/* Q.714 5.3.2.2 a) */
+	sccp_scmg_rx_ssn_allowed(scu->inst, ssa->affected_pc, ssa->affected_ssn, ssa->smi);
+
+	/* If the remote SCCP, at which the subsystem reported in the SSA message resides, is marked
+	 * inaccessible, then the message is treated as an implicit indication of SCCP restart */
+	return 0;
+}
+
+/* Subsystem Prohibited received */
+static int scmg_rx_ssp(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr,
+			const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *ssp)
+{
+	/* Q.714 5.3.2.2 a) */
+	sccp_scmg_rx_ssn_prohibited(scu->inst, ssp->affected_pc, ssp->affected_ssn, ssp->smi);
+	return 0;
+}
+
 /* Subsystem Test received */
 static int scmg_rx_sst(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr,
 			const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *sst)
@@ -191,10 +218,12 @@
 		   const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *scmg)
 {
 	switch (scmg->msg_type) {
+	case SCCP_SCMG_MSGT_SSA:
+		return scmg_rx_ssa(scu, calling_addr, called_addr, scmg);
+	case SCCP_SCMG_MSGT_SSP:
+		return scmg_rx_ssp(scu, calling_addr, called_addr, scmg);
 	case SCCP_SCMG_MSGT_SST:
 		return scmg_rx_sst(scu, calling_addr, called_addr, scmg);
-	case SCCP_SCMG_MSGT_SSP:
-	case SCCP_SCMG_MSGT_SSA:
 	case SCCP_SCMG_MSGT_SOR:
 	case SCCP_SCMG_MSGT_SOG:
 	case SCCP_SCMG_MSGT_SSC:

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/22834
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I149166a25113f5d3e3536f9297bf89ff3139b9e3
Gerrit-Change-Number: 22834
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210211/882f9405/attachment.htm>


More information about the gerrit-log mailing list