Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32635 )
Change subject: gmm: Provide allocated PTMSI & TLLI to upper layers
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-gprs/+/32635/comment/4bc87a19_7f808476
PS1, Line 12: App may want to store it somewhere in order to reuse it next time
: it wants to GMM Attach.
> app also needs to know the PTMSI to store the PTMSI on the SIM - or is this handled somewhere lower […]
That's precisely what I meant with "App may want to store it somewhere in order to reuse it next time it wants to GMM Attach." :D
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32635
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I552c43c55409773e2d13b72cba45a866165f203f
Gerrit-Change-Number: 32635
Gerrit-PatchSet: 1
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-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 15 May 2023 09:58:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32715 )
Change subject: vty test: show missing write-back of 'rnc-id'
......................................................................
vty test: show missing write-back of 'rnc-id'
Change-Id: I9eecda8678c32abbeaf39344ccdb14ed5a0828ce
---
M tests/osmo-hnbgw.vty
1 file changed, 44 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/15/32715/1
diff --git a/tests/osmo-hnbgw.vty b/tests/osmo-hnbgw.vty
index b8d562c..5ffbf15 100644
--- a/tests/osmo-hnbgw.vty
+++ b/tests/osmo-hnbgw.vty
@@ -1,2 +1,37 @@
OsmoHNBGW> enable
+OsmoHNBGW# configure terminal
+OsmoHNBGW(config)# list
+...
+ hnbgw
+...
+OsmoHNBGW(config)# hnbgw?
+ hnbgw Configure HNBGW options
+
+OsmoHNBGW(config)# hnbgw
+OsmoHNBGW(config-hnbgw)# list
+...
+ rnc-id <0-65535>
+ log-prefix (hnb-id|umts-cell-id)
+ iuh
+ iucs
+ iups
+...
+ pfcp
+ timer [(mgw|hnbgw|pfcp)] [TNNNN] [(<0-2147483647>|default)]
+
+OsmoHNBGW(config-hnbgw)# rnc-id?
+ rnc-id Configure the HNBGW's RNC Id, the common RNC Id used for all connected hNodeB. It is sent to each hNodeB upon HNBAP HNB-Register-Accept, and the hNodeB will subsequently send this as RANAP InitialUE Messages' GlobalRNC-ID IE. Takes effect as soon as the hNodeB re-registers.
+
+OsmoHNBGW(config-hnbgw)# rnc-id ?
+ <0-65535> RNC Id value
+
+OsmoHNBGW(config-hnbgw)# show running-config
+... !rnc-id
+
+OsmoHNBGW(config-hnbgw)# rnc-id 42
+OsmoHNBGW(config-hnbgw)# ### ERROR! We don't write back the rnc-id
+OsmoHNBGW(config-hnbgw)# show running-config
+...
+hnbgw
+... !rnc-id
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32715
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9eecda8678c32abbeaf39344ccdb14ed5a0828ce
Gerrit-Change-Number: 32715
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: arehbein.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/32713
to look at the new patch set (#2).
Change subject: core: Add function to update osmo_io_ops field for osmo_io_fd
......................................................................
core: Add function to update osmo_io_ops field for osmo_io_fd
Added, because the field 'io_ops' of 'struct osmo_io_fd' is not a
reference, so subsequent changes to the osmo_io_ops structure that was
used to set it up aren't automatically reflected in the osmo_io_fd
structure that got its copy.
Change-Id: Ie45402ad8e86e3cecf75ad78a512c17e61e68b19
---
M include/osmocom/core/osmo_io.h
M src/core/libosmocore.map
M src/core/osmo_io.c
3 files changed, 25 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/32713/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32713
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: arehbein/osmo_io_ipa
Gerrit-Change-Id: Ie45402ad8e86e3cecf75ad78a512c17e61e68b19
Gerrit-Change-Number: 32713
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32677 )
Change subject: add osmo_sccp_set_max_optional_data()
......................................................................
add osmo_sccp_set_max_optional_data()
So far, the optional data limit can only be modified via cs7 VTY,
because struct osmo_sccp_instance is private. Provide public API to set
this limit from C.
Change-Id: If3d22a0f65a7ed0be043027652402b32c356e322
---
M include/osmocom/sigtran/osmo_ss7.h
M src/sccp_user.c
M src/sccp_vty.c
3 files changed, 35 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index cd1779c..e025709 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -565,6 +565,8 @@
int local_port, int remote_port,
const char *remote_ip);
+void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
+
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in);
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod);
diff --git a/src/sccp_user.c b/src/sccp_user.c
index 34c663d..a04a1c3 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -827,6 +827,24 @@
return NULL;
}
+/*! Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
+ * For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD messages without any payload,
+ * and send the data payload in a separate Data Form 1 message. ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 130
+ * bytes for the 'Data' parameter. This limit can be adjusted here. May be useful for interop with nonstandard SCCP
+ * peers.
+ * \param[in] sccp SCCP instance to reconfigure.
+ * \param[in] val Number of bytes to set as upper bound for the optional data length, or pass a negative value to set
+ * the standard value of SCCP_MAX_OPTIONAL_DATA == 130, which conforms to ITU-T Q.713.
+ */
+void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val)
+{
+ if (!inst)
+ return;
+ if (val < 0)
+ val = SCCP_MAX_OPTIONAL_DATA;
+ inst->max_optional_data = val;
+}
+
/*! \brief get the SS7 instance that is related to the given SCCP instance
* \param[in] sccp SCCP instance
* \returns SS7 instance; NULL if sccp was NULL */
diff --git a/src/sccp_vty.c b/src/sccp_vty.c
index 90fb914..dda3ff0 100644
--- a/src/sccp_vty.c
+++ b/src/sccp_vty.c
@@ -183,7 +183,7 @@
int val;
if (!strcmp(argv[0], "standard"))
- val = SCCP_MAX_OPTIONAL_DATA;
+ val = -1;
else
val = atoi(argv[0]);
@@ -193,7 +193,7 @@
return CMD_WARNING;
}
- ss7->sccp->max_optional_data = val;
+ osmo_sccp_set_max_optional_data(ss7->sccp, val);
return CMD_SUCCESS;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32677
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If3d22a0f65a7ed0be043027652402b32c356e322
Gerrit-Change-Number: 32677
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32320 )
Change subject: sccp_scoc.c: fix infinite loop on conn ID exhaustion
......................................................................
sccp_scoc.c: fix infinite loop on conn ID exhaustion
Looking for an unused SCCP connection ID has no exit condition if all
connection IDs are in use. However unlikely it is that there are
16777215 active connections on one SCCP instance, add an exit condition.
Do so by implementing the ID lookup in a new separate function, which
qualifies for public API (upcoming patch).
So far, use an exit condition closest to previous behavior: iterate the
entire SCCP conn id number space before exiting in failure.
Change-Id: Ib64e0cb1ae0cc8b7bebcb2a352d4068b496b304a
---
M src/sccp_scoc.c
1 file changed, 41 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
neels: Looks good to me, approved
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 1838615..e63ebf8 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -539,10 +539,14 @@
return conn;
}
-/* Search for next free connection ID and allocate conn */
-static struct sccp_connection *conn_create(struct osmo_sccp_user *user)
+/* Return an unused SCCP connection ID.
+ * Callers should check the returned value: on negative return value, there are no unused IDs available.
+ * \param[in] sccp The SCCP instance to determine a new connection ID for.
+ * \return unused ID on success (range [0x0, 0x00fffffe]) or negative on elapsed max_attempts without an unused id (<0).
+ */
+static int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
{
- struct osmo_sccp_instance *sccp = user->inst;
+ int max_attempts = 0x00FFFFFE;
/* SUA: RFC3868 sec 3.10.4:
* The source reference number is a 4 octet long integer.
@@ -555,14 +559,26 @@
* Hence, as we currently use the connection ID also as local reference,
* let's simply use 24 bit ids to fit all link types (excluding 0x00ffffff).
*/
- do {
+ while (OSMO_LIKELY((max_attempts--) > 0)) {
/* Optimized modulo operation (% 0x00FFFFFE) using bitwise AND plus CMP: */
sccp->next_id = (sccp->next_id + 1) & 0x00FFFFFF;
if (OSMO_UNLIKELY(sccp->next_id == 0x00FFFFFF))
sccp->next_id = 0;
- } while (conn_find_by_id(sccp, sccp->next_id));
- return conn_create_id(user, sccp->next_id);
+ if (!conn_find_by_id(sccp, sccp->next_id))
+ return sccp->next_id;
+ }
+
+ return -1;
+}
+
+/* Search for next free connection ID and allocate conn */
+static struct sccp_connection *conn_create(struct osmo_sccp_user *user)
+{
+ int conn_id = osmo_sccp_instance_next_conn_id(user->inst);
+ if (conn_id < 0)
+ return NULL;
+ return conn_create_id(user, conn_id);
}
static void conn_opt_data_clear_cache(struct sccp_connection *conn)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32320
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ib64e0cb1ae0cc8b7bebcb2a352d4068b496b304a
Gerrit-Change-Number: 32320
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32321 )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: add public API: osmo_sccp_instance_next_conn_id()
......................................................................
add public API: osmo_sccp_instance_next_conn_id()
In struct osmo_sccp_instance, we have a next_id, to find an unused SCCP
connection ID. This is used for inbound SCCP connections.
At the same time, in each of our SCCP client programs, we have a
separate mechanism to find a connection ID for outbound connections.
See for example bsc_sccp.c: bsc_sccp_inst_next_conn_id()
It makes much more sense for callers to use the same
osmo_sccp_instance->next_id counter:
- Currently the inbound and outbound counters go out of sync: For
example, in osmo-bsc, if we have three MS doing a usual Complete Layer
3, osmo-bsc's counter increments by three. If we then have one
Handover Required coming back from the MSC, i.e. inbound SCCP
connection, the sccp_inst->next_id is behind by three, and will
iterate SCCP connections three times before finding an unused id.
- Each implementation has to take care to properly wrap the ID in its
valid range, e.g. in osmo-bsc:
test_id = (test_id + 1) & 0x00FFFFFF;
if (OSMO_UNLIKELY(test_id == 0x00FFFFFF))
test_id = 0;
Add public API so that callers can benefit from the internal
osmo_sccp_instance->next_id and do not need to duplicate the code for
staying within the proper range.
Change-Id: If59d524fbe1088a59ae1b69908e2d4bf67113439
---
M include/osmocom/sigtran/sccp_sap.h
M src/sccp_scoc.c
2 files changed, 41 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index 24d8832..d0fb040 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -339,3 +339,5 @@
int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b);
const char *osmo_sccp_user_name(struct osmo_sccp_user *scu);
+
+int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp);
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index e63ebf8..f6caeac 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -544,7 +544,7 @@
* \param[in] sccp The SCCP instance to determine a new connection ID for.
* \return unused ID on success (range [0x0, 0x00fffffe]) or negative on elapsed max_attempts without an unused id (<0).
*/
-static int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
+int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
{
int max_attempts = 0x00FFFFFE;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32321
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If59d524fbe1088a59ae1b69908e2d4bf67113439
Gerrit-Change-Number: 32321
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32676 )
Change subject: vty: make legacy 'hnbgw'/'sccp cr max...' fatal
......................................................................
vty: make legacy 'hnbgw'/'sccp cr max...' fatal
Make this deprecated command fatal when in a .cfg file:
hnbgw
sccp cr max-payload-len N
Because we now have:
cs7 instance N
sccp max-optional-data N
from libosmo-sigtran to replace it.
Context: The old command currently has no effect, because we had
implemented the specified fixed 130 byte data limit in libosmo-sigtran.
Recent libosmo-sigtran adds a variable limit configuration.
I considered implementing a shim to redirect the legacy command to the
new implementation, but that would be quite ugly: the old command is
under the 'hnbgw' node and would have to apply to all 'cs7' instances.
But we cannot assume that all 'cs7' are above or below the 'hnbgw' node
in the .cfg file. So I'd have to add global state to remember the legacy
config's value and apply that everywhere else. IMHO this is too much
complexity to support an obsoleted command that has a replacement.
To rule out all confusion that this situation may otherwise create,
abort osmo-hnbgw startup in presence of the legacy VTY command, logging
an error that hints at the new cfg item.
Related: SYS#6423
Change-Id: I71f82efe07af2c32f2aa01084bc8da6ce5c6cd1a
---
M TODO-RELEASE
M src/osmo-hnbgw/hnbgw_vty.c
2 files changed, 45 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE
index cf72895..ae5d20f 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -11,3 +11,4 @@
libosmo-sigtran >=1.7.0 Ensure SCCP CR max payload length of 130 bytes is enforced.
Uses osmo_scu_prim_hdr_name_c()
libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty()
+libosmo-sigtran >1.7.0 Require presence of vty 'cs7 instance'/'sccp max-optional-data' that the deprecated+fatal 'hnbgw'/'sccp cr...' tells the user to use instead.
diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index 216d8cc..93eca41 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -340,10 +340,12 @@
" longer has any effect.\n"
"ignored\n")
{
- vty_out(vty, "%% deprecated, ignored: remove this from your config file: 'sccp cr max-payload-len N'%s",
- VTY_NEWLINE);
- /* Still return success to not break osmo-hnbgw startup for users with old config files. */
- return CMD_SUCCESS;
+ const char *errmsg = "'hnbgw' / 'sccp cr max-payload-len': deprecated, ignored." \
+ " Instead, use 'cs7 instance N' / 'sccp max-optional-data N' (libosmo-sigtran >1.7.0)";
+ vty_out(vty, "%% %s%s", errmsg, VTY_NEWLINE);
+ LOGP(DLGLOBAL, LOGL_ERROR, "VTY cfg: %s\n", errmsg);
+ /* Users should not be mislead into thinking that this config still works. Abort (when reading .cfg file). */
+ return CMD_WARNING;
}
DEFUN(cfg_hnbgw_iucs_remote_addr,
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I71f82efe07af2c32f2aa01084bc8da6ce5c6cd1a
Gerrit-Change-Number: 32676
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged