pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39637?usp=email )
Change subject: Use default_layer_manager for all ASPs in SCTP-mode=client & m3ua-mode=ASP
......................................................................
Use default_layer_manager for all ASPs in SCTP-mode=client & m3ua-mode=ASP
With previous behavior, only first ASP configured as SCTPmode=client and
m3ua-mode=ASP in osmo_sccp_simple_client_on_ss7_id() would be applied
the default_layer_manager.
AS a result, if a client app (eg. osmo-bsc) would manually configure 1 AS
with 2 ASPs (and leave it to dynamic RKM to setup everything at osmo-stp),
it would fail, since the default LM FSM (in charge of waiting for NTFY and
then sending REQ_REG) would only be
applied to the first ASP.
So one would see 1st ASP doing ASPUP+REG_REQ+ASPAC correctly, but the
second one would do ASPUP+ASPAC directly, which would be refused by
osmo-stp since it had no routing context configured for that ASP/AS.
Change-Id: I50f9a088c55ad103cc23758192773fc855747e12
---
M src/osmo_ss7_asp.c
M src/osmo_ss7_vty.c
M src/sccp_user.c
M src/ss7_asp.h
M src/xua_default_lm_fsm.c
5 files changed, 37 insertions(+), 12 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 503b31c..b766071 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -1291,3 +1291,22 @@
}
return -1;
}
+
+/* Apply sane configs for unconfigured options and restart the ASP. */
+void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp)
+{
+ /* Make sure proper defaults values are applied if user didn't provide
+ * specific default values */
+ ss7_asp_set_default_peer_hosts(asp);
+
+ /* Apply default LM FSM for client ASP */
+ if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA &&
+ asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP &&
+ !asp->cfg.is_server) {
+ osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG);
+ } else {
+ osmo_ss7_asp_remove_default_lm(asp);
+ }
+
+ osmo_ss7_asp_restart(asp);
+}
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 576ad7c..8365db2 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -3001,9 +3001,7 @@
switch (vty->node) {
case L_CS7_ASP_NODE:
asp = vty->index;
- /* Make sure proper defaults values are set */
- ss7_asp_set_default_peer_hosts(asp);
- osmo_ss7_asp_restart(asp);
+ ss7_asp_restart_after_reconfigure(asp);
vty->node = L_CS7_NODE;
vty->index = asp->inst;
break;
diff --git a/src/sccp_user.c b/src/sccp_user.c
index d27d4bb..b5b6b4b 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -628,6 +628,7 @@
asp = asp_i;
LOGP(DLSCCP, LOGL_NOTICE, "%s: ASP %s for %s is not associated with any AS, using it\n",
name, asp->cfg.name, osmo_ss7_asp_protocol_name(prot));
+ osmo_ss7_as_add_asp(as, asp->cfg.name);
break;
}
if (!asp) {
@@ -642,6 +643,7 @@
if (!asp)
goto out_rt;
asp_created = true;
+ asp->simple_client_allocated = true;
/* Ensure that the ASP we use is set to operate as a client. */
asp->cfg.is_server = false;
/* Ensure that the ASP we use is set to role ASP. */
@@ -650,12 +652,10 @@
ss7_asp_peer_set_hosts(&asp->cfg.local, asp, &default_local_ip, 1);
if (default_remote_ip)
ss7_asp_peer_set_hosts(&asp->cfg.remote, asp, &default_remote_ip, 1);
- /* Make sure proper defaults are applied if app didn't provide specific default values */
- ss7_asp_set_default_peer_hosts(asp);
- asp->simple_client_allocated = true;
+ /* Make sure proper defaults are applied if app didn't
+ provide specific default values, then restart the ASP: */
+ ss7_asp_restart_after_reconfigure(asp);
}
-
- osmo_ss7_as_add_asp(as, asp->cfg.name);
}
/* Extra sanity checks if the ASP asp-clnt-* was pre-configured over VTY: */
@@ -696,12 +696,9 @@
goto out_asp;
}
}
+ /* ASP was already started here previously by VTY go_parent. */
}
- /* Restart ASP */
- if (prot != OSMO_SS7_ASP_PROT_IPA)
- osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG);
- osmo_ss7_asp_restart(asp);
LOGP(DLSCCP, LOGL_NOTICE, "%s: Using ASP instance %s\n", name,
asp->cfg.name);
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index 377274a..a05d870 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -110,5 +110,8 @@
int ss7_asp_apply_new_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx);
int ss7_asp_apply_drop_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx);
+void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp);
+void osmo_ss7_asp_remove_default_lm(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_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index fc01605..0952c9e 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -413,6 +413,14 @@
.prim_cb = default_lm_prim_cb,
};
+void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp)
+{
+ if (!asp->lm_priv)
+ return;
+ osmo_fsm_inst_term(asp->lm_priv, OSMO_FSM_TERM_ERROR, NULL);
+ asp->lm_priv = NULL;
+}
+
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level)
{
struct lm_fsm_priv *lmp;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39637?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: I50f9a088c55ad103cc23758192773fc855747e12
Gerrit-Change-Number: 39637
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
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/+/39639?usp=email )
Change subject: xua_rkm: Make sure existing AS gets added in list to receive ASP-INACTIVE.ind event
......................................................................
xua_rkm: Make sure existing AS gets added in list to receive ASP-INACTIVE.ind event
Eg. if a 2nd ASP tries to register against a given AS (RFC 4666 5.1.3),
it should still update the AS to tell it the ASP is in ASP-INACTIVE
state. This way depending on traffic mode, the AS state may change as
well.
Change-Id: I85948ab98623a8a53521eb2d2e84244011b39a93
---
M src/xua_rkm.c
1 file changed, 18 insertions(+), 11 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: 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
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index dd07db2..f616a3a 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -221,6 +221,14 @@
as = osmo_ss7_as_find_by_rctx(asp->inst, rctx);
if (as) {
LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Found existing AS for RCTX %u\n", rctx);
+ /* Early return before allocating stuff if no space left: */
+ if (*nas_idx >= max_nas_idx) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
+ max_nas_idx+1);
+ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
+ return -1;
+ }
+
if (as->cfg.routing_key.pc != dpc) {
LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: DPC doesn't match, rejecting AS (%u != %u)\n",
as->cfg.routing_key.pc, dpc);
@@ -244,6 +252,14 @@
as->cfg.mode_set_by_peer = true;
}
} else if (asp->inst->cfg.permit_dyn_rkm_alloc) {
+ /* Early return before allocating stuff if no space left: */
+ if (*nas_idx >= max_nas_idx) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
+ max_nas_idx+1);
+ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
+ return -1;
+ }
+
/* Create an AS for this routing key */
snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx);
as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA);
@@ -272,17 +288,6 @@
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_CANT_SUPP_UNQ_RT, 0);
return -1;
}
-
- /* append to list of newly assigned as */
- if (*nas_idx >= max_nas_idx) {
- ss7_route_destroy(rt);
- osmo_ss7_as_destroy(as);
- LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
- max_nas_idx+1);
- msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
- return -1;
- }
- newly_assigned_as[(*nas_idx)++] = as;
} else {
/* not permitted to create dynamic RKM entries */
LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: RCTX %u not found in configuration, and "
@@ -294,6 +299,8 @@
/* Success: Add just-create AS to connected ASP + report success */
osmo_ss7_as_add_asp(as, asp->cfg.name);
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx);
+ /* append to list of newly assigned as */
+ newly_assigned_as[(*nas_idx)++] = as;
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39639?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: I85948ab98623a8a53521eb2d2e84244011b39a93
Gerrit-Change-Number: 39639
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39663?usp=email )
Change subject: sctp_{server,proxy}: log SCTP TSN, SID, SSN, and data len
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39663?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I3692e3bfccdb2ab0a705b1f0903181197c0a2237
Gerrit-Change-Number: 39663
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 03 Mar 2025 20:04:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39663?usp=email )
Change subject: sctp_{server,proxy}: log SCTP TSN, SID, SSN, and data len
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39663?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I3692e3bfccdb2ab0a705b1f0903181197c0a2237
Gerrit-Change-Number: 39663
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 03 Mar 2025 18:58:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
falconia has abandoned this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email )
Change subject: rtp2trau HR: remove broken TRAU-16k-UL support
......................................................................
Abandoned
The alternative patch has been merged, bringing TRAU-16k-UL code into agreement with TRAU-8k-UL.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: If50036c4de9a11db524abffcd87d053878104982
Gerrit-Change-Number: 39623
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email )
Change subject: sctp_server: invalidate handler's Pid on 'EXIT'
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631/comment/ec06a213_ed5f… :
PS1, Line 11: happens, the current implementation sends an EOF to the eNB and simply
> yes, because it definetly doesn't send an EOF, probably an SCTP SHUTDOWN, I was confused by this.
Done
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
Gerrit-Change-Number: 39631
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 03 Mar 2025 18:15:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by pespin
Change subject: sctp_server: invalidate handler's Pid on 'EXIT'
......................................................................
sctp_server: invalidate handler's Pid on 'EXIT'
An 'EXIT' signal indicates that a connection handling process is dead,
so the respective pid shall not be referenced anymore. When this
happens, the current implementation shuts the eNB association down
gracefully and simply erases the respective client state from the
clients dictionary.
The problem with this approach is that we're bypassing the logic
in client_del/2 and, as a result, never decrementing the
?S1GW_GAUGE_S1AP_ENB_NUM_SCTP_CONNECTIONS. When in sctp_recv/2 we
receive a 'shutdown_comp' event and call client_del/2, the client
state is already gone.
Instead of erasing the client state on 'EXIT', invalidate handler's
pid by setting it to undefined and keep the clients dictionary intact.
Leave the task of dictionary manipulation up to client_{add,del} API.
Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
Related: SYS#7288
---
M src/sctp_server.erl
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/31/39631/2
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
Gerrit-Change-Number: 39631
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39653?usp=email )
Change subject: .gitignore: add utils/osmo-amr-inspect
......................................................................
.gitignore: add utils/osmo-amr-inspect
The osmo-amr-inspect binary built in utils is not covered by any
previous .gitignore files, thus its presence adds noise to
'git status' output, making other work in this repository more
difficult.
Change-Id: I5fd24c19b00f3ea3a18d30d6ee1ccb621c28434c
---
M .gitignore
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/.gitignore b/.gitignore
index 5dfa913..fd14f41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,8 @@
examples/stream-client
examples/stream-server
+utils/osmo-amr-inspect
+
Doxyfile
/examples/udp-test-client
/examples/udp-test-server
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39653?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5fd24c19b00f3ea3a18d30d6ee1ccb621c28434c
Gerrit-Change-Number: 39653
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>