Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42590?usp=email )
Change subject: assignment_fsm: check ipaccess channel mode support
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File src/osmo-bsc/assignment_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/42590/comment/ca751c11_8a3cac54?usp… :
PS1, Line 375: const struct ipacc_supp_feat *feat =
might be prudent to add an OSMO_ASSERT on the correct BTS type here. Just in case anyone ever should call it from a context where those feature bits are not set at all and hence would result in a rather silent failure
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42590?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I680ba7993786f5486d671f931e75df4543670a37
Gerrit-Change-Number: 42590
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: Tue, 07 Apr 2026 11:02:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email )
Change subject: gprs_sm: gsm48_tx_gsm_act_pdp_acc(): fix QoS profile length
......................................................................
gprs_sm: gsm48_tx_gsm_act_pdp_acc(): fix QoS profile length
The Activate PDP Context Accept was always sending sizeof(default_qos)
(14 bytes) as the QoS profile length, regardless of what the UE
requested. Older modules such as the Air20X may crash and restart
during PDP attachment because of that.
In GTP, qos_req.l encodes 1 ARP byte followed by the QoS profile
octets, so (qos_req.l - 1) is the actual profile length. Mirror
back the same QoS profile length the UE sent in its request,
capped at sizeof(default_qos) to avoid overrunning the default_qos
buffer. This matters in particular for R97/R98 UEs that send a
3-byte QoS profile and should not receive a 14-byte response.
Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
Related: OS#6922
---
M src/sgsn/gprs_sm.c
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
lynxis lazus: Looks good to me, approved
laforge: Looks good to me, approved
diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c
index bcf2923..4f55b57 100644
--- a/src/sgsn/gprs_sm.c
+++ b/src/sgsn/gprs_sm.c
@@ -206,7 +206,16 @@
/* FIXME: copy QoS parameters from original request */
//msgb_lv_put(msg, pdp->lib->qos_neg.l, pdp->lib->qos_neg.v);
- msgb_lv_put(msg, sizeof(default_qos), (uint8_t *)&default_qos);
+
+ /* qos_req.l is encoded as 1 (ARP byte) + N QoS profile bytes in GTP.
+ * Mirror back the same QoS profile length the UE requested, capped at
+ * sizeof(default_qos) (14 bytes, covering up to R99/R7 QoS format). */
+ uint8_t qos_len = sizeof(default_qos);
+ if (pdp->lib->qos_req.l > 1)
+ qos_len = pdp->lib->qos_req.l - 1;
+ if (qos_len > sizeof(default_qos))
+ qos_len = sizeof(default_qos);
+ msgb_lv_put(msg, qos_len, (uint8_t *)&default_qos);
/* Radio priority 10.5.7.2 */
msgb_v_put(msg, pdp->lib->radio_pri);
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
Gerrit-Change-Number: 42050
Gerrit-PatchSet: 19
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42475?usp=email )
Change subject: pysim/pcsc: do not use getProtocol for protocol selection
......................................................................
pysim/pcsc: do not use getProtocol for protocol selection
The documentation of the getProtocol provided by pyscard says:
"Return bit mask for the protocol of connection, or None if no
protocol set. The return value is a bit mask of
CardConnection.T0_protocol, CardConnection.T1_protocol,
CardConnection.RAW_protocol, CardConnection.T15_protocol"
This suggests that the purpose of getProtocol is not to determine
which protocols are supported. Its purpose is to determine which
protocol is currently selected (either through auto selection or
through the explicit selection made by the API user). This means
we are using getProtocol wrong.
So far this was no problem, since the auto-selected protocol
should be a supported protocol anyway. However, the automatic
protocol selection may not always return a correct result (see
bug report from THD-siegfried [1]).
Let's not trust the automatic protocol selection. Instead let's
parse the ATR and make the decision based on the TD1/TD2 bytes).
[1] https://osmocom.org/issues/6952
Related: OS#6952
Change-Id: Ib119948aa68c430e42ac84daec8b9bd542db7963
---
M pySim/transport/pcsc.py
1 file changed, 11 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
jolly: Looks good to me, but someone else must approve
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index c92a3ba..21d3ce4 100644
--- a/pySim/transport/pcsc.py
+++ b/pySim/transport/pcsc.py
@@ -26,6 +26,7 @@
from smartcard.Exceptions import NoCardException, CardRequestTimeoutException, CardConnectionException
from smartcard.System import readers
from smartcard.ExclusiveConnectCardConnection import ExclusiveConnectCardConnection
+from smartcard.ATR import ATR
from osmocom.utils import h2i, i2h, Hexstr
@@ -84,18 +85,21 @@
self.disconnect()
# Make card connection and select a suitable communication protocol
+ # (Even though pyscard provides an automatic protocol selection, we will make an independent decision
+ # based on the ATR. There are two reasons for that:
+ # 1) In case a card supports T=0 and T=1, we perfer to use T=0.
+ # 2) The automatic protocol selection may be unreliabe on some platforms
+ # see also: https://osmocom.org/issues/6952)
self._con.connect()
- supported_protocols = self._con.getProtocol();
- self.disconnect()
- if (supported_protocols & CardConnection.T0_protocol):
- protocol = CardConnection.T0_protocol
+ atr = ATR(self._con.getATR())
+ if atr.isT0Supported():
+ self._con.setProtocol(CardConnection.T0_protocol)
self.set_tpdu_format(0)
- elif (supported_protocols & CardConnection.T1_protocol):
- protocol = CardConnection.T1_protocol
+ elif atr.isT1Supported():
+ self._con.setProtocol(CardConnection.T1_protocol)
self.set_tpdu_format(1)
else:
raise ReaderError('Unsupported card protocol')
- self._con.connect(protocol)
except CardConnectionException as exc:
raise ProtocolError() from exc
except NoCardException as exc:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42475?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib119948aa68c430e42ac84daec8b9bd542db7963
Gerrit-Change-Number: 42475
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>