fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/29226 )
Change subject: construct: use Python's API for int<->bytes conversion
......................................................................
construct: use Python's API for int<->bytes conversion
Argument 'signed' was added in [1] and become available since v2.10.63.
Therefore using bytes2integer() and integer2bytes() from construct.core
bumps the minimum required version of construct to v2.10.63. For
instance, debian:bullseye currently ships v2.10.58.
There is no strict requirement to use construct's API, so let's use
Python's API instead. This allows using older construct versions
from the v2.9.xx family.
Change-Id: I613dbfebe993f9c19003635371941710fc1b1236
Related: [1] 660ddbe2d9a351731ad7976351adbf413809a715 construct.git
Related: OS#5666
---
M pySim/construct.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/29226/1
diff --git a/pySim/construct.py b/pySim/construct.py
index 4910a7f..97af235 100644
--- a/pySim/construct.py
+++ b/pySim/construct.py
@@ -2,7 +2,7 @@
from construct.core import EnumIntegerString
import typing
from construct import *
-from construct.core import evaluate, bytes2integer, integer2bytes, BitwisableString
+from construct.core import evaluate, BitwisableString
from construct.lib import integertypes
from pySim.utils import b2h, h2b, swap_nibbles
import gsm0338
@@ -219,7 +219,7 @@
if evaluate(self.swapped, context):
data = swapbytes(data)
try:
- return bytes2integer(data, self.signed)
+ return int.from_bytes(data, byteorder='big', signed=self.signed)
except ValueError as e:
raise IntegerError(str(e), path=path)
@@ -248,7 +248,7 @@
raise IntegerError(f"value {obj} is not an integer", path=path)
length = self.__bytes_required(obj, self.minlen)
try:
- data = integer2bytes(obj, length, self.signed)
+ data = obj.to_bytes(length, byteorder='big', signed=self.signed)
except ValueError as e:
raise IntegerError(str(e), path=path)
if evaluate(self.swapped, context):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29226
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I613dbfebe993f9c19003635371941710fc1b1236
Gerrit-Change-Number: 29226
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: msuraev.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29224 )
Change subject: Ignore .deb build byproducts
......................................................................
Patch Set 2:
(1 comment)
File .gitignore:
https://gerrit.osmocom.org/c/osmo-ggsn/+/29224/comment/46016d64_0dea5044
PS2, Line 27: # debian
I suggest to move your new entries here, so that we have all debian stuff in one place.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iec63ef5ea0acfc5e6621054926be15ae4754d65d
Gerrit-Change-Number: 29224
Gerrit-PatchSet: 2
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:53:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29225 )
Change subject: Set working directory in systemd service file
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29225
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I40b5d50470cb55ca94af5e17f21658181a02d4c2
Gerrit-Change-Number: 29225
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:48:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
to look at the new patch set (#2).
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system
instance) instead.
Related: OS#4821
Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
---
M contrib/systemd/osmo-ggsn.service
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/23/29223/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
Gerrit-Change-Number: 29223
Gerrit-PatchSet: 2
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29223 )
Change subject: Set working directory in systemd service file
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
Gerrit-Change-Number: 29223
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:01:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29224 )
Change subject: Ignore .deb build byproducts
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iec63ef5ea0acfc5e6621054926be15ae4754d65d
Gerrit-Change-Number: 29224
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:00:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels, laforge, fixeria.
Hello Jenkins Builder, neels, laforge, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084
to look at the new patch set (#15).
Change subject: SIGTRAN: cache Optional Data for SCCP CR/CC/RLSD
......................................................................
SIGTRAN: cache Optional Data for SCCP CR/CC/RLSD
The length limit of optional Data parameter is 130 bytes according to ITU-T Rec Q.713 §4.2..§4.5. If we receive CR, CC or
RLSD message with bigger data - cache it if necessary and send via separate DT1 message after connection becomes active.
While at it, clarify the order of comments in the encoding routine to match the spec.
Fixes: OS#5579
Change-Id: I0033faf9da393418930252233ce74d62cd1cef8a
---
M src/sccp_scoc.c
1 file changed, 132 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/84/29084/15
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29084
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0033faf9da393418930252233ce74d62cd1cef8a
Gerrit-Change-Number: 29084
Gerrit-PatchSet: 15
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, laforge, fixeria.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29084 )
Change subject: SIGTRAN: cache Optional Data for SCCP CR/CC/RLSD
......................................................................
Patch Set 14:
(4 comments)
This change is ready for review.
Patchset:
PS14:
I've added comment to the line which raised questions - hopefully this would clarify things.
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/6ce89fd4_8d05fbff
PS8, Line 659: break
> drop the "break;"
Done
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/48dbaa89_d31e82c7
PS14, Line 603: if (conn->opt_data_cache->cb[0] != exp_type)
> cosmetic: we use curly braces around multi-line blocks, even if it's only a single statement within […]
Done
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/a86dafd8_0ce12659
PS14, Line 1110: xua_opt_data_send_cache(conn, SUA_CO_CORE, xua->hdr.msg_class);
> or maybe this? […]
I think I'm missing a point in here. Could you elaborate - what exactly you think should be changed in here and why?
That's both the intention behind this code and how the result looks like in wireshark:
A B
------> Conn Req (cache Optional Data)
<------ Conn Conf
------> DT1 with cached data
When the lib receieve CR with way too much data (but not big enough to not fit into DT1) we cache it, send CR without optional data and send DT1 after receiving CC. To make sure we do not interfere with regular user traffic the DT1 (with outstanding optional data from CR) is sent here from conn_pend_out state before we notify lib user that CC was received.
You can reproduce this yourself by following readme for examples/ code which is already merged to master.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29084
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0033faf9da393418930252233ce74d62cd1cef8a
Gerrit-Change-Number: 29084
Gerrit-PatchSet: 14
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 29 Aug 2022 10:25:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment