Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode

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
Tue Nov 5 16:24:48 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 )


Change subject: vty: Permit configuration of ASPs in SCTP client mode
......................................................................

vty: Permit configuration of ASPs in SCTP client mode

The M3UA specification states that either of the two roles should
be the SCTP client and the other the server.  It also states that
the default for the SGP is to operate as server.  However, it permits
other configurations.  Let's allow this to be configured by the VTY.

We need to ensure that while in ASP role, we don't send any NOTIFY
messages to the peer SG.

Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f
Closes: OS#2005
---
M src/osmo_ss7_vty.c
M src/xua_as_fsm.c
2 files changed, 23 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/15975/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 1b8b043..35640df 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -661,6 +661,24 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(sctp_role, asp_sctp_role_cmd,
+	"sctp-role (client|server)",
+	"Specify the SCTP role for this ASP\n"
+	"Operate as SCTP client; connect to a server\n"
+	"Operate as SCTP server; wait for client connections\n")
+{
+	struct osmo_ss7_asp *asp = vty->index;
+
+	if (!strcmp(argv[0], "client"))
+		asp->cfg.is_server = false;
+	else if (!strcmp(argv[0], "server"))
+		asp->cfg.is_server = true;
+	else
+		OSMO_ASSERT(0);
+
+	return CMD_SUCCESS;
+}
+
 DEFUN(asp_block, asp_block_cmd,
 	"block",
 	"Allows a SCTP Association with ASP, but doesn't let it become active\n")
@@ -1876,6 +1894,7 @@
 	install_element(L_CS7_ASP_NODE, &asp_local_ip_cmd);
 	install_element(L_CS7_ASP_NODE, &asp_qos_class_cmd);
 	install_element(L_CS7_ASP_NODE, &asp_role_cmd);
+	install_element(L_CS7_ASP_NODE, &asp_sctp_role_cmd);
 	install_element(L_CS7_ASP_NODE, &asp_block_cmd);
 	install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd);
 
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index cf75ef3..97a2107 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -51,6 +51,10 @@
 		if (!asp)
 			continue;
 
+		/* NOTIFY are only sent by SG or IPSP role */
+		if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP)
+			continue;
+
 		if (!asp->fi || asp->fi->state == XUA_ASP_S_DOWN)
 			continue;
 

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f
Gerrit-Change-Number: 15975
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191105/07abd7f1/attachment.htm>


More information about the gerrit-log mailing list