pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41500?usp=email )
Change subject: ss7_xua_server_destroy(): Disconnect streams properly
......................................................................
ss7_xua_server_destroy(): Disconnect streams properly
destroying ASPs is wrong, since that'd also destroy non-dynamic ASPs,
hence erasing the configuration.
Instead, close oly the stream, and dynamic ASPs get destroyed as a
consequence.
Change-Id: I1309015053d2bd22d8fdf6298f8918a47527340e
---
M src/ss7_xua_srv.c
1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/00/41500/1
diff --git a/src/ss7_xua_srv.c b/src/ss7_xua_srv.c
index 077eea0..a97b07f 100644
--- a/src/ss7_xua_srv.c
+++ b/src/ss7_xua_srv.c
@@ -397,11 +397,13 @@
if (xs->server) {
osmo_stream_srv_link_close(xs->server);
osmo_stream_srv_link_destroy(xs->server);
+ xs->server = NULL;
}
- /* iterate and close all connections established in relation
- * with this server */
+
+ /* iterate and close all connections established in relation with this server.
+ * Dynamic ASPs in SCTP=server are destroyed when connection is closed. */
llist_for_each_entry_safe(asp, asp2, &xs->asp_list, siblings)
- osmo_ss7_asp_destroy(asp);
+ ss7_asp_disconnect_stream(asp);
llist_del(&xs->list);
talloc_free(xs);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41500?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I1309015053d2bd22d8fdf6298f8918a47527340e
Gerrit-Change-Number: 41500
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41499?usp=email )
Change subject: ss7_asp: Do AS-eSLS table cleanup during osmo_ss7_asp_destroy()
......................................................................
ss7_asp: Do AS-eSLS table cleanup during osmo_ss7_asp_destroy()
Use the existing API to cleanly remove the association between ASP and
AS.
Change-Id: I2c1b25d3e76703b88111b9935685a58d039b8e23
---
M src/ss7_asp.c
1 file changed, 3 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/99/41499/1
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 644c192..5325de9 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -760,13 +760,9 @@
llist_del(&asp->siblings);
/* unlink from all ASs we are part of */
- llist_for_each_entry(as, &asp->inst->as_list, list) {
- unsigned int i;
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- if (as->cfg.asps[i] == asp)
- as->cfg.asps[i] = NULL;
- }
- }
+ llist_for_each_entry(as, &asp->inst->as_list, list)
+ ss7_as_del_asp(as, asp);
+
/* unlink from ss7_instance */
asp->inst = NULL;
llist_del(&asp->list);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41499?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I2c1b25d3e76703b88111b9935685a58d039b8e23
Gerrit-Change-Number: 41499
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, lynxis lazus, osmith, pespin.
Hello Jenkins Builder, daniel, fixeria, lynxis lazus, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/41498?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: xua_rkm: Avoid unnecesary ASP lookup by name
......................................................................
xua_rkm: Avoid unnecesary ASP lookup by name
Change-Id: I5ca8f0180a0389d5de7b495cfe9f769985296383
---
M src/ss7_as.c
M src/ss7_as.h
M src/xua_rkm.c
3 files changed, 19 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/98/41498/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41498?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I5ca8f0180a0389d5de7b495cfe9f769985296383
Gerrit-Change-Number: 41498
Gerrit-PatchSet: 2
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: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41498?usp=email )
Change subject: xua_rkm: Avoid unnecesary ASP lookup by name
......................................................................
xua_rkm: Avoid unnecesary ASP lookup by name
Change-Id: I5ca8f0180a0389d5de7b495cfe9f769985296383
---
M src/ss7_as.c
M src/ss7_as.h
M src/xua_rkm.c
3 files changed, 20 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/98/41498/1
diff --git a/src/ss7_as.c b/src/ss7_as.c
index c2dee9d..e580dd3 100644
--- a/src/ss7_as.c
+++ b/src/ss7_as.c
@@ -194,16 +194,10 @@
* \param[in] as Application Server from which \ref asp is deleted
* \param[in] asp Application Server Process to delete from \ref as
* \returns 0 on success; negative in case of error */
-int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
+int ss7_as_del_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
{
- struct osmo_ss7_asp *asp;
unsigned int i;
- OSMO_ASSERT(ss7_initialized);
- asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
- if (!asp)
- return -ENODEV;
-
LOGPAS(as, DLSS7, LOGL_INFO, "Removing ASP %s from AS\n", asp->cfg.name);
/* Remove route from AS-eSLS table: */
@@ -224,6 +218,23 @@
return -EINVAL;
}
+/*! \brief Delete given ASP from given AS
+ * \param[in] as Application Server from which \ref asp is deleted
+ * \param[in] asp Name of the Application Server Process to delete from \ref as
+ * \returns 0 on success; negative in case of error */
+int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+
+ OSMO_ASSERT(ss7_initialized);
+ asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
+ if (!asp)
+ return -ENODEV;
+
+ return ss7_as_del_asp(as, asp);
+}
+
/*! \brief Destroy given Application Server
* \param[in] as Application Server to destroy */
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
diff --git a/src/ss7_as.h b/src/ss7_as.h
index 4f5db78..bb7b1b2 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -137,6 +137,7 @@
unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as);
int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
+int ss7_as_del_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
int ss7_as_get_local_role(const struct osmo_ss7_as *as);
void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as);
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 8817f49..7c98a3f 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -423,7 +423,7 @@
rctx, osmo_ss7_pointcode_print(inst, as->cfg.routing_key.pc));
/* remove ASP from AS */
- osmo_ss7_as_del_asp(as, asp->cfg.name);
+ osmo_ss7_as_del_asp(as, asp);
/* FIXME: Rather than spoofing teh ASP-DOWN.ind to the AS here,
* we should refuse RKM DEREG if the ASP is still ACTIVE */
osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_DOWN_IND, asp);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41498?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I5ca8f0180a0389d5de7b495cfe9f769985296383
Gerrit-Change-Number: 41498
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>