Attention is currently required from: pespin, dexter.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30863 )

Change subject: bts: refuse to set invalid frame numbers
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

Patchset:

PS1:
> I meant osmo_panic() actually.
IMO, OSMO_ASSERT() would be enough as it gives enough context.


File src/bts.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/30863/comment/c867a6de_0be6cd00
PS1, Line 342: fn > GSM_TDMA_HYPERFRAME
According to 3GPP TS 45.002, section 4.3.3: "The frame number shall be cyclic 
and shall have a range of 0 to FN_MAX where FN_MAX = (26 x 51 x 2048) -1 = 
2715647 as defined in 3GPP TS 45.010".

GSM_TDMA_HYPERFRAME = (26 x 51 x 2048) = 2715648, without the -1, so it's not a 
valid TDMA Fn value. Your condition is not entirely correct, because it permits 
this value. Simply do OSMO_ASSERT(fn < GSM_TDMA_HYPERFRAME).



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30863
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Iaae31b370fababba975d419b0d20ac15618c296e
Gerrit-Change-Number: 30863
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Thu, 05 Jan 2023 13:01:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to