Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42838?usp=email )
Change subject: server: fix misleading data length validation log message
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-pcap/+/42838/comment/2e1bf368_1f12ab5b?us… :
PS1, Line 9: The format string "%u < %u <= %u" was printed with arguments
: (min_len, data->len, max_len), placing the offending length in
: the middle and mislabeling it. This is confusing. Let's print
: the actual length followed by the expected interval instead.
Hm, I actually think it's quite obvious the way it was. Reading the message I woould have assumed the minimum and maximum are left and right, plus the message actual length int he center. Doesn't make any sense otherwise.
We can of course merge the patch, but I think it is something I'd like to call "sideways development" as I don't really think it moves us forward.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42838?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Ice95c1f8ad1aa8de259364bd70eba0db8918b19e
Gerrit-Change-Number: 42838
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 18 Jun 2026 10:44:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42834?usp=email )
Change subject: esipa_rest_utils: fix searchCritera.profileClass type conversion
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42834?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I4bd223dbef00be9c800539b8d0dc9a84e3e93b73
Gerrit-Change-Number: 42834
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 18 Jun 2026 10:40:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/42851?usp=email )
Change subject: osmo-bts-trx: shut down on stale clock indication from transceiver
......................................................................
osmo-bts-trx: shut down on stale clock indication from transceiver
We expect the transceiver to be a reliable, monotonic clock source.
If it reports an FN far behind our local timer (elapsed_fn < 0) while
far more wall-clock time elapsed than its FN advance accounts for,
its clock has likely stalled and the indication carries a stale frame
number. Acting on it drags the scheduler backwards and re-transmits
already-sent TDMA frames, corrupting lchan-internal state(s).
Detect this and shut down the process, same rationale as the existing
"PC clock skew too high" check in trx_fn_timer_cb().
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: If787ab7ed70aa2dcb0389ceb58620c2302c3431a
Related: OS#7020, OS#6794
---
M src/osmo-bts-trx/scheduler_trx.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/51/42851/1
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index d791eaf..8c6f547 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -582,6 +582,22 @@
/* check for max clock skew */
if (elapsed_fn > MAX_FN_SKEW || elapsed_fn < -MAX_FN_SKEW) {
+ /* If the transceiver reports an FN far BEHIND our local timer
+ * (elapsed_fn < 0) while far more wall-clock time elapsed than its FN
+ * advance accounts for (error_us_since_clk large positive), then its
+ * clock has stalled and this CLCK.ind carries a stale (outdated) frame
+ * number. Acting on a stale indication would drag the scheduler backwards
+ * and corrupt lchan-internal state(s). Treat this as a fatal condition
+ * and shut down -- same rationale as the "PC clock skew too high"
+ * check in trx_fn_timer_cb(). */
+ if (elapsed_fn < 0 &&
+ error_us_since_clk > (int64_t)GSM_TDMA_FN_DURATION_uS * MAX_FN_SKEW) {
+ LOGP(DL1C, LOGL_FATAL, "Stale CLCK.ind: fn=%u is %"PRId64" us behind\n",
+ fn, error_us_since_clk);
+ osmo_timerfd_disable(&tcs->fn_timer_ofd);
+ bts_shutdown(bts, "TRX clock skew too high");
+ return -1;
+ }
LOGP(DL1C, LOGL_NOTICE, "GSM clock skew: old fn=%u, "
"new fn=%u\n", tcs->last_fn_timer.fn, fn);
return trx_setup_clock(bts, tcs, &tv_now, &interval, fn);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42851?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If787ab7ed70aa2dcb0389ceb58620c2302c3431a
Gerrit-Change-Number: 42851
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/42850?usp=email )
Change subject: osmo-bts-trx: reset BTS GSM time on clock (re)start
......................................................................
osmo-bts-trx: reset BTS GSM time on clock (re)start
trx_sched_clock_started() is called when the transceiver is powered
on, e.g. after an A-bis link re-establishment, which in ttcn3-bts-test
happens once per testcase. The transceiver restarts its TDMA frame
number from ~0, but we only reset the per-TRX clock state (tcs),
leaving bts->gsm_time.fn at the previous epoch's value.
As a result the first (low) FN reported by the transceiver is mistaken
for a huge backwards jump, e.g.:
l1sap.c:628 Invalid condition detected: Frame difference is 102-10386=2705364 > 1!
Reset bts->gsm_time to FN 0 here so each clock epoch starts clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: Id8da126e460d3846a3be5bdb271553457fdd0590
---
M src/osmo-bts-trx/scheduler_trx.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/42850/1
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 770a54b..d791eaf 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -491,6 +491,12 @@
osmo_fd_close(&tcs->fn_timer_ofd);
memset(tcs, 0, sizeof(*tcs));
tcs->fn_timer_ofd.fd = -1;
+ /* This is a fresh clock epoch: the transceiver was (re)powered on, e.g. due to
+ * A-bis link (re-)establishment, and (re)starts its TDMA frame number from 0.
+ * Reset our notion of GSM time accordingly, so that the first CLCK.ind reported
+ * by the transceiver is not mistaken for a huge backwards jump against a stale
+ * frame number left over from the previous epoch. */
+ gsm_fn2gsmtime(&bts->gsm_time, 0);
/* Set up timeout to shutdown BTS if no clock ind is received in a few
* seconds. Upon clock ind receival, fn_timer_ofd will be reused and
* timeout won't trigger.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42850?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id8da126e460d3846a3be5bdb271553457fdd0590
Gerrit-Change-Number: 42850
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42839?usp=email )
Change subject: client: fix off-by-one in wrapped pcap stats counter
......................................................................
client: fix off-by-one in wrapped pcap stats counter
When a libpcap stats counter (ps_recv/ps_drop/ps_ifdrop) wraps around
UINT_MAX, get_psbl_wrapped_ctr() computed the delta as
(UINT_MAX - old_val) + new_val, omitting the single increment that
takes the counter from UINT_MAX through zero. Add the missing +1 so
the reported delta matches the real number of increments.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: I66581910dbd1e955831a6ff913042059ad4994a7
---
M src/osmo_client_core.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/39/42839/1
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index daa5fd6..dbc2588 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -204,6 +204,7 @@
*/
if (old_val > new_val) {
ret = P_CAP_UINT_MAX() - old_val;
+ ret += 1; /* the wrap from UINT_MAX through zero is one increment */
ret += new_val;
return ret;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42839?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I66581910dbd1e955831a6ff913042059ad4994a7
Gerrit-Change-Number: 42839
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42840?usp=email )
Change subject: client: vty: do not print NULL tls hostname
......................................................................
client: vty: do not print NULL tls hostname
conn->tls_hostname defaults to NULL and can be cleared via "no tls
hostname". Writing it unconditionally emitted a "tls hostname (null)"
line, producing a config that does not re-parse. Guard it like the
other optional tls fields.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
---
M src/osmo_client_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/40/42840/1
diff --git a/src/osmo_client_vty.c b/src/osmo_client_vty.c
index 127e52f..6648417 100644
--- a/src/osmo_client_vty.c
+++ b/src/osmo_client_vty.c
@@ -74,7 +74,8 @@
{
if (conn->tls_on) {
vty_out(vty, "%s enable tls%s", indent, VTY_NEWLINE);
- vty_out(vty, "%s tls hostname %s%s", indent, conn->tls_hostname, VTY_NEWLINE);
+ if (conn->tls_hostname)
+ vty_out(vty, "%s tls hostname %s%s", indent, conn->tls_hostname, VTY_NEWLINE);
vty_out(vty, "%s %stls verify-cert%s", indent,
conn->tls_verify ? "" : "no ", VTY_NEWLINE);
if (conn->tls_capath)
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42840?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
Gerrit-Change-Number: 42840
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42841?usp=email )
Change subject: server: do not abort process on short conn message
......................................................................
server: do not abort process on short conn message
conn_read_cb() used OSMO_ASSERT() to check that the received
message holds at least a full osmo_pcap_data header. Although
conn_segmentation_cb2() should only ever hand up complete frames,
asserting on a length derived from network input means a framing
anomaly would abort the entire server (taking down all other clients'
captures). Close the offending connection gracefully instead,
consistent with the other error paths in this function.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: Ia102ff918ef8152d212e10a860f5dc70efec880b
---
M src/osmo_server_network.c
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/41/42841/1
diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c
index 3ab2003..5c0fc36 100644
--- a/src/osmo_server_network.c
+++ b/src/osmo_server_network.c
@@ -449,7 +449,14 @@
return 0;
}
- OSMO_ASSERT(msgb_length(msg) >= sizeof(*data));
+ if (OSMO_UNLIKELY(msgb_length(msg) < sizeof(*data))) {
+ /* Should not happen: conn_segmentation_cb2() only hands us complete
+ * frames. Close the conn gracefully instead of aborting the server. */
+ LOGP(DSERVER, LOGL_ERROR, "Read short message from conn: %u < %zu\n",
+ msgb_length(msg), sizeof(*data));
+ osmo_pcap_conn_close(conn);
+ return 0;
+ }
msg->l1h = msgb_data(msg);
data = (struct osmo_pcap_data *)msg->l1h;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42841?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Ia102ff918ef8152d212e10a860f5dc70efec880b
Gerrit-Change-Number: 42841
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42843?usp=email )
Change subject: server: fix zmq message leak on send failure
......................................................................
server: fix zmq message leak on send failure
zmq_msg_send() only transfers ownership of the message to ZeroMQ on
success. On failure the caller retains ownership, so the previously
init'd zmq_msg_t was leaked on every failed publish. Close it
explicitly on the error path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
Change-Id: I501b1bf55bede4e69fa5d9b3f38d87341482ff49
---
M src/osmo_server_core.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/43/42843/1
diff --git a/src/osmo_server_core.c b/src/osmo_server_core.c
index a13c64c..cc2c24e 100644
--- a/src/osmo_server_core.c
+++ b/src/osmo_server_core.c
@@ -59,9 +59,11 @@
memcpy(zmq_msg_data(&msg), data, len);
rc = zmq_msg_send(&msg, publ, flags);
if (rc == -1) {
- /* is the zmq_msg now owned? leak??? */
+ /* zmq_msg_send() only transfers ownership of the message on
+ * success; on failure we still own it and must close it. */
LOGP(DSERVER, LOGL_ERROR, "Failed to send data rc=%d errno=%d/%s\n",
rc, errno, strerror(errno));
+ zmq_msg_close(&msg);
return;
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42843?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I501b1bf55bede4e69fa5d9b3f38d87341482ff49
Gerrit-Change-Number: 42843
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>