Attention is currently required from: neels, laforge.
Hello Jenkins Builder, neels, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/33237
to look at the new patch set (#2).
Change subject: osmo_sccp_simple_client_on_ss7_id(): Always follow VTY config of ASP if it was explicitly defined in VTY
......................................................................
osmo_sccp_simple_client_on_ss7_id(): Always follow VTY config of ASP if it was explicitly defined in VTY
The VTY config defaults are "role sg" and "sctp-role server".
However, if not set explicitly in VTY,
osmo_sccp_simple_client_on_ss7_id() was replacing them to "role asp" and
"sctp-role client".
This is fine if the ASP is not defined/created at the VTY (aka
dynamically created with no config), but if the ASP is defined in the
VTY it becomes really confusing, since it's picking different defaults
than the usual ones.
Hence, follow always the same VTY defaults in
osmo_sccp_simple_client_on_ss7_id().
As a result of this change:
- Programs not defining the ASP over VTY keep the same behavior (ASP is
created with role=asp and sctp-role=client)
- Programs defining ASP over VTY (eg. "asp asp-clnt-msc-0 5000 0 m3ua")
explicitly setting "role" and "sctp-role": keep the same behavior
- Programs defining ASP over VTY but not explicitly setting "role" or
"sctp-role", will get now the usual defaults instead.
So in summary, strange cases where osmo_sccp_simple_client_on_ss7_id()
is used (osmo-bsc, osmo-hnbgw, osmo-msc) and the dynamically created
ASP is created through VTY, then the config file must also explicitly
define the following lines:
role asp
sctp-role client
This patch also changes the "show running-config" VTY cmd to also always
show the configured role and sctp-role values, which are of vital
importance to understand a given setup.
Change-Id: Ie81987265118e48173211f88b27a006115dc62d4
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7_vty.c
M src/sccp_user.c
M tests/vty/ss7_asp_test.vty
4 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/37/33237/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33237
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ie81987265118e48173211f88b27a006115dc62d4
Gerrit-Change-Number: 33237
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/33304
to look at the new patch set (#2).
Change subject: mgcp_client: Introduce mgcp_client_conf_alloc(), deprecate mgcp_client_conf_init()
......................................................................
mgcp_client: Introduce mgcp_client_conf_alloc(), deprecate mgcp_client_conf_init()
So far, the users of the old non-pooled API were in charge of allocating
the struct mgcp_client_conf by themselves, then init them using
mgcp_client_conf_init(). This causes a major problem, since it makes it
difficult to extend the struct mgcp_client_conf structure to add new
features, which may happen frequently.
The MGW pool API doesn't have this problem, because the struct
mgcp_client_conf is allocated as parts/fields of private structs defined
in internal headers. Only pointers to it are used in public headers.
While some programs already moved to the new MGW pool infrastructure,
they still use the old APIs to accomodate for old config files in order
to be back-compatible, hence most users of libosmo-mgcp-client are
affected.
Introduce an API to allocate the conf struct internally, which, while
still breaking the ABI, allows for a more relaxed update path where it's
possible to extend the struct mgcp_client_conf at the end.
Eventually the non pooled API should be gone and the struct
mgcp_client_conf can then be moved to a private header, but for now
et's add this small feature to avoid major ABI breakage.
Change-Id: Iba0853ed099a32cf1dde78c17e1b34343db41cfc
---
M TODO-RELEASE
M configure.ac
M include/Makefile.am
A include/osmocom/mgcp_client/defs.h
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
M tests/mgcp_client/mgcp_client_test.c
7 files changed, 76 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/04/33304/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33304
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iba0853ed099a32cf1dde78c17e1b34343db41cfc
Gerrit-Change-Number: 33304
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33304 )
Change subject: mgcp_client: Introduce mgcp_client_conf_alloc(), deprecate mgcp_client_conf_init()
......................................................................
mgcp_client: Introduce mgcp_client_conf_alloc(), deprecate mgcp_client_conf_init()
So far, the users of the old non-pooled API were in charge of allocating
the struct mgcp_client_conf by themselves, then init them using
mgcp_client_conf_init(). This causes a major problem, since it makes it
difficult to extend the struct mgcp_client_conf structure to add new
features, which may happen frequently.
The MGW pool API doesn't have this problem, because the struct
mgcp_client_conf is allocated as parts/fields of private structs defined
in internal headers. Only pointers to it are used in public headers.
While some programs already moved to the new MGW pool infrastructure,
they still use the old APIs to accomodate for old config files in order
to be back-compatible, hence most users of libosmo-mgcp-client are
affected.
Introduce an API to allocate the conf struct internally, which, while
still breaking the ABI, allows for a more relaxed update path where it's
possible to extend the struct mgcp_client_conf at the end.
Eventually the non pooled API should be gone and the struct
mgcp_client_conf can then be moved to a private header, but for now
et's add this small feature to avoid major ABI breakage.
Change-Id: Iba0853ed099a32cf1dde78c17e1b34343db41cfc
---
M TODO-RELEASE
M configure.ac
M include/Makefile.am
A include/osmocom/mgcp_client/defs.h
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
6 files changed, 66 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/04/33304/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index c5a3b36..69b38a9 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -24,3 +24,5 @@
# If any interfaces have been removed or changed since the last public release, a=0.
#
#library what description / commit summary line
+libosmo-mgcp-client NEW API mgcp_client_conf_alloc()
+libosmo-mgcp-client DEPRECATED mgcp_client_conf_init()
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index db8c4e6..8aa9c4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,8 @@
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0)
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.4.0)
-CFLAGS="$CFLAGS -pthread"
+CFLAGS="$CFLAGS -DBUILDING_LIBOSMOMGCPCLIENT -pthread"
+CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOMGCPCLIENT -pthread"
LDFLAGS="$LDFLAGS -pthread"
AC_ARG_ENABLE(sanitize,
diff --git a/include/Makefile.am b/include/Makefile.am
index eb262a6..0b66cb3 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -3,6 +3,7 @@
$(NULL)
nobase_include_HEADERS = \
+ osmocom/mgcp_client/defs.h \
osmocom/mgcp_client/mgcp_client.h \
osmocom/mgcp_client/mgcp_client_endpoint_fsm.h \
osmocom/mgcp_client/mgcp_client_fsm.h \
diff --git a/include/osmocom/mgcp_client/defs.h b/include/osmocom/mgcp_client/defs.h
new file mode 100644
index 0000000..edf27d1
--- /dev/null
+++ b/include/osmocom/mgcp_client/defs.h
@@ -0,0 +1,7 @@
+#include <osmocom/core/defs.h>
+
+#if BUILDING_LIBOSMOMGCPCLIENT
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text)
+#else
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text) OSMO_DEPRECATED(text)
+#endif
diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h
index 6adaf4b..46ec210 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <arpa/inet.h>
+#include <osmocom/mgcp_client/defs.h>
#include <osmocom/mgcp_client/mgcp_common.h>
/* See also: RFC 3435, chapter 3.5 Transmission over UDP */
@@ -133,7 +134,8 @@
struct mgcp_codec_param param;
};
-void mgcp_client_conf_init(struct mgcp_client_conf *conf);
+struct mgcp_client_conf *mgcp_client_conf_alloc(void *ctx);
+void mgcp_client_conf_init(struct mgcp_client_conf *conf) OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use mgcp_client_conf_alloc() (or even better, switch to the mgcp_client_pool API!)");
void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf *conf);
int mgcp_client_config_write(struct vty *vty, const char *indent);
struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp);
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index fc7d8e8..736f403 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -194,9 +194,7 @@
return pt;
}
-/*! Initialize MGCP client configuration struct with default values.
- * \param[out] conf Client configuration.*/
-void mgcp_client_conf_init(struct mgcp_client_conf *conf)
+static void _mgcp_client_conf_init(struct mgcp_client_conf *conf)
{
/* NULL and -1 default to MGCP_CLIENT_*_DEFAULT values */
*conf = (struct mgcp_client_conf){
@@ -209,6 +207,24 @@
INIT_LLIST_HEAD(&conf->reset_epnames);
}
+struct mgcp_client_conf *mgcp_client_conf_alloc(void *ctx)
+{
+ struct mgcp_client_conf *conf = talloc(ctx, struct mgcp_client_conf);
+ _mgcp_client_conf_init(conf);
+ return conf;
+}
+
+/*! Initialize MGCP client configuration struct with default values.
+ * \param[out] conf Client configuration.
+ *
+ * This function is deprecated and should not be used, as it may break if size
+ * of struct mgcp_client_conf changes in the future!
+ */
+void mgcp_client_conf_init(struct mgcp_client_conf *conf)
+{
+ _mgcp_client_conf_init(conf);
+}
+
static void mgcp_client_handle_response(struct mgcp_client *mgcp,
struct mgcp_response_pending *pending,
struct mgcp_response *response)
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33304
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iba0853ed099a32cf1dde78c17e1b34343db41cfc
Gerrit-Change-Number: 33304
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33226 )
Change subject: cosmetic: fix various typos in comments, log messages and VTY strings
......................................................................
cosmetic: fix various typos in comments, log messages and VTY strings
Change-Id: I9a8afc07ae278100ffe34407db0e196f0c9ce8af
---
M src/m3ua.c
M src/osmo_ss7_vty.c
M src/sccp_user.c
M src/sua.c
M src/xua_as_fsm.c
M tests/vty/ss7_asp_test.vty
6 files changed, 21 insertions(+), 12 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/m3ua.c b/src/m3ua.c
index 63297fe..8d82522 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -504,7 +504,7 @@
return -1;
/* send the msg to the AS for transmission. The AS FSM might
- * (depending on its state) enqueue it before trnsmission */
+ * (depending on its state) enqueue it before transmission */
rc = osmo_fsm_inst_dispatch(as->fi, XUA_AS_E_TRANSFER_REQ, msg);
if (rc < 0)
msgb_free(msg);
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 0d15c52..541d197 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -211,7 +211,7 @@
"xua rkm routing-key-allocation (static-only|dynamic-permitted)",
"SIGTRAN xxxUA related\n" "Routing Key Management\n"
"Routing Key Management Allocation Policy\n"
- "Only static (pre-confgured) Routing Keys permitted\n"
+ "Only static (pre-configured) Routing Keys permitted\n"
"Dynamically allocate Routing Keys for what ASPs request\n",
CMD_ATTR_IMMEDIATE)
{
@@ -514,7 +514,7 @@
DEFUN_ATTR(xua_accept_dyn_asp, xua_accept_dyn_asp_cmd,
"accept-asp-connections (pre-configured|dynamic-permitted)",
"Define what kind of ASP connections to accept\n"
- "Accept only pre-confiugred ASPs (source IP/prt)\n"
+ "Accept only pre-configured ASPs (source IP/port)\n"
"Accept any connection and dynamically create an ASP definition\n",
CMD_ATTR_IMMEDIATE)
{
diff --git a/src/sccp_user.c b/src/sccp_user.c
index a04a1c3..2be9cd4 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -646,7 +646,7 @@
asp->cfg.is_server = false;
/* Make sure that the role of this ASP is set to ASP unless the user
- * made a concious decision about the role via the VTY */
+ * made a conscious decision about the role via the VTY */
if (!asp->cfg.role_set_by_vty)
asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP;
diff --git a/src/sua.c b/src/sua.c
index bd51005..a20d751 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -258,7 +258,7 @@
}
/***********************************************************************
- * Transmitting SUA messsages to SCTP
+ * Transmitting SUA messages to SCTP
***********************************************************************/
static struct msgb *sua_to_msg(struct xua_msg *xua)
@@ -316,7 +316,7 @@
return -1;
/* send the msg to the AS for transmission. The AS FSM might
- * (depending on its state) enqueue it before trnsmission */
+ * (depending on its state) enqueue it before transmission */
rc = osmo_fsm_inst_dispatch(as->fi, XUA_AS_E_TRANSFER_REQ, msg);
if (rc < 0)
msgb_free(msg);
@@ -324,7 +324,7 @@
}
/***********************************************************************
- * Receiving SUA messsages from SCTP
+ * Receiving SUA messages from SCTP
***********************************************************************/
/*! \brief Decode SUA Global Title according to RFC3868 Section 3.10.2.3
@@ -427,7 +427,7 @@
* probably want to have a separate general parsing function storing
* the subparts in xua_msg_part. But before we do, we should find more
* users of this subpart parsing and be aware of the performance
- * tradeoff.
+ * trade-off.
*/
while (pos + sizeof(*par) < param->len) {
@@ -619,7 +619,7 @@
if (ntfy.info_string)
talloc_free(ntfy.info_string);
- /* TODO: should we report this soemwhere? */
+ /* TODO: should we report this somewhere? */
return 0;
}
@@ -680,7 +680,7 @@
OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_SUA);
/* caller owns msg memory, we shall neither free it here nor
- * keep references beyon the execution of this function and its
+ * keep references beyond the execution of this function and its
* callees. */
if (!asp->inst->sccp) {
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index 2f52762..2b16139 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -80,7 +80,7 @@
{
unsigned int i;
- /* this is a bit tricky. "osmo_ss7_as" has no configuation of a role,
+ /* this is a bit tricky. "osmo_ss7_as" has no configuration of a role,
* only the ASPs have. As they all must be of the same role, let's simply
* find the first one and return its role */
for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index 14ca25a..5faabd9 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -135,7 +135,7 @@
ss7_asp_vty_test(config-cs7)# xua rkm ?
routing-key-allocation Routing Key Management Allocation Policy
ss7_asp_vty_test(config-cs7)# xua rkm routing-key-allocation ?
- static-only Only static (pre-confgured) Routing Keys permitted
+ static-only Only static (pre-configured) Routing Keys permitted
dynamic-permitted Dynamically allocate Routing Keys for what ASPs request
ss7_asp_vty_test(config-cs7)# asp ?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33226
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I9a8afc07ae278100ffe34407db0e196f0c9ce8af
Gerrit-Change-Number: 33226
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/33226
to look at the new patch set (#3).
Change subject: cosmetic: fix various typos in comments, log messages and VTY strings
......................................................................
cosmetic: fix various typos in comments, log messages and VTY strings
Change-Id: I9a8afc07ae278100ffe34407db0e196f0c9ce8af
---
M src/m3ua.c
M src/osmo_ss7_vty.c
M src/sccp_user.c
M src/sua.c
M src/xua_as_fsm.c
M tests/vty/ss7_asp_test.vty
6 files changed, 21 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/26/33226/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33226
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I9a8afc07ae278100ffe34407db0e196f0c9ce8af
Gerrit-Change-Number: 33226
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33302 )
Change subject: Change several log lines to start with capital letter
......................................................................
Patch Set 1:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33302
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I98c59dd833b3d0ada5b1ffdba7a5fc2e8cbf6241
Gerrit-Change-Number: 33302
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jun 2023 15:25:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment