pespin has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/87/43887/1
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 7d5eea0..71d7661 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -632,24 +632,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 change 43887. To unsubscribe, or for help writing mail filters, visit settings.