lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2023

  • 1 participants
  • 2205 discussions
Change in libosmocore[master]: ASCI: add VBS/VGCS support to BTS features list
by laforge 24 Jan '23

24 Jan '23
Attention is currently required from: msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31046 ) Change subject: ASCI: add VBS/VGCS support to BTS features list ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I583a170070c192c6c47fae41ce923a7439561b4f Gerrit-Change-Number: 31046 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 13:17:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: pySim-trace: Fix missing MANAGE CHANNEL decode
by laforge 24 Jan '23

24 Jan '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/30439 ) Change subject: pySim-trace: Fix missing MANAGE CHANNEL decode ...................................................................... pySim-trace: Fix missing MANAGE CHANNEL decode old output: 00 MANAGE CHANNEL 01 9110 new output: 00 MANAGE CHANNEL 01 9110 {'mode': 'open_channel', 'created_channel': 1} Change-Id: Iac5b24c14d2b68d526ab347462b72548b8731b30 --- M pySim/apdu/ts_102_221.py 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py index fb2f375..ea45602 100644 --- a/pySim/apdu/ts_102_221.py +++ b/pySim/apdu/ts_102_221.py @@ -393,10 +393,12 @@ manage_channel = rs.get_lchan_by_cla(self.cla) manage_channel.add_lchan(created_channel_nr) self.col_id = '%02u' % created_channel_nr + return {'mode': mode, 'created_channel': created_channel_nr } elif mode == 'close_channel': closed_channel_nr = self.cmd_dict['p2'] rs.del_lchan(closed_channel_nr) self.col_id = '%02u' % closed_channel_nr + return {'mode': mode, 'closed_channel': closed_channel_nr } else: raise ValueError('Unsupported MANAGE CHANNEL P1=%02X' % self.p1) 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30439 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iac5b24c14d2b68d526ab347462b72548b8731b30 Gerrit-Change-Number: 30439 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in pysim[master]: pySim-trace: Also consider SW 91xx as successful
by laforge 24 Jan '23

24 Jan '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/30440 ) Change subject: pySim-trace: Also consider SW 91xx as successful ...................................................................... pySim-trace: Also consider SW 91xx as successful Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6 --- M pySim/apdu/__init__.py 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/pySim/apdu/__init__.py b/pySim/apdu/__init__.py index 3961fe9..1d1174d 100644 --- a/pySim/apdu/__init__.py +++ b/pySim/apdu/__init__.py @@ -135,7 +135,12 @@ if callable(method): return method() # default case: only 9000 is success - return self.sw == b'\x90\x00' + if self.sw == b'\x90\x00': + return True + # This is not really a generic positive APDU SW but specific to UICC/SIM + if self.sw[0] == 0x91: + return True + return False class ApduCommand(Apdu, metaclass=ApduCommandMeta): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30440 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6 Gerrit-Change-Number: 30440 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in pysim[master]: pySim-trace: Add support for reading GSMTAP from pcap files
by laforge 24 Jan '23

