laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38231?usp=email )
Change subject: pySim-shell: recognize ADP pins longer than 8 digits as hexadecimal
......................................................................
pySim-shell: recognize ADP pins longer than 8 digits as hexadecimal
When a hexadecimal formatted ADM pin is retrieved via the
card_key_provider, it still requires the --pin-is-hex parameter so
that sanitize_pin_adm knows the correct format.
This unfortunately ruins the card_key_provider feature for all cards
that use hexadecimal pins, because the --pin-is-hex would also be
required in scripts, which makes a script either useable for cards
with hexadecimal ADM or for for cards with ASCII ADM.
To minimize the problem, let's recognize all ADM pins longer than 8
digits as hexadecimal in case --pin-is-hex is not set.
Related: OS#4348
Change-Id: Iad9398365d448946c499ce89e3cfb2c3af5d525e
---
M pySim-shell.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index d3f0d87..8c260aa 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -819,7 +819,7 @@
adm_type = opts.adm_type or 'ADM1'
# try to find an ADM-PIN if none is specified
result = card_key_provider_get_field(adm_type, key='ICCID', value=iccid)
- if opts.pin_is_hex:
+ if opts.pin_is_hex or (result and len(result) > 8):
pin_adm = sanitize_pin_adm(None, result)
else:
pin_adm = sanitize_pin_adm(result)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38231?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: Iad9398365d448946c499ce89e3cfb2c3af5d525e
Gerrit-Change-Number: 38231
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email )
Change subject: s1gw: make number of eNBs configurable via module params
......................................................................
Patch Set 2:
(1 comment)
File s1gw/S1GW_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210/comment/7413a2b1_9556… :
PS2, Line 226: vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars);
Oh, this is actually my TTCN-3 discovery of the month! Instead of doing `list := list & { item }` every time you want to add something, you can just reference items by index sequentially. And what's more important, it also works for template lists, for which you cannot do `list := list & { item }`.
> Sounds weird, given that you could have a lengthof(vc_conns)==4 and then do vc_conns[4543] = ...
It's a good question what happens in this case. I gave this code a try:
```
private type component dummy_CT { };
private type record of integer IntList;
testcase TC_record_of_test() runs on dummy_CT {
var IntList list;
list[0] := 42;
list[3] := 43;
log(list);
}
```
and this is what I got printed:
```
MTC@LEGION: { 42, <unbound>, <unbound>, 43 }
```
so you'll have thousands of unbound values in the middle if you do `vc_conns[4543]`.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?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: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f
Gerrit-Change-Number: 38210
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-Comment-Date: Fri, 20 Sep 2024 14:35:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email )
Change subject: s1gw: make number of eNBs configurable via module params
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?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: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f
Gerrit-Change-Number: 38210
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Sep 2024 14:35:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38209?usp=email )
Change subject: s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38209?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: Ia5413313cffb265f83ea0850e31dfb35274c28ba
Gerrit-Change-Number: 38209
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Sep 2024 14:34:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?usp=email )
Change subject: library: add generic Mutex API for parallel components
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206/comment/ad03cca5_3a93… :
PS2, Line 14: and there
: is no way for the PFCPEM to correlate which session belongs to which eNB.
> In theory, the S1GW could include a tuple of `{MME-UE-S1AP-ID, ENB-UE-S1AP-ID, e-RAB-ID}`, which would uniquely identify each PFCP session, even at the establishment phase.
I guess even only either MME-UE or ENB-UE side for S1AP-ID would be s ufficient in combination with the e-RAB-ID.
> I was considering this at the beginning and the question I had is **what kind of IE**? I could not find suitable PFCP IEs for that and I was not sure if adding Osmocom specific IEs to simplify the job for the testsuite is worth it.
Would have been worth raising the question at the time, IMHO.
> > If we cannot find a good PFCP IE to include such identity information in, 3GPP TS 29.244 Section 5.9 states we may add vendor-specific IEs anywhere and any implementation not understanding them shall just ignore them: [...]
>
> While I agree that it would also be useful for debugging, I've already put a significant effort into getting this implemented, debugged, and finally working. I hope we can get this merged for now and consider adding Osmocom specific IEs as a further improvement?
It's a bit of a double-edged sword. The mere fact that somebody has worked [far] on a given topic [without prior discussion] by itself doesn't make it the right thing to do, nor does it say we must merge it.
But yes, in this specific instance we can go ahead, the mutex approach is small/self-contained enough that it shouldn't be too hard to remove it later on, if needed.
> IMSI is not easily accessible for the S1GW, since it's usually part of the inner NAS PDUs. Digging into NAS in the S1GW (and likely having to keep some context around) sounds like an overkill to me. Some S1AP PDUs, like the `INITIAL CONTEXT SETUP` carry masked IMEISV (not IMSI), which is optional and unlikely can be considered a unique identifier, since it's the serial number part that is being masked.
Indeed, the IMSI is of course not available on S1. I was probably thinking in terms of Iu. Definitely we *should* not dig into NAS or higher protocol layers. On the other hand, as you probably know we will sadly have to do that anyway soon (in s1gw) in order to get per-subscriber statistics.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?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: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
Gerrit-Change-Number: 38206
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Sep 2024 14:32:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>