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
This commit is contained in:
Harald Welte 2024-02-28 19:40:45 +01:00 committed by Vadim Yanitskiy
parent 4d7e20193c
commit dfa6e681d8
2 changed files with 5 additions and 2 deletions

View File

@ -1726,7 +1726,10 @@ static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp, bool show_d
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)

View File

@ -423,7 +423,7 @@ cs7 instance 0
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