fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26521 )
Change subject: library/DIAMETER_Emulation: implement 'raw' mode of operation
......................................................................
library/DIAMETER_Emulation: implement 'raw' mode of operation
This patch implements a new mode of operation, which allows to
have direct communication between the emulation component and
the other component connected via the 'DIAMETER_UNIT' port.
This eliminates the need to have dedicated components for each
IMSI, what is not necessarily needed in some specific cases.
Change-Id: I52e22ac70cc85be5b0436b68c77356aabc4f05e1
Related: SYS#5602
---
M library/DIAMETER_Emulation.ttcn
M mme/MME_Tests.ttcn
M pgw/PGW_Tests.ttcn
3 files changed, 22 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn
index 220ab11..e35a87a 100644
--- a/library/DIAMETER_Emulation.ttcn
+++ b/library/DIAMETER_Emulation.ttcn
@@ -18,6 +18,10 @@
* the DiameterOps.unitdata_cb() callback, which is registered with an argument to the
* main() function below.
*
+ * Alternatively, all inbound DIAMETER PDUs can be routed to a single component
+ * regardless of the IMSI. This is called 'raw' mode and can be achieved by
+ * setting the 'raw' field in DIAMETEROps to true.
+ *
* (C) 2019 by Harald Welte <laforge(a)gnumonks.org>
* All rights reserved.
*
@@ -94,7 +98,10 @@
type record DIAMETEROps {
DIAMETERCreateCallback create_cb,
- DIAMETERUnitdataCallback unitdata_cb
+ DIAMETERUnitdataCallback unitdata_cb,
+ /* If true, this parameter disables IMSI based routing, so that all incoming
+ * PDUs get routed to a single component connected via the DIAMETER_UNIT port. */
+ boolean raw
}
type record DIAMETER_conn_parameters {
@@ -337,8 +344,16 @@
DIAMETER.send(t_DIAMETER_Send(g_diameter_conn_id, valueof(resp)));
}
- /* DIAMETER from remote peer */
- [] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf {
+ /* DIAMETER from the test suite */
+ [ops.raw] DIAMETER_UNIT.receive(PDU_DIAMETER:?) -> value msg {
+ DIAMETER.send(t_DIAMETER_Send(g_diameter_conn_id, msg));
+ }
+ /* DIAMETER from remote peer (raw mode) */
+ [ops.raw] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf {
+ DIAMETER_UNIT.send(mrf.msg);
+ }
+ /* DIAMETER from remote peer (IMSI based routing) */
+ [not ops.raw] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf {
imsi_t := f_DIAMETER_get_imsi(mrf.msg);
if (isvalue(imsi_t)) {
imsi := valueof(imsi_t);
diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn
index 375a66a..3c35359 100644
--- a/mme/MME_Tests.ttcn
+++ b/mme/MME_Tests.ttcn
@@ -213,7 +213,8 @@
friend function f_init_diameter(charstring id) runs on MTC_CT {
var DIAMETEROps ops := {
create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback),
- unitdata_cb := refers(DiameterForwardUnitdataCallback)
+ unitdata_cb := refers(DiameterForwardUnitdataCallback),
+ raw := false /* handler mode (IMSI based routing) */
};
var DIAMETER_conn_parameters pars := {
remote_ip := mp_mme_ip,
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index c526fa2..75dcb83 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -115,7 +115,8 @@
friend function f_init_diameter(charstring id) runs on PGW_Test_CT {
var DIAMETEROps ops := {
create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback),
- unitdata_cb := refers(DiameterForwardUnitdataCallback)
+ unitdata_cb := refers(DiameterForwardUnitdataCallback),
+ raw := false /* handler mode (IMSI based routing) */
};
var DIAMETER_conn_parameters pars := {
remote_ip := mp_pgw_hostname,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26521
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I52e22ac70cc85be5b0436b68c77356aabc4f05e1
Gerrit-Change-Number: 26521
Gerrit-PatchSet: 7
Gerrit-Owner: fixeria <vyanitskiy(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-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/26982 )
Change subject: osmo-uecups-master/Dockerfile: do not pass command line options
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
> might be better to add the missing command line option to osmo-uecups, like all other osmocom progra […]
Ideally, yes. If it was just a missing '-c' option, I would quickly add it. The problem is that the option parsing logic is not present at all, and I didn't want to spend time on it.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/26982
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ia9b220e4cfbc89b800fafdd153bd63d6d95799e2
Gerrit-Change-Number: 26982
Gerrit-PatchSet: 3
Gerrit-Owner: 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: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 09:55:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27006 )
Change subject: ttcn3-bsc-test-vamos: set OSMO_SUT_{HOST,PORT}
......................................................................
ttcn3-bsc-test-vamos: set OSMO_SUT_{HOST,PORT}
This enables the test suite to obtain talloc reports between the
test case executions, which get stored together with the PCAP files.
Change-Id: Ia9525778fcecc60177be651624e2b2cf9bc75422
---
M ttcn3-bsc-test-vamos/jenkins.sh
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
diff --git a/ttcn3-bsc-test-vamos/jenkins.sh b/ttcn3-bsc-test-vamos/jenkins.sh
index e8ec34d..f37711f 100755
--- a/ttcn3-bsc-test-vamos/jenkins.sh
+++ b/ttcn3-bsc-test-vamos/jenkins.sh
@@ -62,6 +62,8 @@
$(docker_network_params $SUBNET 203) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
+ -e "OSMO_SUT_HOST=172.18.$SUBNET.20" \
+ -e "OSMO_SUT_PORT=4242" \
-v $VOL_BASE_DIR/bsc-tester:/data \
--name ${BUILD_TAG}-ttcn3-bsc-test \
$DOCKER_ARGS \
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27006
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ia9525778fcecc60177be651624e2b2cf9bc75422
Gerrit-Change-Number: 27006
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27007 )
Change subject: ttcn3-bsc-test-sccplite: set OSMO_SUT_{HOST,PORT}
......................................................................
ttcn3-bsc-test-sccplite: set OSMO_SUT_{HOST,PORT}
This enables the test suite to obtain talloc reports between the
test case executions, which get stored together with the PCAP files.
Change-Id: I4e5474e8fc51d2ba8a0baca68e11df1346d7d4ab
---
M ttcn3-bsc-test/jenkins-sccplite.sh
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh
index 7565a8d..0a3c073 100755
--- a/ttcn3-bsc-test/jenkins-sccplite.sh
+++ b/ttcn3-bsc-test/jenkins-sccplite.sh
@@ -48,6 +48,8 @@
$(docker_network_params $SUBNET 203) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
+ -e "OSMO_SUT_HOST=172.18.$SUBNET.20" \
+ -e "OSMO_SUT_PORT=4242" \
-v $VOL_BASE_DIR/bsc-tester:/data \
--name ${BUILD_TAG}-ttcn3-bsc-test \
$DOCKER_ARGS \
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27007
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I4e5474e8fc51d2ba8a0baca68e11df1346d7d4ab
Gerrit-Change-Number: 27007
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: neels, fixeria.
Hello Jenkins Builder, neels, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/27010
to look at the new patch set (#4).
Change subject: tests/logging: also test printing the filename information
......................................................................
tests/logging: also test printing the filename information
This commit demonstrates a bug introduced in [1], which can be
observed when the logging is configured to print the filename
*after* the logging message (LOG_FILENAME_POS_HEADER_END):
logging print file 1 last
^^^^
In this mode, the code in _output_buf() overwrites the '\n' sybmol
contained in the logging message itself by shifting the 'offset'
backwards, and appends the nipped '\n' after the filename info.
The problem is that the 'len' variable is not updated in this case,
so the resulting length includes +1 character - '\0', which gets
printed at the end of every logging line.
Interestingly enough, this problem affects only the wqueue mode.
Change-Id: I54bf5e5c036efb1908232fe3d8e8e2989715fbb3
Related: [1] I393907b3c9e0cc1145e102328adad0a83ee13a9f
---
M tests/logging/logging_test.c
M tests/logging/logging_test_stream.err
M tests/logging/logging_test_wqueue.err
3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/27010/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27010
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I54bf5e5c036efb1908232fe3d8e8e2989715fbb3
Gerrit-Change-Number: 27010
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: tnt.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/26967 )
Change subject: icE1usb: update ice1usb_proto.h to firmware 0.2
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
Patchset:
PS1:
this is waiting for https://gerrit.osmocom.org/c/osmo-e1-hardware/+/27017 to get merged, which introduces further changes to the header file. I'll update this patch after 27017 is resolved.
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/26967
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I1423531470a1c9165d713108fb6a87ff47ff6e29
Gerrit-Change-Number: 26967
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Comment-Date: Mon, 31 Jan 2022 09:34:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith, neels, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662 )
Change subject: Add bsc_nat fsm
......................................................................
Patch Set 7:
(1 comment)
Patchset:
PS7:
Still no jenkins build verification jobs for this repository? What is the plan for that?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 7
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 09:31:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22543 )
Change subject: gsm_7bit_encode_n(): use regular malloc() instead of calloc()
......................................................................
gsm_7bit_encode_n(): use regular malloc() instead of calloc()
In general, it's safe not to use talloc API here because those are
internal allocations, and there are no 'return' statements between
calloc() and free(). However, we don't really need to initialize
the heap memory with 0, so let's use the 'normal' malloc().
Change-Id: I6956cbd83b2999dbcf8e2d210134b0a166c33efb
---
M src/gsm/gsm_utils.c
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index f8bb58e..3b0ec6a 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -325,12 +325,13 @@
int i = 0, z = 0;
uint8_t cb, nb;
int shift = 0;
- uint8_t *data = calloc(septet_len + 1, sizeof(uint8_t));
+ uint8_t *data = malloc(septet_len + 1);
if (padding) {
shift = 7 - padding;
/* the first zero is needed for padding */
memcpy(data + 1, rdata, septet_len);
+ data[0] = 0x00;
septet_len++;
} else
memcpy(data, rdata, septet_len);
@@ -384,7 +385,7 @@
size_t max_septets = n * 8 / 7;
/* prepare for the worst case, every character expanding to two bytes */
- uint8_t *rdata = calloc(strlen(data) * 2, sizeof(uint8_t));
+ uint8_t *rdata = malloc(strlen(data) * 2);
y = gsm_septet_encode(rdata, data);
if (y > max_septets) {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22543
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6956cbd83b2999dbcf8e2d210134b0a166c33efb
Gerrit-Change-Number: 22543
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged