Attention is currently required from: fixeria, pespin.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42844?usp=email )
Change subject: server: fix msgb leak on duplicate link header
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
o re-add pespin and my +1 to v1 that is identical except commitlog msg.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42844?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: I79344fe942342f2a736878142b3cf036fc982eef
Gerrit-Change-Number: 42844
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: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 22 Jun 2026 07:58:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, pespin.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42841?usp=email )
Change subject: server: do not abort process on short conn message
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-pcap/+/42841/comment/2c71fd81_e117bf95?us… :
PS1, Line 17: Co-Authored-By: Claude Opus 4.8 (1M context) <noreply(a)anthropic.com>
> And after reviewing multiple patches, each time I see this I feel like I'm being bombed with ads/spa […]
Done
--
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: comment
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Ia102ff918ef8152d212e10a860f5dc70efec880b
Gerrit-Change-Number: 42841
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 22 Jun 2026 07:58:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42840?usp=email )
Change subject: client: vty: do not print NULL tls hostname
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
o re-add pespin and my +1 to v1 that is identical except commitlog msg.
--
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: comment
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
Gerrit-Change-Number: 42840
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: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 22 Jun 2026 07:57:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( 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().
Change-Id: If787ab7ed70aa2dcb0389ceb58620c2302c3431a
AI-Assisted: yes (Claude)
Related: OS#7020, OS#6794
---
M src/osmo-bts-trx/scheduler_trx.c
1 file changed, 16 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 770a54b..105ad38 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -576,6 +576,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: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If787ab7ed70aa2dcb0389ceb58620c2302c3431a
Gerrit-Change-Number: 42851
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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42854?usp=email )
Change subject: common: track whether gsm_time has been initialized
......................................................................
common: track whether gsm_time has been initialized
l1sap_info_time_ind() used 'bts->gsm_time.fn != 0' as a proxy for
"we have a previous frame number to diff against". This is unreliable:
Fn=0 is a _valid_ frame number, recurring on every hyperframe wrap.
If gsm_time.fn happened to be 0 and the next time indication jumped
forward by more than one frame, the real gap was silently swallowed.
It also gave no clean way to suppress the bogus "Invalid condition
detected: Frame difference is ..." message that appears when the PHY
(re)starts its TDMA frame number (e.g. from 0) on bring-up.
Introduce an explicit 'bts->gsm_time_valid' flag instead:
* l1sap_info_time_ind() treats the first indication of an epoch as
having no gap (frames_expired = 0): no warning, no RACH-slot
accounting;
* the flag is cleared in st_op_disabled_notinstalled_on_enter(), so
each BTS bring-up starts a fresh clock epoch regardless of which
FN the PHY reports first.
Change-Id: I7022b0ad084a0c224f7e8c04aca0648915b1a1c6
AI-Assisted: yes (Claude)
Related: OS#7020
---
M include/osmo-bts/bts.h
M src/common/l1sap.c
M src/common/nm_bts_fsm.c
3 files changed, 17 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index f2287b0..9691a03 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -337,6 +337,11 @@
uint8_t tc4_ctr;
} si;
struct gsm_time gsm_time;
+ /* false until the first PH-TIME.ind of the current clock epoch initializes
+ * gsm_time; reset in st_op_disabled_notinstalled_on_enter(). Used to tell a
+ * fresh clock start (PHY (re)started its TDMA FN, possibly from 0) apart from
+ * a real frame-number gap in l1sap_info_time_ind(). */
+ bool gsm_time_valid;
/* frame number statistics (FN in PH-RTS.ind vs. PH-DATA.ind */
struct {
int32_t min; /* minimum observed */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e150398..78938f8 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -621,13 +621,16 @@
DEBUGPFN(DL1P, info_time_ind->fn, "Rx MPH_INFO time ind\n");
- /* Calculate and check frame difference */
- frames_expired = GSM_TDMA_FN_SUB(info_time_ind->fn, bts->gsm_time.fn);
+ /* Calculate and check frame difference. On the first indication of a clock
+ * epoch (e.g. the PHY just (re)started its TDMA FN) there is no previous FN to
+ * diff against, so report no gap and account for no expired RACH slots. */
+ frames_expired = bts->gsm_time_valid ?
+ GSM_TDMA_FN_SUB(info_time_ind->fn, bts->gsm_time.fn) : 0;
+ bts->gsm_time_valid = true;
if (frames_expired > 1) {
- if (bts->gsm_time.fn)
- LOGPFN(DL1P, LOGL_ERROR, info_time_ind->fn,
- "Invalid condition detected: Frame difference is %"PRIu32"-%"PRIu32"=%u > 1!\n",
- info_time_ind->fn, bts->gsm_time.fn, frames_expired);
+ LOGPFN(DL1P, LOGL_ERROR, info_time_ind->fn,
+ "Invalid condition detected: Frame difference is %"PRIu32"-%"PRIu32"=%u > 1!\n",
+ info_time_ind->fn, bts->gsm_time.fn, frames_expired);
}
/* Update our data structures with the current GSM time */
diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c
index 36aad73..5c4a534 100644
--- a/src/common/nm_bts_fsm.c
+++ b/src/common/nm_bts_fsm.c
@@ -63,6 +63,9 @@
bts->si_valid = 0;
bts->bsic_configured = false;
bts->bsic = 0xff; /* invalid value */
+ /* The PHY will (re)start its TDMA frame number on the next bring-up;
+ * treat the first PH-TIME.ind as the start of a fresh clock epoch. */
+ bts->gsm_time_valid = false;
TALLOC_FREE(bts->mo.nm_attr);
bts_cbch_reset(bts);
bts_asci_notification_reset(bts);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42854?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7022b0ad084a0c224f7e8c04aca0648915b1a1c6
Gerrit-Change-Number: 42854
Gerrit-PatchSet: 1
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>