[MERGED] libosmo-sccp[master]: osmo_ss7_vty: Add Command to permit (or disallow) dynamc rou...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Apr 14 15:18:09 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: osmo_ss7_vty: Add Command to permit (or disallow) dynamc routing key allocation
......................................................................


osmo_ss7_vty: Add Command to permit (or disallow) dynamc routing key allocation

This feature has been introduced in
8dec5a8ec554bbd56f4d3f45b6e1025d4c1ffb45, but so far hasn't been exposed
to the VTY yet.

Change-Id: I7355522bacbad1072feb5484b865dfd1be50a64d
---
M src/osmo_ss7_vty.c
1 file changed, 21 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 40f99b1..6c19188 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -163,8 +163,25 @@
 	inst->cfg.primary_pc = pc;
 	return CMD_SUCCESS;
 }
+
 /* TODO: cs7 secondary-pc */
 /* TODO: cs7 capability-pc */
+
+DEFUN(cs7_permit_dyn_rkm, cs7_permit_dyn_rkm_cmd,
+	"xua rkm routing-key-allocation (static-only|dynamic-permitted)",
+	"SIGTRAN xxxUA related\n" "Routing Key Management Allocation Policy\n"
+	"Only static (pre-confgured) Routing Keys permitted\n"
+	"Dynamically allocate Routing Keys for what ASPs request\n")
+{
+	struct osmo_ss7_instance *inst = vty->index;
+
+	if (!strcmp(argv[0], "dynamic-permitted"))
+		inst->cfg.permit_dyn_rkm_alloc = true;
+	else
+		inst->cfg.permit_dyn_rkm_alloc = false;
+
+	return CMD_SUCCESS;
+}
 
 static void write_one_cs7(struct vty *vty, struct osmo_ss7_instance *inst);
 
@@ -853,6 +870,9 @@
 			osmo_ss7_pointcode_print(inst, inst->cfg.primary_pc),
 			VTY_NEWLINE);
 
+	if (inst->cfg.permit_dyn_rkm_alloc)
+		vty_out(vty, " xua rkm routing-key-allocation dynamic-permitted%s", VTY_NEWLINE);
+
 	/* first dump ASPs, as ASs reference them */
 	llist_for_each_entry(asp, &inst->asp_list, list)
 		write_one_asp(vty, asp);
@@ -935,6 +955,7 @@
 	install_element(L_CS7_NODE, &cs7_pc_format_cmd);
 	install_element(L_CS7_NODE, &cs7_pc_format_def_cmd);
 	install_element(L_CS7_NODE, &cs7_pc_delimiter_cmd);
+	install_element(L_CS7_NODE, &cs7_permit_dyn_rkm_cmd);
 
 	install_node(&asp_node, NULL);
 	vty_install_default(L_CS7_ASP_NODE);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7355522bacbad1072feb5484b865dfd1be50a64d
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list