Harald Welte has submitted this change and it was merged. Change subject: osmo_ss7_vty: Introduce xUA listener accept-asp-connections command ......................................................................
osmo_ss7_vty: Introduce xUA listener accept-asp-connections command Using this command one can specify if ASP connections should be refused if there's no matching configuration, or whether ASPs should simply be create on-demand. Change-Id: Ic93b99047fb566cdb25a2f4139ebef54849dece9 --- M src/osmo_ss7_vty.c 1 file changed, 19 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 5dfa465..e661623 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -436,12 +436,30 @@ return CMD_SUCCESS; } +DEFUN(xua_accept_dyn_asp, xua_accept_dyn_asp_cmd, + "accept-asp-connections (pre-configured|dynamic-permitted)", + "Define what kind of ASP connections to accept\n" + "Accept only pre-confiugred ASPs (source IP/prt)\n" + "Accept any connection and dynamically create an ASP definition\n") +{ + struct osmo_xua_server *xs = vty->index; + + if (!strcmp(argv[0], "dynamic-permitted")) + xs->cfg.accept_dyn_reg = true; + else + xs->cfg.accept_dyn_reg = false; + + return CMD_SUCCESS; +} + static void write_one_xua(struct vty *vty, struct osmo_xua_server *xs) { vty_out(vty, " %s %u%s", get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), xs->cfg.local.port, VTY_NEWLINE); vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); + if (xs->cfg.accept_dyn_reg) + vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } @@ -1007,6 +1025,7 @@ install_element(L_CS7_NODE, &cs7_xua_cmd); install_element(L_CS7_NODE, &no_cs7_xua_cmd); install_element(L_CS7_XUA_NODE, &xua_local_ip_cmd); + install_element(L_CS7_XUA_NODE, &xua_accept_dyn_asp_cmd); } void osmo_ss7_set_vty_alloc_ctx(void *ctx) -- To view, visit https://gerrit.osmocom.org/2337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic93b99047fb566cdb25a2f4139ebef54849dece9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder