dexter has uploaded this change for review. ( 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, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/75/42475/1
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index c92a3ba..1c1b5b2 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
@@ -85,12 +86,12 @@
# Make card connection and select a suitable communication protocol
self._con.connect()
- supported_protocols = self._con.getProtocol();
+ atr = ATR(self._con.getATR())
self.disconnect()
- if (supported_protocols & CardConnection.T0_protocol):
- protocol = CardConnection.T0_protocol
+ if atr.isT0Supported():
+ protocol = CardConnection.T0_protocol
self.set_tpdu_format(0)
- elif (supported_protocols & CardConnection.T1_protocol):
+ elif atr.isT1Supported():
protocol = CardConnection.T1_protocol
self.set_tpdu_format(1)
else:
--
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: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib119948aa68c430e42ac84daec8b9bd542db7963
Gerrit-Change-Number: 42475
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42471?usp=email )
Change subject: General_types.ttcn: Introduce type OCT4_20n
......................................................................
General_types.ttcn: Introduce type OCT4_20n
This is useful to store EUAs of type v4,v6 or v4v6.
Change-Id: I00a35c444e3fb498712fbb4b9c310375c527052f
---
M library/General_Types.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/42471/1
diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index dca4ea2..1b9a732 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -155,6 +155,7 @@
type octetstring OCT3_17n length(3..17) with { variant "" };
type octetstring OCT4_8n length(4..8) with { variant "" };
type octetstring OCT4_16n length(4..16) with { variant "" };
+ type octetstring OCT4_20n length(4..20) with { variant "" };
//****************************************************
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42471?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I00a35c444e3fb498712fbb4b9c310375c527052f
Gerrit-Change-Number: 42471
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42472?usp=email )
Change subject: GTPv1U_Emulation: Clear entries from PidTable upon rx CUPS program_term_ind
......................................................................
GTPv1U_Emulation: Clear entries from PidTable upon rx CUPS program_term_ind
Otherwise it will evnetually run out of entries if enough commands are
called sequentially.
Change-Id: I7be2639761726c09e4ea6f75c57d8414c5dbf128
---
M library/GTPv1U_Emulation.ttcnpp
1 file changed, 32 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/42472/1
diff --git a/library/GTPv1U_Emulation.ttcnpp b/library/GTPv1U_Emulation.ttcnpp
index 6146147..5ae847d 100644
--- a/library/GTPv1U_Emulation.ttcnpp
+++ b/library/GTPv1U_Emulation.ttcnpp
@@ -82,9 +82,9 @@
/* pid <-> ConnHdlr mapping (for UECUPS process termination indication) */
type record PidTableRec {
/* process ID of the running process */
- integer pid,
+ integer pid optional,
/* component that started it */
- GTP1U_ConnHdlr vc_conn
+ GTP1U_ConnHdlr vc_conn optional
};
#endif
@@ -113,8 +113,7 @@
private function f_comp_by_pid(integer pid) runs on GTPv1U_Emulation_CT return GTP1U_ConnHdlr {
var integer i;
for (i := 0; i < sizeof(PidTable); i := i+1) {
- if (isbound(PidTable[i].pid) and PidTable[i].pid == pid) {
- /* fixme: remove */
+ if (ispresent(PidTable[i].pid) and PidTable[i].pid == pid) {
return PidTable[i].vc_conn;
}
}
@@ -136,10 +135,24 @@
}
#ifdef GTP1U_EMULATION_HAVE_UECUPS
+private function f_pid_clear(integer idx) runs on GTPv1U_Emulation_CT {
+ PidTable[idx].pid := omit;
+ PidTable[idx].vc_conn := omit;
+}
+
+private function f_pid_tbl_init() runs on GTPv1U_Emulation_CT {
+ var integer i;
+
+ /* Initialize the ConnectionTable */
+ for (i := 0; i < sizeof(PidTable); i := i+1) {
+ f_pid_clear(i);
+ }
+}
+
private function f_pid_tbl_add(integer pid, GTP1U_ConnHdlr vc_conn) runs on GTPv1U_Emulation_CT {
var integer i;
for (i := 0; i < sizeof(PidTable); i := i+1) {
- if (not isbound(PidTable[i].pid)) {
+ if (not ispresent(PidTable[i].pid)) {
PidTable[i].pid := pid;
PidTable[i].vc_conn := vc_conn;
return;
@@ -147,6 +160,17 @@
}
testcase.stop("No Space in PID Table for ", pid);
}
+
+private function f_pid_tbl_del(integer pid) runs on GTPv1U_Emulation_CT {
+ var integer i;
+ for (i := 0; i < sizeof(PidTable); i := i+1) {
+ if (ispresent(PidTable[i].pid) and PidTable[i].pid == pid) {
+ f_pid_clear(i);
+ return;
+ }
+ }
+ testcase.stop("No Space in PID Table for ", pid);
+}
#endif
@@ -209,6 +233,8 @@
g_c_seq_nr := f_rnd_int(65535);
g_gtp1u_cfg := cfg;
+ f_pid_tbl_init();
+
if (g_gtp1u_cfg.use_gtpu_daemon) {
#ifdef GTP1U_EMULATION_HAVE_UECUPS
map(self:UECUPS, system:UECUPS);
@@ -241,8 +267,8 @@
/* handle incoming program_term_ind; dispatch to whatever component started the process */
[] UECUPS.receive(tr_UECUPS_RecvFrom_R({program_term_ind:=?})) -> value rx {
vc_conn := f_comp_by_pid(rx.msg.program_term_ind.pid);
+ f_pid_tbl_del(rx.msg.program_term_ind.pid);
CLIENT.send(rx.msg.program_term_ind) to vc_conn;
- /* FIXME: remove from table */
repeat;
}
/* handle incoming ipv6_slaac_ind; dispatch to whatever component started the process */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42472?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7be2639761726c09e4ea6f75c57d8414c5dbf128
Gerrit-Change-Number: 42472
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, osmith.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder
Change subject: 5gc: Introduce tests TC_ng_register_ping6(_256)
......................................................................
5gc: Introduce tests TC_ng_register_ping6(_256)
Change-Id: Iedf3697265b91bdda85e8d32402345ea8d58dc9f
---
M 5gc/C5G_Tests.ttcn
M 5gc/ConnHdlr.ttcn
M 5gc/expected-results.xml
M 5gc/open5gs/open5gs-upf.yaml
M 5gc/testenv.sh
5 files changed, 108 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/60/42460/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iedf3697265b91bdda85e8d32402345ea8d58dc9f
Gerrit-Change-Number: 42460
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, osmith.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42459?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: GTPv1U_Emulation: Support IPv6 SLAAC with osmo-uecups
......................................................................
GTPv1U_Emulation: Support IPv6 SLAAC with osmo-uecups
Depends: osmo-uecups.git Change-Id I917b5c70f143d48b55b4e270e24594d1a36f71aa
Change-Id: Ic368383ea65161297e57a298a12c7b4adc927142
---
M deps/Makefile
M library/GTPv1U_Emulation.ttcnpp
2 files changed, 26 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/42459/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42459?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic368383ea65161297e57a298a12c7b4adc927142
Gerrit-Change-Number: 42459
Gerrit-PatchSet: 2
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460?usp=email )
Change subject: 5gc: Introduce tests TC_ng_register_ping6(_256)
......................................................................
Patch Set 2:
(2 comments)
File 5gc/C5G_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460/comment/c3a2863c_9391… :
PS2, Line 436: f_ping4
> shouldn't this be ping6?
The naming of the function is actually wrong, it just works fine here. I'll rename it when supporting IPv4v6 addresses as a next step.
File 5gc/ConnHdlr.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460/comment/4e9d4704_b219… :
PS2, Line 1327: //user_addr := g_pars.ue_pars.sess_pars.ipv6_interface_id;
> do you want to keep this commented out line?
thanks, fixed it will push with next version of the patch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42460?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iedf3697265b91bdda85e8d32402345ea8d58dc9f
Gerrit-Change-Number: 42460
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 23 Mar 2026 16:23:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>