pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/40233?usp=email )
Change subject: up_session: Log regular Establish/Modify/Release as INFO
......................................................................
up_session: Log regular Establish/Modify/Release as INFO
Change-Id: Ibc1633f316d1d1009893a6e02361b5be190cbce8
---
M src/osmo-upf/up_session.c
M tests/unique_ids/unique_ids_test.err
2 files changed, 8 insertions(+), 8 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/osmo-upf/up_session.c b/src/osmo-upf/up_session.c
index a9bc7c3..b96fd49 100644
--- a/src/osmo-upf/up_session.c
+++ b/src/osmo-upf/up_session.c
@@ -738,7 +738,7 @@
return;
}
- LOGPFSML(fi, LOGL_NOTICE, "Session modified: %s\n", up_session_gtp_status(session));
+ LOGPFSML(fi, LOGL_INFO, "Session modified: %s\n", up_session_gtp_status(session));
return;
nack_response:
@@ -789,7 +789,7 @@
static void up_session_established_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct up_session *session = fi->priv;
- LOGPFSML(fi, LOGL_NOTICE, "Session established: %s %s\n", up_session_to_str_c(OTC_SELECT, session),
+ LOGPFSML(fi, LOGL_INFO, "Session established: %s %s\n", up_session_to_str_c(OTC_SELECT, session),
up_session_gtp_status(session));
}
@@ -820,7 +820,7 @@
{
struct up_session *session = fi->priv;
struct up_gtp_action *a;
- LOGPFSML(fi, LOGL_NOTICE, "Session releasing: %s %s\n", up_session_to_str_c(OTC_SELECT, session), up_session_gtp_status(session));
+ LOGPFSML(fi, LOGL_INFO, "Session releasing: %s %s\n", up_session_to_str_c(OTC_SELECT, session), up_session_gtp_status(session));
/* Shut down all active GTP rules */
while ((a = llist_first_entry_or_null(&session->active_gtp_actions, struct up_gtp_action, entry))) {
diff --git a/tests/unique_ids/unique_ids_test.err b/tests/unique_ids/unique_ids_test.err
index 8274f26..ea36988 100644
--- a/tests/unique_ids/unique_ids_test.err
+++ b/tests/unique_ids/unique_ids_test.err
@@ -87,7 +87,7 @@
DREF DEBUG up_session(1-2-3-4-0x1){INIT}: - msg-tx: now used by 1 (msg-rx)
DREF DEBUG up_peer(1-2-3-4){ASSOCIATED}: - msg-tx: now used by 1 (msg-rx)
DSESSION DEBUG up_session(1-2-3-4-0x1){INIT}: State change to ESTABLISHED (no timeout)
-DSESSION NOTICE up_session(1-2-3-4-0x1){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x100 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
+DSESSION INFO up_session(1-2-3-4-0x1){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x100 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
DREF INFO up_session(1-2-3-4-0x1){ESTABLISHED}: - msg-rx: now used by 0 (-)
DSESSION DEBUG up_session(1-2-3-4-0x1){ESTABLISHED}: Received Event UP_SESSION_EV_USE_COUNT_ZERO
DREF INFO up_peer(1-2-3-4){ASSOCIATED}: - msg-rx: now used by 0 (-)
@@ -155,7 +155,7 @@
DREF DEBUG up_session(1-2-3-4-0x2){INIT}: - msg-tx: now used by 1 (msg-rx)
DREF DEBUG up_peer(1-2-3-4){ASSOCIATED}: - msg-tx: now used by 1 (msg-rx)
DSESSION DEBUG up_session(1-2-3-4-0x2){INIT}: State change to ESTABLISHED (no timeout)
-DSESSION NOTICE up_session(1-2-3-4-0x2){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x101 SEID-l:0x2 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
+DSESSION INFO up_session(1-2-3-4-0x2){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x101 SEID-l:0x2 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
DREF INFO up_session(1-2-3-4-0x2){ESTABLISHED}: - msg-rx: now used by 0 (-)
DSESSION DEBUG up_session(1-2-3-4-0x2){ESTABLISHED}: Received Event UP_SESSION_EV_USE_COUNT_ZERO
DREF INFO up_peer(1-2-3-4){ASSOCIATED}: - msg-rx: now used by 0 (-)
@@ -187,7 +187,7 @@
DSESSION DEBUG up_session(1-2-3-4-0x1){ESTABLISHED}: Received Event UP_SESSION_EV_USE_COUNT_ZERO
DREF INFO up_peer(1-2-3-4){ASSOCIATED}: - msg-tx: now used by 0 (-)
DPEER DEBUG up_peer(1-2-3-4){ASSOCIATED}: Received Event UP_PEER_EV_USE_COUNT_ZERO
-DSESSION NOTICE up_session(1-2-3-4-0x1){ESTABLISHED}: Session releasing: peer:1.2.3.4 SEID-r:0x100 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
+DSESSION INFO up_session(1-2-3-4-0x1){ESTABLISHED}: Session releasing: peer:1.2.3.4 SEID-r:0x100 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
DNFT INFO Added NFT ruleset to queue: n:1 strlen:381
DNFT INFO Flushing NFT ruleset queue: reached max nr of rules: n:1 strlen:381 (flush count: 3 avg rules per flush: 1)
@@ -269,7 +269,7 @@
DREF DEBUG up_session(1-2-3-4-0x1){INIT}: - msg-tx: now used by 1 (msg-rx)
DREF DEBUG up_peer(1-2-3-4){ASSOCIATED}: - msg-tx: now used by 1 (msg-rx)
DSESSION DEBUG up_session(1-2-3-4-0x1){INIT}: State change to ESTABLISHED (no timeout)
-DSESSION NOTICE up_session(1-2-3-4-0x1){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x102 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
+DSESSION INFO up_session(1-2-3-4-0x1){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x102 SEID-l:0x1 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
DREF INFO up_session(1-2-3-4-0x1){ESTABLISHED}: - msg-rx: now used by 0 (-)
DSESSION DEBUG up_session(1-2-3-4-0x1){ESTABLISHED}: Received Event UP_SESSION_EV_USE_COUNT_ZERO
DREF INFO up_peer(1-2-3-4){ASSOCIATED}: - msg-rx: now used by 0 (-)
@@ -337,7 +337,7 @@
DREF DEBUG up_session(1-2-3-4-0x3){INIT}: - msg-tx: now used by 1 (msg-rx)
DREF DEBUG up_peer(1-2-3-4){ASSOCIATED}: - msg-tx: now used by 1 (msg-rx)
DSESSION DEBUG up_session(1-2-3-4-0x3){INIT}: State change to ESTABLISHED (no timeout)
-DSESSION NOTICE up_session(1-2-3-4-0x3){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x103 SEID-l:0x3 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
+DSESSION INFO up_session(1-2-3-4-0x3){ESTABLISHED}: Session established: peer:1.2.3.4 SEID-r:0x103 SEID-l:0x3 state:ESTABLISHED PDR-active:2/2 FAR-active:2/2 GTP-active:1
DREF INFO up_session(1-2-3-4-0x3){ESTABLISHED}: - msg-rx: now used by 0 (-)
DSESSION DEBUG up_session(1-2-3-4-0x3){ESTABLISHED}: Received Event UP_SESSION_EV_USE_COUNT_ZERO
DREF INFO up_peer(1-2-3-4){ASSOCIATED}: - msg-rx: now used by 0 (-)
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/40233?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ibc1633f316d1d1009893a6e02361b5be190cbce8
Gerrit-Change-Number: 40233
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40214?usp=email )
Change subject: asp: Avoid accessing dyn sctp-server ASP after closing conn during restart
......................................................................
asp: Avoid accessing dyn sctp-server ASP after closing conn during restart
This happens for instance if a dynamic ASP is shut down through VTY.
Change-Id: Ic9f2b01ddcf38d93396701cf5d406d1cfd18704d
---
M src/osmo_ss7_asp.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 56767e9..1c303b6 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -735,6 +735,7 @@
{
int rc;
char bufloc[512], bufrem[512];
+ bool destroyed = asp->dyn_allocated && asp->cfg.is_server;
OSMO_ASSERT(ss7_initialized);
ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local);
@@ -745,6 +746,10 @@
/* First tear down previous state if existing: */
ss7_asp_disconnect_stream(asp);
+ /* Dynamic ASPs in SCTP=server are destroyed when connection is closed. */
+ if (destroyed)
+ return 0;
+
/* The ASP FSM must be terminated *after* tearing down the conn, so that
* DISCONNECT events go up the stack */
if (asp->fi) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40214?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic9f2b01ddcf38d93396701cf5d406d1cfd18704d
Gerrit-Change-Number: 40214
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40197?usp=email )
Change subject: Implement ASP adm state shutdown
......................................................................
Implement ASP adm state shutdown
These commands are used to tweak administrative use of a given ASP,
tearing down the existing SCTP/TCP connection in the process of needed,
plus:
* In the case of SCTP client: avoid reconnecting until administratively
enabled again.
* In the case of SCTP server: Immediately close incoming connections for
that ASP until administratively enabled again.
Related: OS#6752
Change-Id: I7e4eedb65c4f2952f8b39ca4c539ca2f40e9946c
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7_asp.c
M src/osmo_ss7_vty.c
M src/osmo_ss7_xua_srv.c
M src/ss7_asp.h
M tests/vty/osmo_stp_route_prio.vty
M tests/vty/osmo_stp_test.vty
7 files changed, 121 insertions(+), 9 deletions(-)
Approvals:
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 0bde3d9..dc9aada 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -248,6 +248,7 @@
/*! in normal operation */
OSMO_SS7_ASP_ADM_S_ENABLED,
};
+extern const struct value_string osmo_ss7_asp_admin_state_names[];
enum osmo_ss7_asp_role {
OSMO_SS7_ASP_ROLE_ASP,
diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index f2d511a..56767e9 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -124,6 +124,13 @@
{ 0, NULL }
};
+const struct value_string osmo_ss7_asp_admin_state_names[] = {
+ { OSMO_SS7_ASP_ADM_S_SHUTDOWN, "SHUTDOWN" },
+ { OSMO_SS7_ASP_ADM_S_BLOCKED, "BLOCKED" },
+ { OSMO_SS7_ASP_ADM_S_ENABLED, "ENABLED" },
+ { 0, NULL }
+};
+
const struct value_string osmo_ss7_asp_role_names[] = {
{ OSMO_SS7_ASP_ROLE_ASP, "ASP" },
{ OSMO_SS7_ASP_ROLE_SG, "SG" },
@@ -553,6 +560,8 @@
}
rate_ctr_group_set_name(asp->ctrg, name);
asp->inst = inst;
+ /* ASP in "no shutdown" state by default: */
+ asp->cfg.adm_state = OSMO_SS7_ASP_ADM_S_ENABLED;
ss7_asp_peer_init(&asp->cfg.remote);
asp->cfg.remote.port = remote_port;
ss7_asp_peer_init(&asp->cfg.local);
@@ -746,6 +755,12 @@
return rc;
OSMO_ASSERT(asp->fi);
+ if (asp->cfg.adm_state == OSMO_SS7_ASP_ADM_S_SHUTDOWN) {
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Skipping start for ASP in administrative state %s\n",
+ get_value_string(osmo_ss7_asp_admin_state_names, OSMO_SS7_ASP_ADM_S_SHUTDOWN));
+ return 0;
+ }
+
/* Now start the new stream: */
if (asp->cfg.is_server) {
@@ -1014,8 +1029,11 @@
static int xua_cli_close_and_reconnect(struct osmo_stream_cli *cli)
{
+ struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(cli);
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Closing and reconnecting ASP\n");
xua_cli_close(cli);
- osmo_stream_cli_reconnect(cli);
+ if (asp->cfg.adm_state != OSMO_SS7_ASP_ADM_S_SHUTDOWN)
+ osmo_stream_cli_reconnect(cli);
return 0;
}
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index bf3bec2..41872fe 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1113,6 +1113,9 @@
asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;
}
+ /* Reset value, will be checked at osmo_ss7_vty_go_parent() */
+ asp->cfg.explicit_shutdown_state_by_vty_since_node_enter = false;
+
vty->node = L_CS7_ASP_NODE;
vty->index = asp;
vty->index_sub = &asp->cfg.description;
@@ -1424,9 +1427,33 @@
"Terminates SCTP association; New associations will be rejected\n",
CMD_ATTR_NODE_EXIT)
{
- /* TODO */
- vty_out(vty, "Not supported yet%s", VTY_NEWLINE);
- return CMD_WARNING;
+ struct osmo_ss7_asp *asp = vty->index;
+
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Applying Adm State change: %s -> %s\n",
+ get_value_string(osmo_ss7_asp_admin_state_names, asp->cfg.adm_state),
+ get_value_string(osmo_ss7_asp_admin_state_names, OSMO_SS7_ASP_ADM_S_SHUTDOWN));
+
+ asp->cfg.explicit_shutdown_state_by_vty_since_node_enter = true;
+ asp->cfg.adm_state = OSMO_SS7_ASP_ADM_S_SHUTDOWN;
+ ss7_asp_restart_after_reconfigure(asp);
+ return CMD_SUCCESS;
+}
+
+DEFUN_ATTR(asp_no_shutdown, asp_no_shutdown_cmd,
+ "no shutdown",
+ NO_STR "Terminates SCTP association; New associations will be rejected\n",
+ CMD_ATTR_NODE_EXIT)
+{
+ struct osmo_ss7_asp *asp = vty->index;
+
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Applying Adm State change: %s -> %s\n",
+ get_value_string(osmo_ss7_asp_admin_state_names, asp->cfg.adm_state),
+ get_value_string(osmo_ss7_asp_admin_state_names, OSMO_SS7_ASP_ADM_S_ENABLED));
+
+ asp->cfg.explicit_shutdown_state_by_vty_since_node_enter = true;
+ asp->cfg.adm_state = OSMO_SS7_ASP_ADM_S_ENABLED;
+ ss7_asp_restart_after_reconfigure(asp);
+ return CMD_SUCCESS;
}
DEFUN_ATTR(asp_quirk, asp_quirk_cmd,
@@ -2015,6 +2042,19 @@
vty_out(vty, " quirk %s%s", get_value_string(asp_quirk_names, (1 << i)), VTY_NEWLINE);
}
write_asp_timers(vty, " ", asp);
+
+ switch (asp->cfg.adm_state) {
+ case OSMO_SS7_ASP_ADM_S_SHUTDOWN:
+ vty_out(vty, " shutdown%s", VTY_NEWLINE);
+ break;
+ case OSMO_SS7_ASP_ADM_S_BLOCKED:
+ vty_out(vty, " blocked%s", VTY_NEWLINE);
+ break;
+ case OSMO_SS7_ASP_ADM_S_ENABLED:
+ /* Default, no need to print: */
+ vty_out(vty, " no shutdown%s", VTY_NEWLINE);
+ break;
+ }
}
@@ -3282,7 +3322,26 @@
switch (vty->node) {
case L_CS7_ASP_NODE:
asp = vty->index;
- ss7_asp_restart_after_reconfigure(asp);
+ if (asp->cfg.explicit_shutdown_state_by_vty_since_node_enter) {
+ /* Interactive VTY, inform of new behavior upon use of new '[no] shutdown' commands: */
+ if (vty->type != VTY_FILE)
+ vty_out(vty, "%% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered%s", VTY_NEWLINE);
+ asp->cfg.explicit_shutdown_state_by_vty_since_node_enter = false;
+ } else if (vty->type == VTY_FILE) {
+ /* Make sure config reading is backward compatible by starting the ASP if no explicit 'no shutdown' is read: */
+ vty_out(vty,
+ "%% VTY node 'asp' without a '[no] shutdown' command at the end is deprecated, "
+ "please make sure you update your cfg file for future compatibility.%s",
+ VTY_NEWLINE);
+ ss7_asp_restart_after_reconfigure(asp);
+ } else {
+ /* Interactive VTY without '[no] shutdown' explicit cmd, remind the user that we are no
+ * longer automatically restarting the ASP when going out of the "asp" node: */
+ vty_out(vty,
+ "%% NOTE: Make sure to use '[no] shutdown' command in 'asp' node "
+ "in order to restart the ASP for new configs to be applied.%s",
+ VTY_NEWLINE);
+ }
vty->node = L_CS7_NODE;
vty->index = asp->inst;
break;
@@ -3431,12 +3490,13 @@
install_lib_element(L_CS7_ASP_NODE, &asp_sctp_role_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_sctp_param_init_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_no_sctp_param_init_cmd);
- install_lib_element(L_CS7_ASP_NODE, &asp_block_cmd);
- install_lib_element(L_CS7_ASP_NODE, &asp_shutdown_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_quirk_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_no_quirk_cmd);
gen_asp_timer_cmd_strs(&asp_timer_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_timer_cmd);
+ install_lib_element(L_CS7_ASP_NODE, &asp_block_cmd);
+ install_lib_element(L_CS7_ASP_NODE, &asp_shutdown_cmd);
+ install_lib_element(L_CS7_ASP_NODE, &asp_no_shutdown_cmd);
install_node(&as_node, NULL);
install_lib_element_ve(&show_cs7_as_cmd);
diff --git a/src/osmo_ss7_xua_srv.c b/src/osmo_ss7_xua_srv.c
index 5483aae..893797a 100644
--- a/src/osmo_ss7_xua_srv.c
+++ b/src/osmo_ss7_xua_srv.c
@@ -74,6 +74,16 @@
LOGP(DLSS7, LOGL_INFO, "%s: New %s connection accepted\n", sock_name, proto_name);
+ asp = ss7_asp_find_by_socket_addr(fd, oxs->cfg.trans_proto);
+ if (asp && asp->cfg.adm_state == OSMO_SS7_ASP_ADM_S_SHUTDOWN) {
+ LOGPASP(asp, DLSS7, LOGL_NOTICE,
+ "Reject incoming new connection from %s for ASP in adm state %s\n",
+ sock_name, get_value_string(osmo_ss7_asp_admin_state_names, asp->cfg.adm_state));
+ close(fd);
+ talloc_free(sock_name);
+ return 0;
+ }
+
srv = osmo_stream_srv_create2(oxs, link, fd, NULL);
if (!srv) {
LOGP(DLSS7, LOGL_ERROR, "%s: Unable to create stream server "
@@ -107,7 +117,6 @@
}
osmo_stream_srv_set_closed_cb(srv, ss7_asp_xua_srv_conn_closed_cb);
- asp = ss7_asp_find_by_socket_addr(fd, oxs->cfg.trans_proto);
if (asp) {
LOGP(DLSS7, LOGL_INFO, "%s: matched connection to ASP %s\n",
sock_name, asp->cfg.name);
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index 5dee90a..2e25f97 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -87,6 +87,12 @@
enum osmo_ss7_asp_role role;
bool role_set_by_vty;
bool trans_role_set_by_vty;
+ /* Used internally by "asp" node to figure out if "no shutdown"
+ * was done explicitly, in order to avoid automatic asp
+ * reconfiguring/restart at go_parent().
+ * Can be dropped in the future once we make sure everybody uses
+ * "[no] shutdown" explicitly in cfg files. */
+ bool explicit_shutdown_state_by_vty_since_node_enter;
struct osmo_ss7_asp_peer local;
struct osmo_ss7_asp_peer remote;
diff --git a/tests/vty/osmo_stp_route_prio.vty b/tests/vty/osmo_stp_route_prio.vty
index b993cbb..1a3b516 100644
--- a/tests/vty/osmo_stp_route_prio.vty
+++ b/tests/vty/osmo_stp_route_prio.vty
@@ -6,15 +6,21 @@
OsmoSTP(config-cs7)# asp asp1 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.110
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
+OsmoSTP(config-cs7-asp)# no shutdown
OsmoSTP(config-cs7-asp)# exit
+% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered
OsmoSTP(config-cs7)# asp asp2 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.120
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
+OsmoSTP(config-cs7-asp)# no shutdown
OsmoSTP(config-cs7-asp)# exit
+% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered
OsmoSTP(config-cs7)# asp asp3 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.130
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
+OsmoSTP(config-cs7-asp)# no shutdown
OsmoSTP(config-cs7-asp)# exit
+% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered
OsmoSTP(config-cs7)# as as1 m3ua
OsmoSTP(config-cs7-as)# asp asp1
OsmoSTP(config-cs7-as)# routing-key 56 0.1.2
@@ -36,16 +42,19 @@
remote-ip 127.0.0.110
role sg
sctp-role server
+ no shutdown
asp asp2 2905 54321 m3ua
local-ip 27.0.0.1
remote-ip 127.0.0.120
role sg
sctp-role server
+ no shutdown
asp asp3 2905 54321 m3ua
local-ip 27.0.0.1
remote-ip 127.0.0.130
role sg
sctp-role server
+ no shutdown
as as1 m3ua
asp asp1
routing-key 56 0.1.2
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index e56e0ff..de852e1 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -283,8 +283,12 @@
transport-role (client|server)
sctp-param init (num-ostreams|max-instreams|max-attempts|timeout) <0-65535>
no sctp-param init (num-ostreams|max-instreams|max-attempts|timeout)
+ quirk (no_notify|daud_in_asp|snm_inactive)
+ no quirk (no_notify|daud_in_asp|snm_inactive)
+ timer lm (wait_asp_up|wait_notify|wait_notify_rkm|wait_rk_reg_resp) <1-999999>
block
shutdown
+ no shutdown
...
OsmoSTP(config-cs7-asp)# ?
@@ -297,6 +301,8 @@
role Specify the xUA role for this ASP
transport-role Specify the transport layer role for this ASP
sctp-param Configure SCTP parameters
+ quirk Enable quirk to work around interop issues
+ timer Configure ASP default timer values
block Allows a SCTP Association with ASP, but doesn't let it become active
shutdown Terminates SCTP association; New associations will be rejected
...
@@ -305,6 +311,7 @@
...
sctp-param Configure SCTP parameters
quirk Disable quirk to work around interop issues
+ shutdown Terminates SCTP association; New associations will be rejected
...
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.200
@@ -351,8 +358,9 @@
remote-ip 127.0.0.201
...
end
+OsmoSTP(config-cs7-asp)# no shutdown
OsmoSTP(config-cs7-asp)# exit
-
+% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered
OsmoSTP(config-cs7)# as my-ass m3ua
OsmoSTP(config-cs7-as)# list
...
@@ -594,6 +602,7 @@
remote-ip 127.0.0.201
role sg
sctp-role server
+ no shutdown
as my-ass m3ua
asp my-asp
routing-key 0 3.2.1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40197?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I7e4eedb65c4f2952f8b39ca4c539ca2f40e9946c
Gerrit-Change-Number: 40197
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>