pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40696?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: xua_asp_fsm: Move helper function to ss7_asp internal API
......................................................................
xua_asp_fsm: Move helper function to ss7_asp internal API
This function will be used in other files in follow-up commit.
Change-Id: I3eb57c3fb690e7486b52b2c433b25930d16599e5
---
M src/ss7_asp.c
M src/ss7_asp.h
M src/xua_asp_fsm.c
3 files changed, 30 insertions(+), 28 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 0fea556..7b819de 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -1549,3 +1549,30 @@
{
return _ss7_asp_get_all_rctx(asp, rctx, rctx_size, excl_as, false);
}
+
+/* determine the osmo_ss7_as_traffic_mode to be used by this ASP; will
+ * iterate over all AS configured for this ASP. If they're compatible,
+ * a single traffic mode is returned as enum osmo_ss7_as_traffic_mode.
+ * If they're incompatible, -EINVAL is returned. If there is none
+ * configured, -1 is returned */
+int ss7_asp_determine_traf_mode(const struct osmo_ss7_asp *asp)
+{
+ const struct osmo_ss7_as *as;
+ int tmode = -1;
+
+ llist_for_each_entry(as, &asp->inst->as_list, list) {
+ if (!osmo_ss7_as_has_asp(as, asp))
+ continue;
+ /* we only care about traffic modes explicitly set */
+ if (!as->cfg.mode_set_by_vty)
+ continue;
+ if (tmode == -1) {
+ /* this is the first AS; we use this traffic mode */
+ tmode = as->cfg.mode;
+ } else {
+ if (tmode != as->cfg.mode)
+ return -EINVAL;
+ }
+ }
+ return tmode;
+}
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index ec74e82..e25c85c 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -172,5 +172,7 @@
unsigned int ss7_asp_get_all_rctx_be(const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size,
const struct osmo_ss7_as *excl_as);
+int ss7_asp_determine_traf_mode(const struct osmo_ss7_asp *asp);
+
#define LOGPASP(asp, subsys, level, fmt, args ...) \
_LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args)
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index 8000839..c3a77da 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -195,33 +195,6 @@
talloc_free(aff_pc);
}
-/* determine the osmo_ss7_as_traffic_mode to be used by this ASP; will
- * iterate over all AS configured for this ASP. If they're compatible,
- * a single traffic mode is returned as enum osmo_ss7_as_traffic_mode.
- * If they're incompatible, -EINVAL is returned. If there is none
- * configured, -1 is returned */
-static int determine_traf_mode(struct osmo_ss7_asp *asp)
-{
- struct osmo_ss7_as *as;
- int tmode = -1;
-
- llist_for_each_entry(as, &asp->inst->as_list, list) {
- if (!osmo_ss7_as_has_asp(as, asp))
- continue;
- /* we only care about traffic modes explicitly set */
- if (!as->cfg.mode_set_by_vty)
- continue;
- if (tmode == -1) {
- /* this is the first AS; we use this traffic mode */
- tmode = as->cfg.mode;
- } else {
- if (tmode != as->cfg.mode)
- return -EINVAL;
- }
- }
- return tmode;
-}
-
/* add M3UA_IEI_ROUTE_CTX to xua_msg containig all routing keys of ASs within ASP */
static int xua_msg_add_asp_rctx(struct xua_msg *xua, struct osmo_ss7_asp *asp)
{
@@ -303,7 +276,7 @@
/* RFC3868 Ch. 3.6.1 */
xua->hdr = XUA_HDR(SUA_MSGC_ASPTM, SUA_ASPTM_ACTIVE);
/* Optional: Traffic Mode Type */
- rc = determine_traf_mode(asp);
+ rc = ss7_asp_determine_traf_mode(asp);
if (rc >= 0)
xua_msg_add_u32(xua, M3UA_IEI_TRAF_MODE_TYP, osmo_ss7_tmode_to_xua(rc));
/* Optional: Routing Context */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40696?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: I3eb57c3fb690e7486b52b2c433b25930d16599e5
Gerrit-Change-Number: 40696
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(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/+/40697?usp=email )
Change subject: xua_default_lm_fsm: Activate all ASPs in tmode broadcast/loadshare/roundrobin
......................................................................
xua_default_lm_fsm: Activate all ASPs in tmode broadcast/loadshare/roundrobin
If an ASP in an AS in tmode != override went down and up again, the LM
FSM was not re-activating it. This commit fixes it.
In tmode Override we don't want to swap the already active ASP, but in
other tmodes we want to have all of them activated.
This bug didn't affect during initial startup because usually all ASPs
were being activated while the AS wasn't yet active.
Change-Id: I548b88fa70b308033cb225623e803b731755651e
---
M src/xua_default_lm_fsm.c
1 file changed, 12 insertions(+), 6 deletions(-)
Approvals:
pespin: Looks good to me, approved
fixeria: 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/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index 2cf2010..92a6ea2 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -245,12 +245,18 @@
case LM_E_NOTIFY_IND:
OSMO_ASSERT(oxp->oph.primitive == OSMO_XLM_PRIM_M_NOTIFY);
OSMO_ASSERT(oxp->oph.operation == PRIM_OP_INDICATION);
- if (oxp->u.notify.status_type == M3UA_NOTIFY_T_STATCHG &&
- (oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_INACT ||
- oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_PEND)) {
- lm_fsm_state_chg(fi, S_ACTIVE);
- osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL);
- }
+
+ /* Not handling/interested in other status changes for now. */
+ if (oxp->u.notify.status_type != M3UA_NOTIFY_T_STATCHG)
+ break;
+
+ /* Don't change active ASP if there's already one active. */
+ if (ss7_asp_determine_traf_mode(lmp->asp) == OSMO_SS7_AS_TMOD_OVERRIDE &&
+ oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_ACT)
+ break;
+
+ lm_fsm_state_chg(fi, S_ACTIVE);
+ osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL);
break;
case LM_E_AS_INACTIVE_IND:
/* we now know that an AS is associated with this ASP at
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40697?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: I548b88fa70b308033cb225623e803b731755651e
Gerrit-Change-Number: 40697
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(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/+/40501?usp=email )
(
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: asp: Support Tx DAUD when ASP becomes activated
......................................................................
asp: Support Tx DAUD when ASP becomes activated
Otherwise the local Signalling Point has no way to know whether the
remote Signalling Points it wants to talk to are actually already
connected to the STP when it becomes active after the process starts
up, unless it attempts to transmit a message to it.
This pocedure is documented both for M3UA and SUA:
* RFC4666 4.6, RFC3868 4.6
* RFC4666 4.5.3, RFC3868 4.5.3 "ASP Auditing"
* RFC4666 5.5.1.1.3 "Support for ASP Querying of SS7 Destination States"
The M3UA specs (RFC4666 5.5.1.1.3) explicitly state that the point codes to audit are not
to be provided by uppers layers, so picking the ones from the locally
configured address book for now:
"""
Note: there is no primitive for the
MTP3-User to request this audit from the M3UA layer, as this is
initiated by an internal M3UA management function.
"""
This is not enabled by default since it's optional according to specs,
and some SGs may actually return errors (it's possible according to
RFC4666 to deny access to auditing by the SG).
Related: OS#5917
Related: SYS#7501
Change-Id: I7c8c5099d4d00ea6f4a8db59ed6b833fb0ffa43d
---
M src/ss7_asp.h
M src/ss7_asp_vty.c
M src/xua_asp_fsm.c
M tests/vty/osmo_stp_test.vty
4 files changed, 120 insertions(+), 17 deletions(-)
Approvals:
fixeria: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index 6bc0201..ec74e82 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -113,6 +113,9 @@
uint8_t qos_class;
uint32_t quirks;
+ /* Whether to Tx xUA DAUD during ASP activation when in ASP role. */
+ bool daud_act;
+
/* T_defs used by the default_lm: */
struct osmo_tdef *T_defs_xua;
diff --git a/src/ss7_asp_vty.c b/src/ss7_asp_vty.c
index 0c79b0f..c69b66b 100644
--- a/src/ss7_asp_vty.c
+++ b/src/ss7_asp_vty.c
@@ -548,6 +548,36 @@
return CMD_SUCCESS;
}
+/* TODO: "destination-audit periodic <time_inteval(s)>" See M3UA RFC4666 4.5.3 "Periodic". */
+DEFUN_ATTR(asp_destination_audit_asp_active, asp_destination_audit_asp_active_cmd,
+ "destination-audit asp-active",
+ "Configure ASP Auditing (xUA DAUD)\n"
+ "Transmit DAUD after ASP successful activate (for remote PCs in sccp address-book)\n",
+ CMD_ATTR_NODE_EXIT)
+{
+ struct osmo_ss7_asp *asp = vty->index;
+
+ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) {
+ vty_out(vty, "%% 'destination-audit' only possible in role ASP!%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ asp->cfg.daud_act = true;
+ return CMD_SUCCESS;
+}
+
+DEFUN_ATTR(asp_no_destination_audit_asp_active, asp_no_destination_audit_asp_active_cmd,
+ "no destination-audit asp-active",
+ NO_STR "Configure ASP Auditing (xUA DAUD)\n"
+ "Transmit xUA DAUD after ASP successful activate (for remote PCs in sccp address-book)\n",
+ CMD_ATTR_NODE_EXIT)
+{
+ struct osmo_ss7_asp *asp = vty->index;
+
+ asp->cfg.daud_act = false;
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(asp_block, asp_block_cmd,
"block",
"Allows a SCTP Association with ASP, but doesn't let it become active\n",
@@ -1259,6 +1289,9 @@
if (asp->cfg.tcp.user_timeout_present)
vty_out(vty, " tcp-param user-timeout %u%s", asp->cfg.tcp.user_timeout_value, VTY_NEWLINE);
+ if (asp->cfg.daud_act)
+ vty_out(vty, " destination-audit asp-active%s", VTY_NEWLINE);
+
for (i = 0; i < sizeof(uint32_t) * 8; i++) {
if (!(asp->cfg.quirks & ((uint32_t) 1 << i)))
continue;
@@ -1350,6 +1383,8 @@
install_lib_element(L_CS7_ASP_NODE, &asp_no_tcp_param_keepalive_cfg_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_tcp_param_user_timeout_cmd);
install_lib_element(L_CS7_ASP_NODE, &asp_no_tcp_param_user_timeout_cmd);
+ install_lib_element(L_CS7_ASP_NODE, &asp_destination_audit_asp_active_cmd);
+ install_lib_element(L_CS7_ASP_NODE, &asp_no_destination_audit_asp_active_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_xua_cmd_strs(&asp_timer_xua_cmd);
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index b7c6947..8000839 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -31,6 +31,7 @@
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_xua_srv.h"
+#include "sccp_internal.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
#include "xua_internal.h"
@@ -146,6 +147,54 @@
xua_asp_send_xlm_prim_simple(asp, prim_type, op);
}
+static void xua_asp_tx_snm_daud_address_book(struct osmo_ss7_asp *asp)
+{
+ struct osmo_ss7_instance *inst = asp->inst;
+ uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT];
+ unsigned int num_rctx;
+ uint32_t *aff_pc = NULL;
+ unsigned int num_aff_pc = 0;
+ struct osmo_sccp_addr_entry *entry;
+
+ num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), NULL);
+
+ /* First count required size of num_aff_pc array: */
+ llist_for_each_entry(entry, &inst->cfg.sccp_address_book, list) {
+ if (!(entry->addr.presence & OSMO_SCCP_ADDR_T_PC))
+ continue;
+ if (osmo_ss7_pc_is_local(inst, entry->addr.pc))
+ continue;
+ num_aff_pc++;
+ }
+ if (num_aff_pc == 0) {
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Skip Tx DAUD: No SCCP in address book\n");
+ return;
+ }
+ aff_pc = talloc_array(asp, uint32_t, num_aff_pc);
+ OSMO_ASSERT(aff_pc);
+
+ num_aff_pc = 0;
+ llist_for_each_entry(entry, &inst->cfg.sccp_address_book, list) {
+ uint32_t curr_aff_pc;
+ unsigned int i;
+ if (!(entry->addr.presence & OSMO_SCCP_ADDR_T_PC))
+ continue;
+ if (osmo_ss7_pc_is_local(inst, entry->addr.pc))
+ continue;
+ LOGPASP(asp, DLSS7, LOGL_DEBUG, "Tx DAUD: Requesting status of DPC=%u=%s\n",
+ entry->addr.pc, osmo_ss7_pointcode_print2(inst, entry->addr.pc));
+ curr_aff_pc = htonl(entry->addr.pc); /* mask = 0 */
+ for (i = 0; i < num_aff_pc; i++)
+ if (aff_pc[i] == curr_aff_pc)
+ break;
+ if (i == num_aff_pc) /* not found in array */
+ aff_pc[num_aff_pc++] = curr_aff_pc;
+ }
+
+ xua_tx_snm_daud(asp, rctx, num_rctx, aff_pc, num_aff_pc, "Isolation-ASP-ACTIVE");
+ talloc_free(aff_pc);
+}
+
/* determine the osmo_ss7_as_traffic_mode to be used by this ASP; will
* iterate over all AS configured for this ASP. If they're compatible,
* a single traffic mode is returned as enum osmo_ss7_as_traffic_mode.
@@ -699,6 +748,18 @@
struct xua_asp_fsm_priv *xafp = fi->priv;
struct osmo_ss7_asp *asp = xafp->asp;
+ if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP && asp->cfg.daud_act) {
+ /* RFC4666 4.6, RFC3868 4.6: "The ASP MAY choose to audit the availability
+ * of unavailable destinations by sending DAUD messages.
+ * This would be the case when, for example, an AS becomes active at an ASP
+ * and does not have current destination statuses."
+ * See also RFC4666 4.5.3, RFC3868 4.5.3 "ASP Auditing".
+ * See also RFC4666 5.5.1.1.3 "Support for ASP Querying of SS7 Destination States"
+ */
+ LOGPFSML(fi, LOGL_INFO, "Tx DAUD\n");
+ xua_asp_tx_snm_daud_address_book(asp);
+ }
+
dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND, asp);
}
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index a253c5a..0d6ffff 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -289,6 +289,8 @@
no tcp-param keepalive (time|intvl|probes)
tcp-param user-timeout <0-65535>
no tcp-param user-timeout
+ destination-audit asp-active
+ no destination-audit asp-active
quirk (no_notify|daud_in_asp|snm_inactive)
no quirk (no_notify|daud_in_asp|snm_inactive)
timer xua (ack|beat) <1-999999>
@@ -300,27 +302,29 @@
OsmoSTP(config-cs7-asp)# ?
...
- description Save human-readable description of the object
- remote-ip Specify Remote IP Address of ASP
- no Negate a command or set its defaults
- local-ip Specify Local IP Address from which to contact ASP
- qos-class Specify QoS Class of ASP
- role Specify the xUA role for this ASP
- transport-role Specify the transport layer role for this ASP
- sctp-param Configure SCTP parameters
- tcp-param Configure TCP 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
+ description Save human-readable description of the object
+ remote-ip Specify Remote IP Address of ASP
+ no Negate a command or set its defaults
+ local-ip Specify Local IP Address from which to contact ASP
+ qos-class Specify QoS Class of ASP
+ role Specify the xUA role for this ASP
+ transport-role Specify the transport layer role for this ASP
+ sctp-param Configure SCTP parameters
+ tcp-param Configure TCP parameters
+ destination-audit Configure ASP Auditing (xUA DAUD)
+ 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
...
OsmoSTP(config-cs7-asp)# no ?
...
- sctp-param Configure SCTP parameters
- tcp-param Configure TCP parameters
- quirk Disable quirk to work around interop issues
- shutdown Terminates SCTP association; New associations will be rejected
+ sctp-param Configure SCTP parameters
+ tcp-param Configure TCP parameters
+ destination-audit Configure ASP Auditing (xUA DAUD)
+ 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
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40501?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: I7c8c5099d4d00ea6f4a8db59ed6b833fb0ffa43d
Gerrit-Change-Number: 40501
Gerrit-PatchSet: 7
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: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: vty: Introduce cmd 'cs7 instance <0-15> asp NAME audit point-code POINT_CODE'
......................................................................
vty: Introduce cmd 'cs7 instance <0-15> asp NAME audit point-code POINT_CODE'
This command is useful to debug state of a given route on a remote SG.
It can also be used to manually update the state of the local stack when DAUD
response (DAVA/DUNA) arrives, in case we were not properly notified of some
change by the peer or due to some internal bug.
Change-Id: I607df3d84562e56d329bea1a730e26c8cdaae591
---
M src/ss7_asp_vty.c
M tests/vty/osmo_stp_test.vty
2 files changed, 59 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ss7_asp_vty.c b/src/ss7_asp_vty.c
index c69b66b..9cdaca8 100644
--- a/src/ss7_asp_vty.c
+++ b/src/ss7_asp_vty.c
@@ -99,6 +99,62 @@
{ 0, NULL }
};
+static void tx_daud_pc(struct osmo_ss7_asp *asp, uint32_t pc)
+{
+ uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT];
+ unsigned int num_rctx;
+ char buf_pc[MAX_PC_STR_LEN];
+ uint32_t aff_pc;
+
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "VTY: Tx DAUD pc=%u=%s\n",
+ pc, osmo_ss7_pointcode_print_buf(buf_pc, sizeof(buf_pc), asp->inst, pc));
+
+ aff_pc = htonl(pc); /* mask = 0 */
+ num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), NULL);
+ xua_tx_snm_daud(asp, rctx, num_rctx, &aff_pc, 1, "VTY");
+}
+
+DEFUN_ATTR(cs7_asp_audit, cs7_asp_audit_cmd,
+ "cs7 instance <0-15> asp NAME audit point-code POINT_CODE",
+ CS7_STR "Instance related commands\n" "SS7 Instance Number\n"
+ "ASP related commands\n" "Name of ASP\n"
+ "Audit destination Point Code (xUA DAUD)\n"
+ "Destination Point Code to audit\n"
+ "Destination Point Code value\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct osmo_ss7_instance *inst;
+ struct osmo_ss7_asp *asp;
+ int pc;
+
+ inst = osmo_ss7_instance_find(atoi(argv[0]));
+ if (!inst) {
+ vty_out(vty, "%% Unknown instance '%s'%s", argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ asp = osmo_ss7_asp_find_by_name(inst, argv[1]);
+ if (!asp) {
+ vty_out(vty, "%% Unknown ASP '%s'%s", argv[1], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ pc = osmo_ss7_pointcode_parse(asp->inst, argv[2]);
+ if (pc < 0) {
+ vty_out(vty, "%% Invalid point code (%s)%s", argv[2], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) {
+ vty_out(vty, "%% ASP audit (DAUD) can't be sent in role '%s'%s",
+ get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ tx_daud_pc(asp, pc);
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(cs7_asp, cs7_asp_cmd,
"asp NAME <0-65535> <0-65535> " XUA_VAR_STR,
"Configure Application Server Process\n"
@@ -1356,6 +1412,8 @@
NO_STR "Disable quirk to work around interop issues\n",
"\n", "\n", 0);
+ install_lib_element(ENABLE_NODE, &cs7_asp_audit_cmd);
+
install_node(&asp_node, NULL);
install_lib_element_ve(&show_cs7_asp_cmd);
install_lib_element_ve(&show_cs7_asp_name_cmd);
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index 0d6ffff..3f8dfaf 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -31,6 +31,7 @@
show cs7 (sua|m3ua|ipa) (sctp|tcp) [<0-65534>]
show cs7 config
cs7 instance <0-15> asp NAME disconnect
+ cs7 instance <0-15> asp NAME audit point-code POINT_CODE
show cs7 instance <0-15> asp
show cs7 instance <0-15> asp name ASP_NAME
show cs7 instance <0-15> asp-remaddr
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685?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: I607df3d84562e56d329bea1a730e26c8cdaae591
Gerrit-Change-Number: 40685
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(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/+/40694?usp=email )
Change subject: sccp: MTP-TRANSFER.req: Set OPC before route lookup
......................................................................
sccp: MTP-TRANSFER.req: Set OPC before route lookup
Before this commit, all SCCP UNIT-DATA.req came with unset xua->mtp.opc
and hence route lookup was done with opc=0 in mtp route label.
Since loadsharing may take into account some OPC bits to distribute
traffic, set the OPC properly before route lookup.
Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
---
M src/sccp_scrc.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index e28e584..d8239e3 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -142,6 +142,7 @@
struct xua_msg *xua,
const struct osmo_sccp_addr *called)
{
+ struct osmo_sccp_addr calling;
struct osmo_ss7_route *rt;
struct osmo_ss7_route_label rtlabel;
@@ -159,6 +160,11 @@
* primitive and send it via link
*/
+ if (sua_addr_parse(&calling, xua, SUA_IEI_SRC_ADDR) == 0 &&
+ (calling.presence & OSMO_SCCP_ADDR_T_PC))
+ xua->mtp.opc = calling.pc;
+
+
if (called->presence & OSMO_SCCP_ADDR_T_PC)
xua->mtp.dpc = called->pc;
if (!xua->mtp.dpc) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40694?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: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
Gerrit-Change-Number: 40694
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>