pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43887?usp=email ) Change subject: vty: tcap: Fix AS tcap-unroutable-sessions in show running config ...................................................................... vty: tcap: Fix AS tcap-unroutable-sessions in show running config The code printed and old naming which is not the one being used nowadays. Furthermore, let's print the tcap-unroutable-sessions stuff only if tcap is enabled on the AS, it makes no sense to print it otherwise. Since it is not only printed when tcap routing is enabled, make sure to always print in that case, even when the default reject-udts is used, so that the user gets better understanding of the (not) configured policy. Change-Id: Idf288701e70b867dedf59113794aa197db5a6382 --- M src/ss7_as_vty.c M tests/vty/osmo_stp_test_tcap.vty 2 files changed, 39 insertions(+), 17 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c index 3805db9..ca00ae3 100644 --- a/src/ss7_as_vty.c +++ b/src/ss7_as_vty.c @@ -642,24 +642,23 @@ vty_out(vty, " sls-shift %u%s", as->cfg.loadshare.sls_shift, VTY_NEWLINE); } #ifdef WITH_TCAP_LOADSHARING - if (as->cfg.loadshare.tcap.enabled) + if (as->cfg.loadshare.tcap.enabled) { + const char *tcap_unroutable_str = get_value_string_or_null(osmo_ss7_as_tcap_unroutable_vals, + as->cfg.loadshare.tcap.unroutable_tcap_msg); vty_out(vty, " tcap-routing%s", VTY_NEWLINE); - - const char *tcap_unroutable_str = get_value_string_or_null(osmo_ss7_as_tcap_unroutable_vals, - as->cfg.loadshare.tcap.unroutable_tcap_msg); - switch (as->cfg.loadshare.tcap.unroutable_tcap_msg) { - case SS7_AS_TCAP_UNROUTABLE_REJECT_UDTS: - /* default value, no need to write it out */ - break; - case SS7_AS_TCAP_UNROUTABLE_ROUTE_FALLBACK: - vty_out(vty, " tcap-route-fallback %s%s%s", tcap_unroutable_str, - osmo_ss7_pointcode_print(as->inst, as->cfg.loadshare.tcap.unroutable_tcap_fallback_dpc), - VTY_NEWLINE); - break; - case SS7_AS_TCAP_UNROUTABLE_LOAD_SHARE_AS: - vty_out(vty, " tcap-route-fallback %s%s", tcap_unroutable_str, VTY_NEWLINE); - default: - break; + switch (as->cfg.loadshare.tcap.unroutable_tcap_msg) { + case SS7_AS_TCAP_UNROUTABLE_REJECT_UDTS: + case SS7_AS_TCAP_UNROUTABLE_LOAD_SHARE_AS: + vty_out(vty, " tcap-unroutable-sessions %s%s", tcap_unroutable_str, VTY_NEWLINE); + break; + case SS7_AS_TCAP_UNROUTABLE_ROUTE_FALLBACK: + vty_out(vty, " tcap-unroutable-sessions %s %s%s", tcap_unroutable_str, + osmo_ss7_pointcode_print(as->inst, as->cfg.loadshare.tcap.unroutable_tcap_fallback_dpc), + VTY_NEWLINE); + break; + default: + break; + } } #endif /* WITH_TCAP_LOADSHARING */ diff --git a/tests/vty/osmo_stp_test_tcap.vty b/tests/vty/osmo_stp_test_tcap.vty index d32c237..255acbd 100644 --- a/tests/vty/osmo_stp_test_tcap.vty +++ b/tests/vty/osmo_stp_test_tcap.vty @@ -46,3 +46,26 @@ traffic-mode Remove explicit traffic mode of operation of this AS tcap-routing Disable TCAP-based routing when in traffic-mode loadshare point-code Point Code Specific Features + +OsmoSTP(config-cs7-as)# tcap-unroutable-sessions ? + reject-udts Reject the message with a UDTS + load-share-over-as Fallback to load-share over AS by using all available AS (round robin) + route-fallback Route to a different M3UA PC + +OsmoSTP(config-cs7-as)# do show cs7 config +cs7 instance 0 +... + as my-ass m3ua + routing-key 0 0.0.0 +... + +OsmoSTP(config-cs7-as)# tcap-routing + +OsmoSTP(config-cs7-as)# do show cs7 config +cs7 instance 0 +... + as my-ass m3ua + tcap-routing + tcap-unroutable-sessions reject-udts + routing-key 0 0.0.0 +... -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43887?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: Idf288701e70b867dedf59113794aa197db5a6382 Gerrit-Change-Number: 43887 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <daniel@totalueberwachung.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>