24 Jan '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/30438 ) Change subject: pySim-trace: Add support for reading GSMTAP from pcap files ...................................................................... pySim-trace: Add support for reading GSMTAP from pcap files So far we supported * GSMTAP live traces via a UDP socket * RSPRO traces from pcap files (or live) We were lacking support for reading GSMTAP stored in pcap, which is what this patch implements. Change-Id: I46d42774b39a2735500ff5804206ddcfa545568c --- M pySim-trace.py A pySim/apdu_source/pyshark_gsmtap.py 2 files changed, 98 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/pySim-trace.py b/pySim-trace.py index 33cb75a..79069a6 100755 --- a/pySim-trace.py +++ b/pySim-trace.py @@ -18,6 +18,7 @@ from pySim.apdu_source.gsmtap import GsmtapApduSource from pySim.apdu_source.pyshark_rspro import PysharkRsproPcap, PysharkRsproLive +from pySim.apdu_source.pyshark_gsmtap import PysharkGsmtapPcap from pySim.apdu.ts_102_221 import UiccSelect, UiccStatus @@ -130,6 +131,11 @@ parser_gsmtap.add_argument('-p', '--bind-port', default=4729, help='Local UDP port') +parser_gsmtap_pyshark_pcap = subparsers.add_parser('gsmtap-pyshark-pcap', help=""" + PCAP file containing GSMTAP (SIM APDU) communication; processed via pyshark.""") +parser_gsmtap_pyshark_pcap.add_argument('-f', '--pcap-file', required=True, + help='Name of the PCAP[ng] file to be read') + parser_rspro_pyshark_pcap = subparsers.add_parser('rspro-pyshark-pcap', help=""" PCAP file containing RSPRO (osmo-remsim) communication; processed via pyshark. REQUIRES OSMOCOM PATCHED WIRESHARK!""") @@ -153,6 +159,8 @@ s = PysharkRsproPcap(opts.pcap_file) elif opts.source == 'rspro-pyshark-live': s = PysharkRsproLive(opts.interface) + elif opts.source == 'gsmtap-pyshark-pcap': + s = PysharkGsmtapPcap(opts.pcap_file) tracer = Tracer(source=s, suppress_status=opts.suppress_status, suppress_select=opts.suppress_select) logger.info('Entering main loop...') diff --git a/pySim/apdu_source/pyshark_gsmtap.py b/pySim/apdu_source/pyshark_gsmtap.py new file mode 100644 index 0000000..8ea9ae7 --- /dev/null +++ b/pySim/apdu_source/pyshark_gsmtap.py @@ -0,0 +1,90 @@ +# coding=utf-8 + +# (C) 2022 by Harald Welte <laforge(a)osmocom.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +import sys +import logging +from pprint import pprint as pp +from typing import Tuple +import pyshark + +from pySim.utils import h2b, b2h +from pySim.apdu import Tpdu +from pySim.gsmtap import GsmtapMessage +from . import ApduSource, PacketType, CardReset + +from pySim.apdu.ts_102_221 import ApduCommands as UiccApduCommands +from pySim.apdu.ts_31_102 import ApduCommands as UsimApduCommands +from pySim.apdu.global_platform import ApduCommands as GpApduCommands +ApduCommands = UiccApduCommands + UsimApduCommands + GpApduCommands + +logger = logging.getLogger(__name__) + +class _PysharkGsmtap(ApduSource): + """APDU Source [provider] base class for reading GSMTAP SIM APDU via tshark.""" + + def __init__(self, pyshark_inst): + self.pyshark = pyshark_inst + self.bank_id = None + self.bank_slot = None + self.cmd_tpdu = None + super().__init__() + + def read_packet(self) -> PacketType: + p = self.pyshark.next() + return self._parse_packet(p) + + def _set_or_verify_bank_slot(self, bsl: Tuple[int, int]): + """Keep track of the bank:slot to make sure we don't mix traces of multiple cards""" + if not self.bank_id: + self.bank_id = bsl[0] + self.bank_slot = bsl[1] + else: + if self.bank_id != bsl[0] or self.bank_slot != bsl[1]: + raise ValueError('Received data for unexpected B(%u:%u)' % (bsl[0], bsl[1])) + + def _parse_packet(self, p) -> PacketType: + udp_layer = p['udp'] + udp_payload_hex = udp_layer.get_field('payload').replace(':','') + gsmtap = GsmtapMessage(h2b(udp_payload_hex)) + gsmtap_msg = gsmtap.decode() + if gsmtap_msg['type'] != 'sim': + raise ValueError('Unsupported GSMTAP type %s' % gsmtap_msg['type']) + sub_type = gsmtap_msg['sub_type'] + if sub_type == 'apdu': + return ApduCommands.parse_cmd_bytes(gsmtap_msg['body']) + elif sub_type == 'atr': + # card has been reset + return CardReset() + elif sub_type in ['pps_req', 'pps_rsp']: + # simply ignore for now + pass + else: + raise ValueError('Unsupported GSMTAP-SIM sub-type %s' % sub_type) + +class PysharkGsmtapPcap(_PysharkGsmtap): + """APDU Source [provider] class for reading GSMTAP from a PCAP + file via pyshark, which in turn uses tshark (part of wireshark). + """ + def __init__(self, pcap_filename): + """ + Args: + pcap_filename: File name of the pcap file to be opened + """ + pyshark_inst = pyshark.FileCapture(pcap_filename, display_filter='gsm_sim', use_json=True, keep_packets=False) + super().__init__(pyshark_inst) + -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30438 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I46d42774b39a2735500ff5804206ddcfa545568c Gerrit-Change-Number: 30438 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in pysim[master]: pySim-trace: Also consider SW 91xx as successful
by laforge 24 Jan '23

24 Jan '23
Attention is currently required from: jtavares, dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/30440 ) Change subject: pySim-trace: Also consider SW 91xx as successful ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30440 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6 Gerrit-Change-Number: 30440 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jtavares <jtavares(a)kvh.com> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 12:53:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: pySim-trace: Also consider SW 91xx as successful
by laforge 24 Jan '23

24 Jan '23
Attention is currently required from: jtavares, dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/30440 ) Change subject: pySim-trace: Also consider SW 91xx as successful ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: more than 6 weeks without any additional review, marking as +2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30440 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6 Gerrit-Change-Number: 30440 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Attention: jtavares <jtavares(a)kvh.com> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 12:53:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: pySim-trace: Add support for reading GSMTAP from pcap files
by laforge 24 Jan '23

24 Jan '23
Attention is currently required from: jtavares, dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/30438 ) Change subject: pySim-trace: Add support for reading GSMTAP from pcap files ...................................................................... Patch Set 2: Code-Review+2 (1 comment) Patchset: PS2: more than 6 weeks without any additional review, marking as +2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/30438 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I46d42774b39a2735500ff5804206ddcfa545568c Gerrit-Change-Number: 30438 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jtavares <jtavares(a)kvh.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jtavares <jtavares(a)kvh.com> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 12:53:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Introduce netns API
by pespin 24 Jan '23

24 Jan '23
Hello osmith, Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/31024 to look at the new patch set (#6). Change subject: Introduce netns API ...................................................................... Introduce netns API Write a new API and implementation to manage network namespace related operations. This will be used by the upcoming tundev module. Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da --- M TODO-RELEASE M include/osmocom/core/Makefile.am A include/osmocom/core/netns.h M src/core/Makefile.am A src/core/netns.c 5 files changed, 235 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/31024/6 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da Gerrit-Change-Number: 31024 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmocore[master]: Introduce netns API
by pespin 24 Jan '23

24 Jan '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31024 ) Change subject: Introduce netns API ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da Gerrit-Change-Number: 31024 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 11:37:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by laforge 24 Jan '23

24 Jan '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 ) Change subject: Introduce tundev API ...................................................................... Patch Set 12: (2 comments) File src/core/tun.c: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/97f47869_9a592383 PS12, Line 402: if_index = if_nametoindex(dev_name); : if (if_index == 0) : return -ENODEV; I think it's dangerous to use the string as a persistent/permanent identifier for a network device. That's what the ifindex is normally used for. It is unique even across device renames. Is there a specific reeason why you're not storing the ifindex in the local state structure and use that every time another operation is performed? It looks a bit odd that every API function here first performs a name-to-ifindex translation. https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/df828b70_9a74e190 PS12, Line 639: / what's this about? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 12 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Jan 2023 11:08:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.