fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36114?usp=email )
Change subject: fix regression in sctp-role / transport-role ......................................................................
fix regression in sctp-role / transport-role
We saw some fall-out in automatic testing where configs with sctp-role would suddenly save as transport-role. Let's avoid this by keeping sctp-role for users of SCTP.
Change-Id: Ic666b62948880445e030c637298d4e369b4c7e8e Fixes: 4d7e201 "VTY: rename 'sctp-role' to 'transport-role', add an alias" Related: SYS#5424, OS#6380 --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 20 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 890dded..9d58fb6 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1726,7 +1726,10 @@ vty_out(vty, " qos-class %u%s", asp->cfg.qos_class, VTY_NEWLINE); vty_out(vty, " role %s%s", osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), VTY_NEWLINE); - vty_out(vty, " transport-role %s%s", asp->cfg.is_server ? "server" : "client", VTY_NEWLINE); + if (asp->cfg.trans_proto == IPPROTO_SCTP) + vty_out(vty, " sctp-role %s%s", asp->cfg.is_server ? "server" : "client", VTY_NEWLINE); + else + vty_out(vty, " transport-role %s%s", asp->cfg.is_server ? "server" : "client", VTY_NEWLINE); if (asp->cfg.sctp_init.num_ostreams_present) vty_out(vty, " sctp-param init num-ostreams %u%s", asp->cfg.sctp_init.num_ostreams_value, VTY_NEWLINE); if (asp->cfg.sctp_init.max_instreams_present) diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index b8df809..7168d20 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -423,7 +423,7 @@ remote-ip 127.0.0.200 remote-ip 127.0.0.201 role sg - transport-role server + sctp-role server as my-ass m3ua asp my-asp routing-key 0 3.2.1