[M] Change in osmo-ci[master]: README: update and convert to markdown
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email ) Change subject: README: update and convert to markdown .. README: update and convert to markdown * Describe all directories * Update the text slightly * Convert to markdown, so it shows up formatted at: https://gitea.osmocom.org/osmocom/osmo-ci Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 --- D README.adoc A README.md 2 files changed, 62 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/64/35264/1 diff --git a/README.adoc b/README.adoc deleted file mode 100644 index 23d723b..000 --- a/README.adoc +++ /dev/null @@ -1,30 +0,0 @@ -Scripts used for the CI handling and coverity uploads - -coverity: scripts used to submit the osmocom sources for coverity scan. -This depends on these, which are not included in osmo-ci: -- a tokens.txt file in coverity/ -- see coverity/get_token.sh -- a cov-analysis-linux64-8.5.0 in coverity/ - (or the like, may need to adjust some scripts to match) - -jobs: Jenkins Job Builder YAML files defining jenkins jobs. Read jobs/README.adoc -for more information about deployment. - -scripts: used by jenkins jobs. Various osmo*/contrib/jenkins.sh scripts assume -osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of -$HOME/osmo-ci/scripts. - -obs-patches: patches to build projects for various debian distributions, e.g. -a patch for limesuite that fixes the libwxgtk3.0-dev => libwxgtk3.0-gtk3-dev -rename in control/debian for debian10. Used by osmo_obs_distro_specific_patch() -in scripts/common-obs.sh. - -_docker_playground: Clone of docker-playground.git, so the scripts can build -required docker images. This dir gets created on demand by scripts/common.sh, -and automatically fetched and reset to "origin/master" (override with -$OSMO_BRANCH_DOCKER_PLAYGROUND). The fetch and reset gets skipped if -_docker_playground is a symlink. For development, set it up as follows: - - $ git clone https://gitea.osmocom.org/osmocom/docker-playground - $ git clone https://gitea.osmocom.org/osmocom/osmo-ci - $ cd osmo-ci - $ ln -s ../docker-playground _docker_playground diff --git a/README.md b/README.md new file mode 100644 index 000..c8d4af4 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# Osmocom CI and infrastructure files + +## ansible +Ansible rules for setting up machines of the Osmocom infrastructure. +See `ansible/README.md`. + +## contrib +Scripts and files that did not fit into other directories. + +## coverity +Scripts used to submit the osmocom sources for coverity scan. +This depends on these, which are not included in osmo-ci: +- a tokens.txt file in coverity/ -- see coverity/get_token.sh +- a cov-analysis-linux64-8.5.0 in coverity/ + (or the like, may need to adjust some scripts to match) + +## jobs +Jenkins Job Builder YAML files defining jenkins jobs. Read `jobs/README.adoc` +for more information about deployment. + +## lint +The linter running on patches submitted via gerrit. See the wiki page +[Linting](https://osmocom.org/projects/cellular-infrastructure/wiki/Linting) +for more information. + +## qemu-kvm +A script to create a virtual machine with kernel gtp ggsn for qemu-kvm. + +## scripts +Scripts used by jenkins jobs. Various `osmo*/contrib/jenkins.sh` scripts assume +osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of +`$HOME/osmo-ci/scripts`. + +## _docker_playground +A clone of +[docker-playground](https://gitea.osmocom.org/osmocom/docker-playgroundhttps://gitea.osmocom.org/osmocom/docker-playground), +so the scripts can build required docker images. This dir gets created on +demand by scripts/common.sh, and automatically fetched and reset to +"origin/master" (override with `$OSMO_BRANCH_DOCKER_PLAYGROUND`). The fetch and +reset gets skipped if _docker_playground is a symlink. For development, set it +up as follows: + +``` +$ git clone https://gitea.osmocom.org/osmocom/docker-playground +$ git clone https://gitea.osmocom.org/osmocom/osmo-ci +$ cd osmo-ci +$ ln -s ../docker-playground _docker_playground +``` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: coverity: upgrade to 2023.6.2
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email ) Change subject: coverity: upgrade to 2023.6.2 .. coverity: upgrade to 2023.6.2 Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f --- M ansible/roles/install-coverity/defaults/main.yml 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/66/35266/1 diff --git a/ansible/roles/install-coverity/defaults/main.yml b/ansible/roles/install-coverity/defaults/main.yml index 4a74887..7be5be6 100644 --- a/ansible/roles/install-coverity/defaults/main.yml +++ b/ansible/roles/install-coverity/defaults/main.yml @@ -1,4 +1,4 @@ --- -coverity_version: 2022.06 +coverity_version: 2023.6.2 coverity_installer_file: "cov-analysis-linux64-{{ coverity_version }}.tar.gz" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f Gerrit-Change-Number: 35266 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: README: document how to upgrade coverity
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email ) Change subject: README: document how to upgrade coverity .. README: document how to upgrade coverity Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 --- M README.md 1 file changed, 29 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/65/35265/1 diff --git a/README.md b/README.md index c8d4af4..7ab7514 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,26 @@ Scripts and files that did not fit into other directories. ## coverity -Scripts used to submit the osmocom sources for coverity scan. -This depends on these, which are not included in osmo-ci: -- a tokens.txt file in coverity/ -- see coverity/get_token.sh -- a cov-analysis-linux64-8.5.0 in coverity/ - (or the like, may need to adjust some scripts to match) +Scripts used to submit the osmocom sources for coverity scan. This depends on a +`tokens.txt`, see `coverity/get_token.sh`. + +### how to upgrade +* Download the latest version from [here](https://scan.coverity.com/download) +* Find the "upgrade considerations" [here](https://sig-product-docs.synopsys.com/bundle/coverity-docs/page/upgrade-guide/topics/important_upgrade_considerations.html) +* Place the resulting `cov-analysis-linux64-$VERSION.tar.gz` in `ansible/files` +* Adjust `coverity_version` in `ansible/roles/install-coverity/defaults/main.yml` +* Deploy the ansible playbook: +``` +$ cd ansible +$ ansible-playbook -v -i hosts setup-jenkins-slave.yml -l coverity_slaves -t coverity +``` +* On success, only one task should be skipped (the "Please download..." task): +``` +PLAY RECAP +build2-deb11build-ansible : ok=8changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +build3-deb11build-ansible : ok=9changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +build4-deb12build-ansible : ok=9changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +``` ## jobs Jenkins Job Builder YAML files defining jenkins jobs. Read `jobs/README.adoc` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 Gerrit-Change-Number: 35265 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
Attention is currently required from: dexter, laforge. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email ) Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically .. Patch Set 13: (1 comment) File src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c: https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/f7860876_b8a785a5 PS12, Line 698: *ci->verb_info > This patch is obviously untested, because this here cannot work. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba Gerrit-Change-Number: 34404 Gerrit-PatchSet: 13 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Fri, 08 Dec 2023 06:07:39 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment
[S] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
Attention is currently required from: dexter, laforge, neels. neels has uploaded a new patch set (#13) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email ) The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review-1 by neels, Verified+1 by Jenkins Builder Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically .. mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically The struct mgcp_conn_peer is allocated statically at the moment. This is an ABI compatibility in case the struct changes. Add an alloc function for this struct that API users can use, and indicate its use in a comment on struct mgcp_conn_peer. It is not necessary to dynamically allocate the mgcp_conn_peer struct within libosmo-mgcp-client, because the problem arises only when ABIs interact. Hence leaving mgcp_client_endpoint_fsm.c's use static. Related: OS#6171 Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba --- M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/mgcp_client_fsm.c 2 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/04/34404/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba Gerrit-Change-Number: 34404 Gerrit-PatchSet: 13 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: dexter Gerrit-MessageType: newpatchset
[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp
Attention is currently required from: laforge, neels, pespin. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email to look at the new patch set (#9). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: add fmtp string to ptmap: allow all possible fmtp .. add fmtp string to ptmap: allow all possible fmtp Remove the limit of having only one AMR octet-aligned fmtp parameter per MGCP message. Instead allow any arbitrary fmtp options, one per every codec. Deprecate all use of struct mgcp_codec_param. Instead, store and pass plain fmtp strings. We need to know fmtp details only for AMR, and only to probe whether it is octet-aligned. So add a separate fmtp string parser that returns that information flexibly, as in if (osmo_mgcp_fmtp_get_int("octet-aligned", 0) == 1) ... Provide legacy shims that still act correctly for any callers that may pass the old struct mgcp_codec_param. (I'm not sure if we need to keep this, but we can always drop it in another patch.) Adjust one mgcp_test.c: instead of returning only the octet-aligned parameter, now osmo-mgw keeps and returns all the fmtp parameters that the user provided. So add the missing "mode-change-capability". Related: OS#6171 Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b --- M include/osmocom/mgcp/Makefile.am A include/osmocom/mgcp/fmtp.h M include/osmocom/mgcp/mgcp_codec.h M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_network.h M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am A src/libosmo-mgcp/fmtp.c M src/libosmo-mgcp/mgcp_codec.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M tests/mgcp/mgcp_test.c 15 files changed, 265 insertions(+), 100 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/34900/9 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b Gerrit-Change-Number: 34900 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: dexter Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in osmo-mgw[master]: client: move some items to internal header
Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review+1 by pespin, Verified+1 by Jenkins Builder Change subject: client: move some items to internal header .. client: move some items to internal header There is an upcoming modification of structs mgcp_msg and mgcp_response. When it is public API, it needs to be kept backwards compatible. But no libosmo-mgcp-client caller (in the osmocom-cni world) has used these structs in years and years. Everyone should use the higher level osmo_mgcpc_* API only. Move this legacy API to a private header, so we no longer need to worry about compatibility there. Related: OS#6171 Related: I798e02c6663376d3d52f4a74fc4b32411ce95bed Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 --- M TODO-RELEASE M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_internal.h M src/libosmo-mgcp-client/mgcp_client_fsm.c 4 files changed, 99 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/35246/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[S] Change in osmo-mgw[master]: fix possible NULL deref on early media
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email ) Change subject: fix possible NULL deref on early media .. fix possible NULL deref on early media end.codec may be NULL, depending on whether a single matching codec could be found or not, i.e. based on external input. So let's not crash if an RTP packet arrives while end.codec == NULL. Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/63/35263/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 674c096..e37437d 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1514,8 +1514,9 @@ return -1; /* Handle AMR frame format conversion (octet-aligned vs. bandwith-efficient) */ - if (mc->proto == MGCP_PROTO_RTP && - mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) { + if (mc->proto == MGCP_PROTO_RTP + && conn_src->end.codec + && mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) { /* Make sure that the incoming AMR frame format matches the frame format that the call agent has * communicated via SDP when the connection was created/modfied. */ int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg)); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3 Gerrit-Change-Number: 35263 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange
[S] Change in osmo-mgw[master]: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better
Attention is currently required from: dexter. neels has uploaded a new patch set (#12) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email ) The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better .. mgcp_client_fsm: explain member param in struct mgcp_conn_peer better The struct member param specifies additional codec parameters. Let's improve its explaination. Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19 Related: OS#6171 --- M include/osmocom/mgcp_client/mgcp_client_fsm.h 1 file changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34350/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19 Gerrit-Change-Number: 34350 Gerrit-PatchSet: 12 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Attention: dexter Gerrit-MessageType: newpatchset
[M] Change in osmo-mgw[master]: client: move some items to internal header
Attention is currently required from: laforge. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header .. Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/95d25dcc_45d7d400 PS2, Line 12: mgcp > libosmo-mgcp-client Done -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Comment-Date: Fri, 08 Dec 2023 06:04:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment
[S] Change in osmo-mgw[master]: mgcp_client_test: fix function name
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email ) Change subject: mgcp_client_test: fix function name .. mgcp_client_test: fix function name Change-Id: I213f9b2713ff80a16603b8342c204cb546cc782d --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 37c5f6c..a39f19b 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -531,7 +531,7 @@ OSMO_ASSERT(!failures); } -static void test_map_pt_to_codec(void) +static void test_map_str_to_codec(void) { /* Full form */ OSMO_ASSERT(map_str_to_codec("PCMU/8000/1") == CODEC_PCMU_8000_1); @@ -703,7 +703,7 @@ test_mgcp_client_cancel(); test_sdp_section_start(); test_map_codec_to_pt_and_map_pt_to_codec(); - test_map_pt_to_codec(); + test_map_str_to_codec(); test_mgcp_client_e1_epname(); printf("Done\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I213f9b2713ff80a16603b8342c204cb546cc782d Gerrit-Change-Number: 35245 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[M] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
Attention is currently required from: dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email ) Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically .. Patch Set 12: Code-Review-1 (1 comment) File src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c: https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/5fbc5cee_2ebc817a PS12, Line 698: *ci->verb_info This patch is obviously untested, because this here cannot work. Above, '*ci = cleared_ci;' leaves ci->verb_info == NULL. Now we write data to that NULL pointer. This code made sense when ci->verb_info was a member of ci, not so when it is a pointer. But no need to fix this code, refreshing my earlier comment: The ABI problem arises when users assume a smaller size of the struct than libosmo-mgcp-client. So users of libosmo-mgcp-client should do dynamic allocation to ensure being ABI compatible; no need to change the libosmo-mgcp-client code itself, it is always ABI compatible with itself. So adding the API doc and allocation function is all that is needed in this patch. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba Gerrit-Change-Number: 34404 Gerrit-PatchSet: 12 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: dexter Gerrit-Comment-Date: Fri, 08 Dec 2023 02:25:51 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: clarify the USF decoding for PDCH blocks
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email ) Change subject: coding: clarify the USF decoding for PDCH blocks .. coding: clarify the USF decoding for PDCH blocks The USF (Uplink State Flag) field is present in the MAC header of all Downlink PDCH blocks. It is used by the network to indicate which MS can transmit on subsequent Uplink PDCH block(s). This field is of a high importance for the MS, thus the decoder API allows the caller to obtain USF value separately from the actual data bits. In the case of gsm0503_pdtch_decode(), if the 'usf_p' pointer is not NULL, the USF value would be assigned for CS2/CS3/CS4 (but not CS1) even if the CRC check fails (negative return value). A subsequent patch is to bring the CS1 in consistency with CS2/CS3/CS4. In the case of gsm0503_pdtch_egprs_decode(), decoding of the USF field separately from data bits is not implemented, and moreover the function itself cannot be used for decoding Downlink blocks. Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb --- M src/coding/gsm0503_coding.c 1 file changed, 29 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 612e0ad..5b78502 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -921,7 +921,7 @@ * \param[out] l2_data caller-allocated buffer for L2 Frame * \param[in] bursts burst input data as soft unpacked bits * \param[in] nbits number of bits in \a bursts - * \param usf_p unused argument ?!? + * \param usf_p Uplink State Flag, FIXME: not implemented * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of decoded bits * \returns number of bytes decoded; negative on error */ @@ -1010,7 +1010,7 @@ /*! Decode GPRS PDTCH * \param[out] l2_data caller-allocated buffer for L2 Frame * \param[in] bursts burst input data as soft unpacked bits - * \param[out] usf_p uplink stealing flag + * \param[out] usf_p Uplink State Flag, only relevant for DL blocks * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of dcoded bits * \returns number of bytes decoded; negative on error */ @@ -1061,6 +1061,7 @@ osmo_conv_decode_ber(_cs2_np, cB, conv, n_errors, n_bits_total); + /* 5.1.2.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 6; j++) k += abs(((int)gsm0503_usf2six[i][j]) - ((int)conv[j])); @@ -1096,6 +1097,7 @@ osmo_conv_decode_ber(_cs3_np, cB, conv, n_errors, n_bits_total); + /* 5.1.3.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 6; j++) k += abs(((int)gsm0503_usf2six[i][j]) - ((int)conv[j])); @@ -1124,6 +1126,7 @@ for (i = 12; i < 456; i++) conv[i] = (cB[i] < 0) ? 1 : 0; + /* 5.1.4.2 a) the three USF bits d(0),d(1),d(2) are precoded into twelve bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 12; j++) k += abs(((int)gsm0503_usf2twelve_sbit[i][j]) - ((int)cB[j])); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb Gerrit-Change-Number: 35257 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in libosmocore[master]: tests/coding: fix -Wmaybe-uninitialized in test_pdtch()
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email ) Change subject: tests/coding: fix -Wmaybe-uninitialized in test_pdtch() .. tests/coding: fix -Wmaybe-uninitialized in test_pdtch() I am seeing this when building with gcc v13.2.1: tests/coding/coding_test.c: In function ‘test_pdtch’: tests/coding/coding_test.c:444:23: warning: ‘*result[]’ may be used uninitialized 444 | result[len - 1] &= 0x7f; | ~~^ tests/coding/coding_test.c:448:23: warning: ‘*result[39]’ may be used uninitialized 448 | result[len - 1] &= 0x07; | ~~^ The idea here is to pre-clear some bits in the resulting buffer, because they're not going to be set during decoding of the burst bits. The problem is that result[] holds uninitialized data, so we're basically taking a 'garbage' octet and clear some of its bits. The remaining 'garbage' bits of that octet are overwritten by the decoder, so in the end we still get deterministic results. Let's make GCC happy by clearing all bits in the last octet. Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e --- M tests/coding/coding_test.c 1 file changed, 32 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index c9508f7..d536e44 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -441,11 +441,11 @@ case 34: case 54: l2[len - 1] &= 0x7f; - result[len - 1] &= 0x7f; + result[len - 1] = 0x00; break; case 40: l2[len - 1] &= 0x07; - result[len - 1] &= 0x07; + result[len - 1] = 0x00; break; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e Gerrit-Change-Number: 35259 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in libosmocore[master]: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email ) Change subject: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 .. coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 This patch brings decoding of the CS1 in consistency with the other three coding schemes, for which we support decoding USF independently. Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 --- M src/coding/gsm0503_coding.c 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5b78502..1f409d6 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1042,6 +1042,10 @@ osmo_conv_decode_ber(_xcch, cB, conv, n_errors, n_bits_total); + /* the three USF bits d(0),d(1),d(2) are *not* precoded */ + if (usf_p) + *usf_p = (conv[0] << 2) | (conv[1] << 1) | (conv[2] << 0); + rv = osmo_crc64gen_check_bits(_fire_crc40, conv, 184, conv + 184); if (rv) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 Gerrit-Change-Number: 35258 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in libosmocore[master]: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode()
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email ) Change subject: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() .. coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde --- M src/coding/gsm0503_coding.c 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 365ae6e..612e0ad 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -924,7 +924,7 @@ * \param usf_p unused argument ?!? * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of decoded bits - * \returns 0 on success; negative on error */ + * \returns number of bytes decoded; negative on error */ int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, const sbit_t *bursts, uint16_t nbits, uint8_t *usf_p, int *n_errors, int *n_bits_total) { @@ -1013,7 +1013,7 @@ * \param[out] usf_p uplink stealing flag * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of dcoded bits - * \returns 0 on success; negative on error */ + * \returns number of bytes decoded; negative on error */ int gsm0503_pdtch_decode(uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p, int *n_errors, int *n_bits_total) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde Gerrit-Change-Number: 35256 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in libosmocore[master]: tests/coding: fix -Wmaybe-uninitialized in test_pdtch()
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email ) Change subject: tests/coding: fix -Wmaybe-uninitialized in test_pdtch() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e Gerrit-Change-Number: 35259 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 23:13:02 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email ) Change subject: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 Gerrit-Change-Number: 35258 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 23:12:14 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: clarify the USF decoding for PDCH blocks
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email ) Change subject: coding: clarify the USF decoding for PDCH blocks .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb Gerrit-Change-Number: 35257 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 23:11:50 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode()
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email ) Change subject: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde Gerrit-Change-Number: 35256 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 23:09:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-sccp[master]: ipa: Fix client setting unit_id with ASP name instead of AS
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email ) Change subject: ipa: Fix client setting unit_id with ASP name instead of AS .. ipa: Fix client setting unit_id with ASP name instead of AS This was broken since ever. The client was submitting the ASP name in the unit_id field during IPA handshake, and the server was expecting it to contain the AS, so it failed with message: "Cannot find any definition for IPA Unit Name '%s'" in ipa_asp_fsm_wait_id_resp(). Fixes: 5f0a8df34cae20455a520c3a85cf94124f486bf2 Change-Id: I249964e171f578726439c40e01ae85aa447afada --- M src/ipa.c M src/xua_asp_fsm.c M src/xua_internal.h 3 files changed, 26 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/ipa.c b/src/ipa.c index a77d331..82ece8b 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -131,7 +131,7 @@ return 0; } -static struct osmo_ss7_as *find_as_for_asp(struct osmo_ss7_asp *asp) +struct osmo_ss7_as *ipa_find_as_for_asp(struct osmo_ss7_asp *asp) { struct osmo_ss7_as *as; @@ -216,7 +216,7 @@ int rc; struct m3ua_data_hdr data_hdr; struct xua_msg *xua; - struct osmo_ss7_as *as = find_as_for_asp(asp); + struct osmo_ss7_as *as = ipa_find_as_for_asp(asp); uint32_t opc, dpc; if (!as) { diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 2d81bc3..cc94ac7 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -1190,10 +1190,16 @@ { struct osmo_fsm_inst *fi; struct ipa_asp_fsm_priv *iafp; + struct osmo_ss7_as *as = ipa_find_as_for_asp(asp); /* allocate as child of AS? */ fi = osmo_fsm_inst_alloc(_asp_fsm, asp, NULL, log_level, asp->cfg.name); + if (!as) { + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); + return NULL; + } + iafp = talloc_zero(fi, struct ipa_asp_fsm_priv); if (!iafp) { osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); @@ -1202,7 +1208,7 @@ iafp->role = role; iafp->asp = asp; iafp->ipa_unit = talloc_zero(iafp, struct ipaccess_unit); - iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, asp->cfg.name); + iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, as->cfg.name); iafp->pong_timer.cb = ipa_pong_timer_cb; iafp->pong_timer.data = fi; diff --git a/src/xua_internal.h b/src/xua_internal.h index 93f6140..b6b33af 100644 --- a/src/xua_internal.h +++ b/src/xua_internal.h @@ -117,6 +117,7 @@ int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua); int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg, uint8_t sls); +struct osmo_ss7_as *ipa_find_as_for_asp(struct osmo_ss7_asp *asp); int osmo_isup_party_parse(char *out_digits, const uint8_t *in, unsigned int in_num_bytes, bool odd); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I249964e171f578726439c40e01ae85aa447afada Gerrit-Change-Number: 35255 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in libosmo-sccp[master]: ipa: Fix client setting unit_id with ASP name instead of AS
Attention is currently required from: daniel, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email ) Change subject: ipa: Fix client setting unit_id with ASP name instead of AS .. Patch Set 1: Code-Review+2 (1 comment) Patchset: PS1: well, one can see from this that the typical setup of IPA/SCCPlite is to interface with some 3rd party equipment, and not between two osmocom/libosmo-sigtran using programs. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I249964e171f578726439c40e01ae85aa447afada Gerrit-Change-Number: 35255 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Attention: daniel Gerrit-Comment-Date: Thu, 07 Dec 2023 22:37:14 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: tests/coding: fix -Wmaybe-uninitialized in test_pdtch()
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email ) Change subject: tests/coding: fix -Wmaybe-uninitialized in test_pdtch() .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e Gerrit-Change-Number: 35259 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 22:36:01 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email ) Change subject: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 Gerrit-Change-Number: 35258 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 22:35:22 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: clarify the USF decoding for PDCH blocks
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email ) Change subject: coding: clarify the USF decoding for PDCH blocks .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb Gerrit-Change-Number: 35257 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 22:35:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode()
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email ) Change subject: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde Gerrit-Change-Number: 35256 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 22:34:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: euicc: Fix TLV IE definitions for SetNickname{Req,Resp}
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35262?usp=email ) Change subject: euicc: Fix TLV IE definitions for SetNickname{Req,Resp} .. euicc: Fix TLV IE definitions for SetNickname{Req,Resp} The metaclass uese the 'nested' attribute, while the existing code accidentially used the 'children' attribute. The latter is used by instances for actual child classes, while the Class/nested attribute is for the list of classes whose instancse could be potential children. Change-Id: I968bd84d074dcdcec37d99be5d3d4edac9c35a0c --- M pySim/euicc.py 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/euicc.py b/pySim/euicc.py index c070525..19b1c57 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -245,11 +245,11 @@ # SGP.22 Section 5.7.21: ES10c SetNickname class SnrProfileNickname(BER_TLV_IE, tag=0x8f): _construct = Utf8Adapter(GreedyBytes) -class SetNicknameReq(BER_TLV_IE, tag=0xbf29, children=[Iccid, SnrProfileNickname]): +class SetNicknameReq(BER_TLV_IE, tag=0xbf29, nested=[Iccid, SnrProfileNickname]): pass class SetNicknameResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidNotFound=1, undefinedError=127) -class SetNicknameResp(BER_TLV_IE, tag=0xbf29, children=[SetNicknameResult]): +class SetNicknameResp(BER_TLV_IE, tag=0xbf29, nested=[SetNicknameResult]): pass # SGP.32 Section 5.9.10: ES10b: GetCerts -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35262?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I968bd84d074dcdcec37d99be5d3d4edac9c35a0c Gerrit-Change-Number: 35262 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in pysim[master]: euicc: Fix encoding of Lc value in STORE DATA
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35260?usp=email ) Change subject: euicc: Fix encoding of Lc value in STORE DATA .. euicc: Fix encoding of Lc value in STORE DATA The length value "of course" is a hex value, don't use %02u but %02x This fixes any eUICC command with a Lc > 10 bytes. Change-Id: I1e1efbfb9916fc43699602cc889cf4b3d42736f2 --- M pySim/euicc.py 1 file changed, 14 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/euicc.py b/pySim/euicc.py index 58d19f1..c070525 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -297,7 +297,7 @@ def store_data(scc: SimCardCommands, tx_do: Hexstr) -> Tuple[Hexstr, SwHexstr]: """Perform STORE DATA according to Table 47+48 in Section 5.7.2 of SGP.22. Only single-block store supported for now.""" -capdu = '%sE29100%02u%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do) +capdu = '%sE29100%02x%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do) return scc._tp.send_apdu_checksw(capdu) @staticmethod -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35260?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1e1efbfb9916fc43699602cc889cf4b3d42736f2 Gerrit-Change-Number: 35260 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in pysim[master]: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35252?usp=email ) Change subject: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding .. euicc: the ICCID TLV object uses bcd-swapped-nibble encoding Change-Id: I050f9e0fb128f3e1d472e2330b136a753794a5a1 --- M pySim/euicc.py 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/pySim/euicc.py b/pySim/euicc.py index c74ca66..58d19f1 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -149,7 +149,7 @@ class NotificationAddress(BER_TLV_IE, tag=0x82): _construct = Utf8Adapter(GreedyBytes) class Iccid(BER_TLV_IE, tag=0x5a): -_construct = HexAdapter(GreedyBytes) +_construct = BcdAdapter(GreedyBytes) class NotificationMetadata(BER_TLV_IE, tag=0xbf2f, nested=[SeqNumber, ProfileMgmtOperation, NotificationAddress, Iccid]): pass -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35252?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I050f9e0fb128f3e1d472e2330b136a753794a5a1 Gerrit-Change-Number: 35252 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in pysim[master]: euicc: Fix TLV IE definitions for SetNickname{Req,Resp}
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35262?usp=email ) Change subject: euicc: Fix TLV IE definitions for SetNickname{Req,Resp} .. Patch Set 1: Code-Review+2 (1 comment) Patchset: PS1: so trivial, marking +2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35262?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I968bd84d074dcdcec37d99be5d3d4edac9c35a0c Gerrit-Change-Number: 35262 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 22:33:49 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: euicc: Fix encoding of Lc value in STORE DATA
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35260?usp=email ) Change subject: euicc: Fix encoding of Lc value in STORE DATA .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35260?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1e1efbfb9916fc43699602cc889cf4b3d42736f2 Gerrit-Change-Number: 35260 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 22:33:16 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: euicc: Fix TLV IE definitions for SetNickname{Req,Resp}
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35262?usp=email ) Change subject: euicc: Fix TLV IE definitions for SetNickname{Req,Resp} .. euicc: Fix TLV IE definitions for SetNickname{Req,Resp} The metaclass uese the 'nested' attribute, while the existing code accidentially used the 'children' attribute. The latter is used by instances for actual child classes, while the Class/nested attribute is for the list of classes whose instancse could be potential children. Change-Id: I968bd84d074dcdcec37d99be5d3d4edac9c35a0c --- M pySim/euicc.py 1 file changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/35262/1 diff --git a/pySim/euicc.py b/pySim/euicc.py index c070525..19b1c57 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -245,11 +245,11 @@ # SGP.22 Section 5.7.21: ES10c SetNickname class SnrProfileNickname(BER_TLV_IE, tag=0x8f): _construct = Utf8Adapter(GreedyBytes) -class SetNicknameReq(BER_TLV_IE, tag=0xbf29, children=[Iccid, SnrProfileNickname]): +class SetNicknameReq(BER_TLV_IE, tag=0xbf29, nested=[Iccid, SnrProfileNickname]): pass class SetNicknameResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidNotFound=1, undefinedError=127) -class SetNicknameResp(BER_TLV_IE, tag=0xbf29, children=[SetNicknameResult]): +class SetNicknameResp(BER_TLV_IE, tag=0xbf29, nested=[SetNicknameResult]): pass # SGP.32 Section 5.9.10: ES10b: GetCerts -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35262?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I968bd84d074dcdcec37d99be5d3d4edac9c35a0c Gerrit-Change-Number: 35262 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in osmocom-bb[master]: trxcon/{l1sched,l1gprs}: prepare for independent USF decoding
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35261?usp=email ) Change subject: trxcon/{l1sched,l1gprs}: prepare for independent USF decoding .. trxcon/{l1sched,l1gprs}: prepare for independent USF decoding Change-Id: I6953e7335e8d39af166d320290e9edfcd06ef141 Related: libosmocore.git I43e8bfb4003f34766ace7c5c6080ca583ce5efbb Related: libosmocore.git I61a3628741c0ac68374fc7f077cf3a07e51277c3 --- M src/host/trxcon/src/sched_lchan_pdtch.c M src/host/trxcon/src/trxcon_fsm.c M src/shared/l1gprs.c 3 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/35261/1 diff --git a/src/host/trxcon/src/sched_lchan_pdtch.c b/src/host/trxcon/src/sched_lchan_pdtch.c index 915b060..ee51005 100644 --- a/src/host/trxcon/src/sched_lchan_pdtch.c +++ b/src/host/trxcon/src/sched_lchan_pdtch.c @@ -37,6 +37,7 @@ int rx_pdtch_fn(struct l1sched_lchan_state *lchan, const struct l1sched_burst_ind *bi) { + uint8_t usf = 0xff; /* invalid value */ uint8_t l2[GPRS_L2_MAX_LEN]; int n_errors, n_bits_total, rc; sbit_t *bursts_p, *burst; @@ -86,8 +87,7 @@ *mask = *mask << 4; /* Attempt to decode */ - rc = gsm0503_pdtch_decode(l2, bursts_p, - NULL, _errors, _bits_total); + rc = gsm0503_pdtch_decode(l2, bursts_p, , _errors, _bits_total); if (rc < 0) { LOGP_LCHAND(lchan, LOGL_ERROR, "Received bad frame (rc=%d, ber=%d/%d) at fn=%u\n", diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index f6c9a05..8acc9b7 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -615,7 +615,7 @@ const struct trxcon_param_rx_data_ind *ind = data; struct l1gprs_prim_dl_block_ind block_ind; struct msgb *msg; - uint8_t usf = 0xff; + uint8_t usf = 0xff; /* TODO: get from l1sched */ block_ind = (struct l1gprs_prim_dl_block_ind) { .hdr = { diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c index 3294a42..20017a7 100644 --- a/src/shared/l1gprs.c +++ b/src/shared/l1gprs.c @@ -714,7 +714,7 @@ .ci_cb = htons(ind->meas.ci_cb), .rx_lev = ind->meas.rx_lev, }, - .usf = 0xff, + .usf = *usf, }; if (ind->data_len == 0) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35261?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6953e7335e8d39af166d320290e9edfcd06ef141 Gerrit-Change-Number: 35261 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in pysim[master]: euicc: Fix encoding of Lc value in STORE DATA
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35260?usp=email ) Change subject: euicc: Fix encoding of Lc value in STORE DATA .. euicc: Fix encoding of Lc value in STORE DATA The length value "of course" is a hex value, don't use %02u but %02x This fixes any eUICC command with a Lc > 10 bytes. Change-Id: I1e1efbfb9916fc43699602cc889cf4b3d42736f2 --- M pySim/euicc.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/60/35260/1 diff --git a/pySim/euicc.py b/pySim/euicc.py index 58d19f1..c070525 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -297,7 +297,7 @@ def store_data(scc: SimCardCommands, tx_do: Hexstr) -> Tuple[Hexstr, SwHexstr]: """Perform STORE DATA according to Table 47+48 in Section 5.7.2 of SGP.22. Only single-block store supported for now.""" -capdu = '%sE29100%02u%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do) +capdu = '%sE29100%02x%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do) return scc._tp.send_apdu_checksw(capdu) @staticmethod -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35260?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1e1efbfb9916fc43699602cc889cf4b3d42736f2 Gerrit-Change-Number: 35260 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: coding: clarify the USF decoding for PDCH blocks
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email ) Change subject: coding: clarify the USF decoding for PDCH blocks .. coding: clarify the USF decoding for PDCH blocks The USF (Uplink State Flag) field is present in the MAC header of all Downlink PDCH blocks. It is used by the network to indicate which MS can transmit on subsequent Uplink PDCH block(s). This field is of a high importance for the MS, thus the decoder API allows the caller to obtain USF value separately from the actual data bits. In the case of gsm0503_pdtch_decode(), if the 'usf_p' pointer is not NULL, the USF value would be assigned for CS2/CS3/CS4 (but not CS1) even if the CRC check fails (negative return value). A subsequent patch is to bring the CS1 in consistency with CS2/CS3/CS4. In the case of gsm0503_pdtch_egprs_decode(), decoding of the USF field separately from data bits is not implemented, and moreover the function itself cannot be used for decoding Downlink blocks. Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb --- M src/coding/gsm0503_coding.c 1 file changed, 29 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/35257/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 612e0ad..5b78502 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -921,7 +921,7 @@ * \param[out] l2_data caller-allocated buffer for L2 Frame * \param[in] bursts burst input data as soft unpacked bits * \param[in] nbits number of bits in \a bursts - * \param usf_p unused argument ?!? + * \param usf_p Uplink State Flag, FIXME: not implemented * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of decoded bits * \returns number of bytes decoded; negative on error */ @@ -1010,7 +1010,7 @@ /*! Decode GPRS PDTCH * \param[out] l2_data caller-allocated buffer for L2 Frame * \param[in] bursts burst input data as soft unpacked bits - * \param[out] usf_p uplink stealing flag + * \param[out] usf_p Uplink State Flag, only relevant for DL blocks * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of dcoded bits * \returns number of bytes decoded; negative on error */ @@ -1061,6 +1061,7 @@ osmo_conv_decode_ber(_cs2_np, cB, conv, n_errors, n_bits_total); + /* 5.1.2.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 6; j++) k += abs(((int)gsm0503_usf2six[i][j]) - ((int)conv[j])); @@ -1096,6 +1097,7 @@ osmo_conv_decode_ber(_cs3_np, cB, conv, n_errors, n_bits_total); + /* 5.1.3.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 6; j++) k += abs(((int)gsm0503_usf2six[i][j]) - ((int)conv[j])); @@ -1124,6 +1126,7 @@ for (i = 12; i < 456; i++) conv[i] = (cB[i] < 0) ? 1 : 0; + /* 5.1.4.2 a) the three USF bits d(0),d(1),d(2) are precoded into twelve bits */ for (i = 0; i < 8; i++) { for (j = 0, k = 0; j < 12; j++) k += abs(((int)gsm0503_usf2twelve_sbit[i][j]) - ((int)cB[j])); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35257?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I43e8bfb4003f34766ace7c5c6080ca583ce5efbb Gerrit-Change-Number: 35257 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email ) Change subject: coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() .. coding: fix doxygen docs for gsm0503_pdtch[_egprs]_decode() Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde --- M src/coding/gsm0503_coding.c 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/35256/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 365ae6e..612e0ad 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -924,7 +924,7 @@ * \param usf_p unused argument ?!? * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of decoded bits - * \returns 0 on success; negative on error */ + * \returns number of bytes decoded; negative on error */ int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, const sbit_t *bursts, uint16_t nbits, uint8_t *usf_p, int *n_errors, int *n_bits_total) { @@ -1013,7 +1013,7 @@ * \param[out] usf_p uplink stealing flag * \param[out] n_errors number of detected bit-errors * \param[out] n_bits_total total number of dcoded bits - * \returns 0 on success; negative on error */ + * \returns number of bytes decoded; negative on error */ int gsm0503_pdtch_decode(uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p, int *n_errors, int *n_bits_total) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35256?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I09a4c52f5704a6436eff524cd2ce5c35347aafde Gerrit-Change-Number: 35256 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: tests/coding: fix -Wmaybe-uninitialized in test_pdtch()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email ) Change subject: tests/coding: fix -Wmaybe-uninitialized in test_pdtch() .. tests/coding: fix -Wmaybe-uninitialized in test_pdtch() I am seeing this when building with gcc v13.2.1: tests/coding/coding_test.c: In function ‘test_pdtch’: tests/coding/coding_test.c:444:23: warning: ‘*result[]’ may be used uninitialized 444 | result[len - 1] &= 0x7f; | ~~^ tests/coding/coding_test.c:448:23: warning: ‘*result[39]’ may be used uninitialized 448 | result[len - 1] &= 0x07; | ~~^ The idea here is to pre-clear some bits in the resulting buffer, because they're not going to be set during decoding of the burst bits. The problem is that result[] holds uninitialized data, so we're basically taking a 'garbage' octet and clear some of its bits. The remaining 'garbage' bits of that octet are overwritten by the decoder, so in the end we still get deterministic results. Let's make GCC happy by clearing all bits in the last octet. Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e --- M tests/coding/coding_test.c 1 file changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/35259/1 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index c9508f7..d536e44 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -441,11 +441,11 @@ case 34: case 54: l2[len - 1] &= 0x7f; - result[len - 1] &= 0x7f; + result[len - 1] = 0x00; break; case 40: l2[len - 1] &= 0x07; - result[len - 1] &= 0x07; + result[len - 1] = 0x00; break; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35259?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I24d79de8b3a5f4184b71414504657e5857498e0e Gerrit-Change-Number: 35259 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email ) Change subject: coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 .. coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 This patch brings decoding of the CS1 in consistency with the other three coding schemes, for which we support decoding USF independently. Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 --- M src/coding/gsm0503_coding.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/35258/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5b78502..1f409d6 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1042,6 +1042,10 @@ osmo_conv_decode_ber(_xcch, cB, conv, n_errors, n_bits_total); + /* the three USF bits d(0),d(1),d(2) are *not* precoded */ + if (usf_p) + *usf_p = (conv[0] << 2) | (conv[1] << 1) | (conv[2] << 0); + rv = osmo_crc64gen_check_bits(_fire_crc40, conv, 184, conv + 184); if (rv) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35258?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I61a3628741c0ac68374fc7f077cf3a07e51277c3 Gerrit-Change-Number: 35258 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmo-sccp[master]: ipa: Fix client setting unit_id with ASP name instead of AS
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email ) Change subject: ipa: Fix client setting unit_id with ASP name instead of AS .. ipa: Fix client setting unit_id with ASP name instead of AS This was broken since ever. The client was submitting the ASP name in the unit_id field during IPA handshake, and the server was expecting it to contain the AS, so it failed with message: "Cannot find any definition for IPA Unit Name '%s'" in ipa_asp_fsm_wait_id_resp(). Fixes: 5f0a8df34cae20455a520c3a85cf94124f486bf2 Change-Id: I249964e171f578726439c40e01ae85aa447afada --- M src/ipa.c M src/xua_asp_fsm.c M src/xua_internal.h 3 files changed, 26 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/55/35255/1 diff --git a/src/ipa.c b/src/ipa.c index a77d331..82ece8b 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -131,7 +131,7 @@ return 0; } -static struct osmo_ss7_as *find_as_for_asp(struct osmo_ss7_asp *asp) +struct osmo_ss7_as *ipa_find_as_for_asp(struct osmo_ss7_asp *asp) { struct osmo_ss7_as *as; @@ -216,7 +216,7 @@ int rc; struct m3ua_data_hdr data_hdr; struct xua_msg *xua; - struct osmo_ss7_as *as = find_as_for_asp(asp); + struct osmo_ss7_as *as = ipa_find_as_for_asp(asp); uint32_t opc, dpc; if (!as) { diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 2d81bc3..cc94ac7 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -1190,10 +1190,16 @@ { struct osmo_fsm_inst *fi; struct ipa_asp_fsm_priv *iafp; + struct osmo_ss7_as *as = ipa_find_as_for_asp(asp); /* allocate as child of AS? */ fi = osmo_fsm_inst_alloc(_asp_fsm, asp, NULL, log_level, asp->cfg.name); + if (!as) { + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); + return NULL; + } + iafp = talloc_zero(fi, struct ipa_asp_fsm_priv); if (!iafp) { osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); @@ -1202,7 +1208,7 @@ iafp->role = role; iafp->asp = asp; iafp->ipa_unit = talloc_zero(iafp, struct ipaccess_unit); - iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, asp->cfg.name); + iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, as->cfg.name); iafp->pong_timer.cb = ipa_pong_timer_cb; iafp->pong_timer.data = fi; diff --git a/src/xua_internal.h b/src/xua_internal.h index 93f6140..b6b33af 100644 --- a/src/xua_internal.h +++ b/src/xua_internal.h @@ -117,6 +117,7 @@ int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua); int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg, uint8_t sls); +struct osmo_ss7_as *ipa_find_as_for_asp(struct osmo_ss7_asp *asp); int osmo_isup_party_parse(char *out_digits, const uint8_t *in, unsigned int in_num_bytes, bool odd); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35255?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I249964e171f578726439c40e01ae85aa447afada Gerrit-Change-Number: 35255 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[M] Change in osmo-bsc[master]: SI10: generate rest-octets
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31047?usp=email ) Change subject: SI10: generate rest-octets .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31047?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6b39f193d5940a629505bab0c0f1c4d192943fd8 Gerrit-Change-Number: 31047 Gerrit-PatchSet: 20 Gerrit-Owner: msuraev Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon
[S] Change in osmo-bsc[master]: SI10: add to SACCH filling
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32631?usp=email ) Change subject: SI10: add to SACCH filling .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32631?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5f5bd8887682ff09cf11cc7a3dae5048f50e3fd0 Gerrit-Change-Number: 32631 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: jolly Gerrit-CC: laforge Gerrit-MessageType: abandon
[M] Change in osmocom-bb[master]: mobile: add SI10 receive stub
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31665?usp=email ) Change subject: mobile: add SI10 receive stub .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31665?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia2672636251be1894c50b34d67ea1e6295f97d97 Gerrit-Change-Number: 31665 Gerrit-PatchSet: 4 Gerrit-Owner: msuraev Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon
[S] Change in pysim[master]: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35252?usp=email ) Change subject: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35252?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I050f9e0fb128f3e1d472e2330b136a753794a5a1 Gerrit-Change-Number: 35252 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 17:39:07 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34932?usp=email ) Change subject: runtime: refactor file selection methods select and select_file .. Patch Set 3: (2 comments) File pySim/runtime.py: https://gerrit.osmocom.org/c/pysim/+/34932/comment/780e95ff_025b0e03 PS3, Line 357: failes fails (without 'e') https://gerrit.osmocom.org/c/pysim/+/34932/comment/9d063036_1f488791 PS3, Line 383: f = sels[name] unused? you're doing `sels[name]` below... -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2 Gerrit-Change-Number: 34932 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 17:32:34 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[M] Change in pysim[master]: tlv: improve flatten_dict_lists for multiple keys
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35254?usp=email ) Change subject: tlv: improve flatten_dict_lists for multiple keys .. tlv: improve flatten_dict_lists for multiple keys when we flatten a list of dicts into a single dict we must make sure that duplicate key names are not swallowed. This may happen when there is an array of objects that share the same identifier. When those are stored all following objects are stored at the same key so that only the content of the last one survives. One prominent example where this bug is triggered is the key_reference in pin_status_template_do. When the MF is selected, there should be 4 key_reference values, but only the last appears. Change I7f6d03bf323a153f3172853a3ef171cbec8aece7 fixes the problem, but now the problematic dicts are no longer flattned, which results in a strange looking output. When append an index to the key, we can still flatten the dicts and the output looks compact again. Related: OS#6211 Change-Id: Ie3b418ca3965b0221bbf5f85d7d0e0fbb39d9d87 --- M pySim/tlv.py 1 file changed, 46 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/35254/1 diff --git a/pySim/tlv.py b/pySim/tlv.py index c85d92b..d3c75e2 100644 --- a/pySim/tlv.py +++ b/pySim/tlv.py @@ -435,17 +435,33 @@ return False return True -def are_elements_unique(lod): -set_of_keys = set([list(x.keys())[0] for x in lod]) -return len(lod) == len(set_of_keys) +def add_element_to_newdict(newdict:dict, key:str, element) -> str: +newkey = key +count = 1 +while 1: +# Test if the new key (which is equal to key at the beginning) is +# already in the newdict. If this is a case we append an index +# number and try again. +if newkey not in newdict and newkey + "_0" not in newdict: +# Rename the already existing zeroth element to element_0, so +# that we maintain a consistent element counting. +if key in newdict and newkey != key: +newdict[key + "_0"] = newdict.pop(key) +# Store new element under the new key and leave +newdict[newkey] = element +return + +# Compute the next key to try +newkey = key + "_" + str(count) +count = count + 1 if isinstance(inp, list): -if are_all_elements_dict(inp) and are_elements_unique(inp): +if are_all_elements_dict(inp): # flatten into one shared dict newdict = {} for e in inp: key = list(e.keys())[0] -newdict[key] = e[key] +add_element_to_newdict(newdict, key, e[key]) inp = newdict # process result as any native dict return {k:flatten_dict_lists(inp[k]) for k in inp.keys()} -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35254?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie3b418ca3965b0221bbf5f85d7d0e0fbb39d9d87 Gerrit-Change-Number: 35254 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
[S] Change in pysim[master]: runtime: explain how file probing works
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35251?usp=email ) Change subject: runtime: explain how file probing works .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35251?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669 Gerrit-Change-Number: 35251 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 16:58:06 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-netif[master]: stream: Add missing osmo_stream_srv_link_get_fd() API
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email ) Change subject: stream: Add missing osmo_stream_srv_link_get_fd() API .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I1bd3f790d93af74c150938a59108b882ad2820f3 Gerrit-Change-Number: 35241 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 15:57:27 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email ) Change subject: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list .. vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list The Remote Address is by far the potentially largest column, as well as the one with more variable length, so move it to the end for better formatting. Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 48 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/53/35253/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 6ab2401..35f0dda 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1149,9 +1149,9 @@ return CMD_WARNING; } - vty_out(vty, " Current Primary Link%s", VTY_NEWLINE); - vty_out(vty, "ASP Name AS Name State Type Role Remote IPaddr & Port SCTP Role%s", VTY_NEWLINE); - vty_out(vty, " - --- -%s", VTY_NEWLINE); + vty_out(vty, " Current Primary Link%s", VTY_NEWLINE); + vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Remote Addresses%s", VTY_NEWLINE); + vty_out(vty, " - - ---%s", VTY_NEWLINE); llist_for_each_entry(asp, >asp_list, list) { if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA && asp->cfg.remote.port == 0 && asp->server) { @@ -1163,14 +1163,14 @@ snprintf(buf, sizeof(buf), "%s:%s", hostbuf, portbuf); } else osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), >cfg.remote); - vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-23s %-9s%s", + vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-9s %-23s%s", asp->cfg.name, as_list_for_asp(asp, as_buf, sizeof(as_buf)), asp->fi? osmo_fsm_inst_state_name(asp->fi) : "uninitialized", get_value_string(osmo_ss7_asp_protocol_vals, asp->cfg.proto), osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), - buf, asp->cfg.is_server ? "server" : "client", + buf, VTY_NEWLINE); } return CMD_SUCCESS; diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index dcea4ca..73a13b5 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -256,27 +256,27 @@ ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.200 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.100 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp - Current Primary Link -ASP Name AS Name State Type Role Remote IPaddr & Port SCTP Role - - --- - -my-asp? uninitialized m3ua sg127.0.0.200:12345 server + Current Primary Link +ASP Name AS Name State Type Role SCTP Role Remote Addresses + - - --- +my-asp? uninitialized m3ua sgserver 127.0.0.200:12345 ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.101 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp - Current Primary Link -ASP Name AS Name State Type Role Remote IPaddr & Port SCTP Role - - --- - -my-asp? uninitialized m3ua sg (127.0.0.200|127.0.0.201):12345 server + Current Primary Link +ASP Name AS Name State Type Role SCTP Role Remote Addresses + - - --- +my-asp? uninitialized m3ua sgserver (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config-cs7-asp)# ! Mark as primary: ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201 primary ss7_asp_vty_test(config-cs7-asp)# ! 'local-ip 127.0.0.101 primary' cannot be tested here
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email ) Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. Patch Set 5: (1 comment) Patchset: PS4: > I'm wondering if we really want to store/display/... […] I'm also fine with not merging this patch, since I agree prefixes in log lines end up being quite long if the user has several addresses configured in a socket (or uses 0.0.0.0|::). -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 13:32:26 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment
[S] Change in libosmo-netif[master]: stream: Add missing osmo_stream_srv_link_get_fd() API
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email ) Change subject: stream: Add missing osmo_stream_srv_link_get_fd() API .. stream: Add missing osmo_stream_srv_link_get_fd() API osmo_stream_srv and osmo_stream_cli already had that API introduced in order to use it instead of *_get_ofd(), since the later will eventually be deprecated due to incoming osmo_io. Change-Id: I1bd3f790d93af74c150938a59108b882ad2820f3 --- M include/osmocom/netif/stream.h M src/stream_srv.c 2 files changed, 22 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 218b635..681f9ec 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -38,6 +38,7 @@ void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link); char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link *link); struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link); +int osmo_stream_srv_link_get_fd(const struct osmo_stream_srv_link *link); bool osmo_stream_srv_link_is_opened(const struct osmo_stream_srv_link *link); int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link); void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link); diff --git a/src/stream_srv.c b/src/stream_srv.c index 42b04ad..f5a0b42 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -366,6 +366,14 @@ return >ofd; } +/*! \brief Get File Descriptor of the stream server link + * \param[in] conn Stream Server Link + * \returns file descriptor or negative on error */ +int osmo_stream_srv_link_get_fd(const struct osmo_stream_srv_link *link) +{ + return link->ofd.fd; +} + /*! \brief Set the accept() call-back of the stream server link * \param[in] link Stream Server Link * \param[in] accept_cb Call-back function executed upon accept() */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I1bd3f790d93af74c150938a59108b882ad2820f3 Gerrit-Change-Number: 35241 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. stream: Use new multiaddr APIs to log whole set of sock addresses Until now, the used (existing) APIs were only retrieving 1 local and 1 remote address, even if the socket actually handled several, as it's possible with SCTP multi-homing setups. Related: SYS#6636 Depends: libosmocore.git Change-Id I48950754ed6f61ee5ffa04a447fab8903f10acc0 Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 --- M TODO-RELEASE M src/stream_cli.c M src/stream_srv.c 3 files changed, 61 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/40/35240/5 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email ) Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. Patch Set 4: (1 comment) Patchset: PS4: I'm wondering if we really want to store/display/... those absurdly long strings consisting of all the socket addresses here. It's fine if there is a single VTY command that shows the user all the gory detail. But having potentially hundreds of characters as prefix in a log message? I don't really think this is where we want to move. -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 13:25:18 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_multiaddr_get_name_buf()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email ) Change subject: socket: Introduce API osmo_sock_multiaddr_get_name_buf() .. socket: Introduce API osmo_sock_multiaddr_get_name_buf() An extra osmo_multiaddr_ip_and_port_snprintf() API is introduced which is used by osmo_sock_multiaddr_get_name_buf() but which will also be used by other app uers willing to use osmo_sock_multiaddr_get_ip_and_port() according to its needs (eg. only printing the local side). Related: SYS#6636 Change-Id: I48950754ed6f61ee5ffa04a447fab8903f10acc0 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/core/libosmocore.map M src/core/socket.c 4 files changed, 129 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/TODO-RELEASE b/TODO-RELEASE index e365746..316c0ec 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,7 +8,7 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library whatdescription / commit summary line core ADD osmo_sock_multiaddr_{add,del}_local_addr() -core ADD osmo_sock_multiaddr_get_ip_and_port() +core ADD osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf(), osmo_sock_multiaddr_get_name_buf() core ADD gsmtap_inst_fd2() core, DEPRECATE gsmtap_inst_fd() isdn ABI change add states and flags for external T200 handling gsmABI change add T200 timer states to lapdm_datalink diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index b8b04f8..dd14556 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -193,6 +193,10 @@ int osmo_sock_multiaddr_get_ip_and_port(int fd, int ip_proto, char *ip, size_t *ip_cnt, size_t ip_len, char *port, size_t port_len, bool local); +int osmo_multiaddr_ip_and_port_snprintf(char *str, size_t str_len, + const char *ip, size_t ip_cnt, size_t ip_len, + const char *portbuf); +int osmo_sock_multiaddr_get_name_buf(char *str, size_t str_len, int fd, int sk_proto); int osmo_sock_multiaddr_add_local_addr(int sfd, const char **addrs, size_t addrs_cnt); int osmo_sock_multiaddr_del_local_addr(int sfd, const char **addrs, size_t addrs_cnt); diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index ffbbd2f..e7daced 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -298,6 +298,7 @@ osmo_macaddr_parse; osmo_mnl_destroy; osmo_mnl_init; +osmo_multiaddr_ip_and_port_snprintf; osmo_netdev_add_addr; osmo_netdev_add_route; osmo_netdev_alloc; @@ -437,6 +438,7 @@ osmo_sock_multiaddr_add_local_addr; osmo_sock_multiaddr_del_local_addr; osmo_sock_multiaddr_get_ip_and_port; +osmo_sock_multiaddr_get_name_buf; osmo_sock_set_dscp; osmo_sock_set_priority; osmo_sock_unix_init; diff --git a/src/core/socket.c b/src/core/socket.c index 51703ef..c600732 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -2018,6 +2018,112 @@ return talloc_asprintf(ctx, "(%s)", str); } +/*! Format multiple IP addresses and/or port number into a combined string buffer + * \param[out] str Destination string buffer. + * \param[in] str_len sizeof(str). + * \param[out] ip Pointer to memory holding ip_cnt consecutive buffers of size ip_len. + * \param[out] ip_cnt length ip array pointer. on return it contains the number of addresses found. + * \param[in] ip_len length of each of the string buffer in the the ip array. + * \param[out] port number (will be printed in when not NULL). + * \return String length as returned by snprintf(), or negative on error. + * + * This API expectes an ip array as the one filled in by + * osmo_sock_multiaddr_get_ip_and_port(), and hence it's a good companion for + * that API. + */ +int osmo_multiaddr_ip_and_port_snprintf(char *str, size_t str_len, + const char *ip, size_t ip_cnt, size_t ip_len, + const char *portbuf) +{ + struct osmo_strbuf sb = { .buf = str, .len = str_len }; + bool is_v6 = false; + unsigned int i; + + if (ip_cnt == 0) { + OSMO_STRBUF_PRINTF(sb, "NULL:%s", portbuf); + return sb.chars_needed; + } + if (ip_cnt > 1) + OSMO_STRBUF_PRINTF(sb, "("); + else if ((is_v6 = !!strchr([0], ':'))) /* IPv6, add [] to separate from port. */ + OSMO_STRBUF_PRINTF(sb, "["); + + for (i = 0; i < ip_cnt - 1; i++) + OSMO_STRBUF_PRINTF(sb, "%s|", [i * ip_len]); + OSMO_STRBUF_PRINTF(sb, "%s", [i * ip_len]); + + if (ip_cnt > 1) +
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_multiaddr_get_ip_and_port()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35179?usp=email ) Change subject: socket: Introduce API osmo_sock_multiaddr_get_ip_and_port() .. socket: Introduce API osmo_sock_multiaddr_get_ip_and_port() This API will be used internally by osmo_sock_multiaddr_get_name_buf() in a follow-up patch. This API can also be used directly by user who wish to obtain a list of local/remote IP addresses and port from an SCTP socket. Related: SYS#6636 Related: OS#5581 Change-Id: I19d560ab4aadec18a4c0f94115675ec1d7ab14d7 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/core/libosmocore.map M src/core/socket.c 4 files changed, 109 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/TODO-RELEASE b/TODO-RELEASE index fa7bc57..e365746 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,6 +8,7 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library whatdescription / commit summary line core ADD osmo_sock_multiaddr_{add,del}_local_addr() +core ADD osmo_sock_multiaddr_get_ip_and_port() core ADD gsmtap_inst_fd2() core, DEPRECATE gsmtap_inst_fd() isdn ABI change add states and flags for external T200 handling gsmABI change add T200 timer states to lapdm_datalink diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 03f1d39..b8b04f8 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -191,6 +191,8 @@ int osmo_sock_get_remote_ip(int fd, char *host, size_t len); int osmo_sock_get_remote_ip_port(int fd, char *port, size_t len); +int osmo_sock_multiaddr_get_ip_and_port(int fd, int ip_proto, char *ip, size_t *ip_cnt, size_t ip_len, + char *port, size_t port_len, bool local); int osmo_sock_multiaddr_add_local_addr(int sfd, const char **addrs, size_t addrs_cnt); int osmo_sock_multiaddr_del_local_addr(int sfd, const char **addrs, size_t addrs_cnt); diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index 30c4927..ffbbd2f 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -436,6 +436,7 @@ osmo_sock_mcast_ttl_set; osmo_sock_multiaddr_add_local_addr; osmo_sock_multiaddr_del_local_addr; +osmo_sock_multiaddr_get_ip_and_port; osmo_sock_set_dscp; osmo_sock_set_priority; osmo_sock_unix_init; diff --git a/src/core/socket.c b/src/core/socket.c index 7fc1b72..51703ef 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1868,6 +1868,95 @@ return 0; } +/*! Get multiple IP addresses and/or port number on socket in separate string buffers + * \param[in] fd file descriptor of socket. + * \param[out] ip_proto IPPROTO of the socket, eg: IPPROTO_SCTP. + * \param[out] ip Pointer to memory holding consecutive buffers of size ip_len. + * \param[out] ip_cnt length ip array pointer. on return it contains the number of addresses found. + * \param[in] ip_len length of each of the string buffer in the the ip array. + * \param[out] port number (will be filled in when not NULL). + * \param[in] port_len length of the port buffer. + * \param[in] local (true) or remote (false) name will get looked at. + * \returns 0 on success; negative otherwise. + * + * Upon return, ip_cnt can be set to a higher value than the one set by the + * caller. This can be used by the caller to find out the required array length + * and then obtaining by calling the function twice. Only up to ip_cnt addresses + * are filed in, as per the value provided by the caller. + * + * Usage example retrieving all (up to OSMO_SOCK_MAX_ADDRS, 32) bound IP addresses and bound port: + * char hostbuf[OSMO_SOCK_MAX_ADDRS][INET6_ADDRSTRLEN]; + * size_t num_hostbuf = ARRAY_SIZE(hostbuf); + * char portbuf[6]; + * rc = osmo_sock_multiaddr_get_ip_and_port(fd, IPPROTO_SCTP, [0][0], _hostbuf, + * sizeof(hostbuf[0]), portbuf, sizeof(portbuf), true); + * if (rc < 0) + * goto error; + * if (num_hostbuf > ARRAY_SIZE(hostbuf)) + * goto not_enough_buffers; + */ +int osmo_sock_multiaddr_get_ip_and_port(int fd, int ip_proto, char *ip, size_t *ip_cnt, size_t ip_len, + char *port, size_t port_len, bool local) +{ + struct sockaddr *addrs = NULL; + unsigned int n_addrs, i; + void *addr_buf; + int rc; + + switch (ip_proto) { + case IPPROTO_SCTP: + break; /* continue below */ + default: + if (*ip_cnt == 0) { + *ip_cnt = 1; + return 0; + } + *ip_cnt = 1; + return
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_multiaddr_get_name_buf()
Attention is currently required from: neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email ) Change subject: socket: Introduce API osmo_sock_multiaddr_get_name_buf() .. Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48950754ed6f61ee5ffa04a447fab8903f10acc0 Gerrit-Change-Number: 35180 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-Attention: neels Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 13:23:03 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35252?usp=email ) Change subject: euicc: the ICCID TLV object uses bcd-swapped-nibble encoding .. euicc: the ICCID TLV object uses bcd-swapped-nibble encoding Change-Id: I050f9e0fb128f3e1d472e2330b136a753794a5a1 --- M pySim/euicc.py 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/35252/1 diff --git a/pySim/euicc.py b/pySim/euicc.py index c74ca66..58d19f1 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -149,7 +149,7 @@ class NotificationAddress(BER_TLV_IE, tag=0x82): _construct = Utf8Adapter(GreedyBytes) class Iccid(BER_TLV_IE, tag=0x5a): -_construct = HexAdapter(GreedyBytes) +_construct = BcdAdapter(GreedyBytes) class NotificationMetadata(BER_TLV_IE, tag=0xbf2f, nested=[SeqNumber, ProfileMgmtOperation, NotificationAddress, Iccid]): pass -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35252?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I050f9e0fb128f3e1d472e2330b136a753794a5a1 Gerrit-Change-Number: 35252 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in pysim[master]: pySim-shell: don't get trapped in applications without file system
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34884?usp=email ) Change subject: pySim-shell: don't get trapped in applications without file system .. pySim-shell: don't get trapped in applications without file system When we traverse the file system, we may also end up selecting applications (ADF), which do not support an USIM/ISIM like file system. This will leave us without the ability to select the MF (or any other file) again. The only way out is to select the ISIM or USIM application again to get the access to the file system again. Change-Id: Ia2fdd65f430c07acb1afdaf265d24c6928b654e0 Related: OS#5418 --- M pySim-shell.py 1 file changed, 43 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim-shell.py b/pySim-shell.py index 3d8bd86..6ff484b 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -54,7 +54,7 @@ from pySim.utils import is_hexstr_or_decimal, is_hexstr, is_decimal from pySim.card_handler import CardHandler, CardHandlerAuto -from pySim.filesystem import CardDF, CardADF +from pySim.filesystem import CardMF, CardDF, CardADF from pySim.ts_102_222 import Ts10Commands from pySim.gsm_r import DF_EIRENE from pySim.cat import ProactiveCommand @@ -518,7 +518,32 @@ # below, so we must not move up. if skip_df == False: self.walk(indent + 1, action_ef, action_df, context, **kwargs) -fcp_dec = self._cmd.lchan.select("..", self._cmd) + +parent = self._cmd.lchan.selected_file.parent +df = self._cmd.lchan.selected_file +adf = self._cmd.lchan.selected_adf +if isinstance(parent, CardMF) and (adf and adf.has_fs == False): +# Not every application that may be present on a GlobalPlatform card will support the SELECT +# command as we know it from ETSI TS 102 221, section 11.1.1. In fact the only subset of +# SELECT we may rely on is the OPEN SELECT command as specified in GlobalPlatform Card +# Specification, section 11.9. Unfortunately the OPEN SELECT command only supports the +# "select by name" method, which means we can only select an application and not a file. +# The consequence of this is that we may get trapped in an application that does not have +# ISIM/USIM like file system support and the only way to leave that application is to select +# an ISIM/USIM application in order to get the file system access back. +# +# To automate this escape-route while traversing the file system we will check whether +# the parent file is the MF. When this is the case and the selected ADF has no file system +# support, we will select an arbitrary ADF that has file system support first and from there +# we will then select the MF. +for selectable in parent.get_selectables().items(): +if isinstance(selectable[1], CardADF) and selectable[1].has_fs == True: +self._cmd.lchan.select(selectable[1].name, self._cmd) +break +self._cmd.lchan.select(df.get_mf().name, self._cmd) +else: +# Normal DF/ADF selection +fcp_dec = self._cmd.lchan.select("..", self._cmd) elif action_ef: df_before_action = self._cmd.lchan.selected_file -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34884?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia2fdd65f430c07acb1afdaf265d24c6928b654e0 Gerrit-Change-Number: 34884 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-MessageType: merged
[S] Change in pysim[master]: pySim-shell: don't get trapped in applications without file system
Attention is currently required from: dexter, fixeria, lynxis lazus. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34884?usp=email ) Change subject: pySim-shell: don't get trapped in applications without file system .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34884?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia2fdd65f430c07acb1afdaf265d24c6928b654e0 Gerrit-Change-Number: 34884 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Attention: fixeria Gerrit-Attention: lynxis lazus Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:21:04 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_multiaddr_get_name_buf()
Attention is currently required from: neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email ) Change subject: socket: Introduce API osmo_sock_multiaddr_get_name_buf() .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48950754ed6f61ee5ffa04a447fab8903f10acc0 Gerrit-Change-Number: 35180 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-Attention: neels Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 13:20:48 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmocore[master]: logging: fix nul octets in log output / use osmo_strbuf
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35208?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: logging: fix nul octets in log output / use osmo_strbuf .. logging: fix nul octets in log output / use osmo_strbuf Patch [1] merged few weeks ago, for yet unknown reasons, sprinkles nul characters at seemingly randomly chosen log line ends. Trying to figure out why that happens, i got tired of the unreadable cruft, and decided to migrate the _output_buf() implementation to osmo_strbuf first. With osmo_strbuf in use and implementing 1:1 what the previous code did, the odd nul octets have disappeared. So the bug was caused by unreadable code. [1] 11a416827dd9f2da6b7c1db0e1e83adb1e6e5cc8 Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433 "logging: ensure ANSI color escape is sent in same line/before newline" Related: OS#6284 Related: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433 Change-Id: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 --- M src/core/logging.c 1 file changed, 70 insertions(+), 84 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve neels: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/core/logging.c b/src/core/logging.c index dc19cf3..0d215f4 100644 --- a/src/core/logging.c +++ b/src/core/logging.c @@ -486,18 +486,18 @@ unsigned int level, const char *file, int line, int cont, const char *format, va_list ap) { - int ret, len = 0, offset = 0, rem = buf_len; + int ret; const char *c_subsys = NULL; + struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; + + /* safety net in case of encountering errors and returning nothing */ + buf[0] = '\0'; /* are we using color */ if (target->use_color) { c_subsys = color(subsys); - if (c_subsys) { - ret = snprintf(buf + offset, rem, "%s", c_subsys); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); - } + if (c_subsys) + OSMO_STRBUF_PRINTF(sb, "%s", c_subsys); } if (!cont) { if (target->print_ext_timestamp) { @@ -506,13 +506,10 @@ struct timeval tv; osmo_gettimeofday(, NULL); localtime_r(_sec, ); - ret = snprintf(buf + offset, rem, "%04d%02d%02d%02d%02d%02d%03d ", - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec, - (int)(tv.tv_usec / 1000)); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); + OSMO_STRBUF_PRINTF(sb, "%04d%02d%02d%02d%02d%02d%03d ", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + (int)(tv.tv_usec / 1000)); #endif } else if (target->print_timestamp) { time_t tm; @@ -520,97 +517,66 @@ goto err; /* Get human-readable representation of time. man ctime: we need at least 26 bytes in buf */ - if (rem < 26 || !ctime_r(, buf + offset)) + if (OSMO_STRBUF_REMAIN(sb) < 26 || !ctime_r(, sb.pos)) goto err; - ret = strlen(buf + offset); + ret = strnlen(sb.pos, 26); if (ret <= 0) goto err; + OSMO_STRBUF_ADDED_TAIL(sb, ret); /* Get rid of useless final '\n' added by ctime_r. We want a space instead. */ - buf[offset + ret - 1] = ' '; - OSMO_SNPRINTF_RET(ret, rem, offset, len); + OSMO_STRBUF_DROP_TAIL(sb, 1); + OSMO_STRBUF_PRINTF(sb, " "); } if (target->print_tid) { if (logging_tid == 0) logging_tid = (long int)osmo_gettid(); - ret = snprintf(buf + offset, rem, "%ld ", logging_tid); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); + OSMO_STRBUF_PRINTF(sb,
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail .. util: add osmo_strbuf macros to manipulate the strbuf tail Upcoming patch adopts osmo_strbuf in logging.c, which sometimes needs to steal and re-add trailing newline characters, and also needs to let ctime_r() write to the buffer before updating the osmo_strbuf state. Related: OS#6284 Related: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 --- M include/osmocom/core/utils.h M src/core/libosmocore.map M src/core/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 5 files changed, 178 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 2a3670b..b6e67e2 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -284,6 +284,12 @@ /*! Return remaining space for characters and terminating nul in the given struct osmo_strbuf. */ #define OSMO_STRBUF_REMAIN(STRBUF) ((STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0) +/*! Return number of actual characters contained in struct osmo_strbuf (without terminating nul). */ +#define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && ((STRBUF).pos > (STRBUF).buf) ? \ + OSMO_MIN((STRBUF).pos - (STRBUF).buf, \ +(STRBUF).len - 1) \ + : 0) + /*! Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length. * When using this function, the final STRBUF.chars_needed may not reflect the actual number of characters needed, since * that number cannot be obtained from this kind of function signature. @@ -307,6 +313,16 @@ (STRBUF).chars_needed += _sb_l; \ } while(0) +void osmo_strbuf_drop_tail(struct osmo_strbuf *sb, size_t n_chars); +/* Convenience macro. struct osmo_strbuf are typically static to a function scope. Avoid having to type '&', same as + * with all the other OSMO_STRBUF_* API. */ +#define OSMO_STRBUF_DROP_TAIL(STRBUF, N_CHARS) osmo_strbuf_drop_tail(&(STRBUF), N_CHARS) + +void osmo_strbuf_added_tail(struct osmo_strbuf *sb, size_t n_chars); +/* Convenience macro. struct osmo_strbuf are typically static to a function scope. Avoid having to type '&', same as + * with all the other OSMO_STRBUF_* API. */ +#define OSMO_STRBUF_ADDED_TAIL(STRBUF, N_CHARS) osmo_strbuf_added_tail(&(STRBUF), N_CHARS) + bool osmo_str_startswith(const char *str, const char *startswith_str); int osmo_float_str_to_int(int64_t *val, const char *str, unsigned int precision); diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index fc81650..30c4927 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -510,6 +510,8 @@ osmo_strrb_get_nth; _osmo_strrb_is_bufindex_valid; osmo_strrb_is_empty; +osmo_strbuf_drop_tail; +osmo_strbuf_added_tail; osmo_str_startswith; osmo_str_to_int; osmo_str_to_int64; diff --git a/src/core/utils.c b/src/core/utils.c index 231b65c..882eb6f 100644 --- a/src/core/utils.c +++ b/src/core/utils.c @@ -1211,6 +1211,51 @@ return (sum * 9) % 10 + '0'; } +/*! Remove up to N chars from the end of an osmo_strbuf. + * |--char-count---| - - chars_needed - - | + * |<-drop--| + */ +void osmo_strbuf_drop_tail(struct osmo_strbuf *sb, size_t n_chars) +{ + size_t drop_n; + if (sb->pos <= sb->buf) + return; + drop_n = OSMO_MIN(sb->chars_needed, n_chars); + sb->chars_needed -= drop_n; + /* chars_needed was reduced by n_chars, which may have been entirely behind the end of a full buffer, within the +* hypothetical chars_needed. Modify the buffer tail pos only if the buffer is not or longer full now. */ + if (sb->chars_needed >= OSMO_STRBUF_CHAR_COUNT(*sb)) + return; + sb->pos = sb->buf + sb->chars_needed; + *sb->pos = '\0'; +} + +/*! Let osmo_strbuf know that n_chars characters (excluding nul) were written to the end of the buffer. + * If sb is nonempty, the n_chars are assumed to have been written to sb->pos. If sb is still empty and pos == NULL, the + * n_chars are assumed to have been written to the start of the buffer. + * Advance sb->pos and sb->chars_needed by at most n_chars, or up to sb->len - 1. + * Ensure nul termination. */ +void osmo_strbuf_added_tail(struct osmo_strbuf *sb, size_t n_chars) +{ + /* On init of an osmo_strbuf, sb->pos == NULL, which is defined as semantically identical to pointing at the +* start of the
[S] Change in libosmocore[master]: util: add OSMO_STRBUF_REMAIN()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: util: add OSMO_STRBUF_REMAIN() .. util: add OSMO_STRBUF_REMAIN() This code already exists twice, and upcoming patch will need this as well in logging.c. Add a macro to remove the code dup. Related: OS#6284 Related: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c --- M include/osmocom/core/utils.h 1 file changed, 19 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index ee7cfa4..2a3670b 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -249,7 +249,7 @@ #define OSMO_STRBUF_APPEND(STRBUF, func, args...) do { \ if (!(STRBUF).pos) \ (STRBUF).pos = (STRBUF).buf; \ - size_t _sb_remain = (STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0; \ + size_t _sb_remain = OSMO_STRBUF_REMAIN(STRBUF); \ int _sb_l = func((STRBUF).pos, _sb_remain, ##args); \ if (_sb_l < 0 || (size_t)_sb_l > _sb_remain) \ (STRBUF).pos = (STRBUF).buf + (STRBUF).len; \ @@ -281,6 +281,9 @@ #define OSMO_STRBUF_PRINTF(STRBUF, fmt, args...) \ OSMO_STRBUF_APPEND(STRBUF, snprintf, fmt, ##args) +/*! Return remaining space for characters and terminating nul in the given struct osmo_strbuf. */ +#define OSMO_STRBUF_REMAIN(STRBUF) ((STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0) + /*! Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length. * When using this function, the final STRBUF.chars_needed may not reflect the actual number of characters needed, since * that number cannot be obtained from this kind of function signature. @@ -292,7 +295,7 @@ #define OSMO_STRBUF_APPEND_NOLEN(STRBUF, func, args...) do { \ if (!(STRBUF).pos) \ (STRBUF).pos = (STRBUF).buf; \ - size_t _sb_remain = (STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0; \ + size_t _sb_remain = OSMO_STRBUF_REMAIN(STRBUF); \ if (_sb_remain) { \ func((STRBUF).pos, _sb_remain, ##args); \ } \ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c Gerrit-Change-Number: 35206 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
[S] Change in pysim[master]: euicc: Fix encoding of {enable,disable,delete}_profile
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35244?usp=email ) Change subject: euicc: Fix encoding of {enable,disable,delete}_profile .. euicc: Fix encoding of {enable,disable,delete}_profile The encoding was missing a "CHOICE" container and missed the fact that the refreshFlag presence is mandatory for enable+disable. Change-Id: I12e2b16b2c1b4b01dfad0d1fb485399827f25ddc --- M pySim/euicc.py 1 file changed, 27 insertions(+), 17 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/euicc.py b/pySim/euicc.py index c89d364..c74ca66 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -206,12 +206,14 @@ pass # SGP.22 Section 5.7.16:: EnableProfile -class RefreshFlag(BER_TLV_IE, tag=0x88): # FIXME +class RefreshFlag(BER_TLV_IE, tag=0x81): # FIXME _construct = Int8ub # FIXME class EnableResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidOrAidNotFound=1, profileNotInDisabledState=2, disallowedByPolicy=3, wrongProfileReenabling=4, catBusy=5, undefinedError=127) -class EnableProfileReq(BER_TLV_IE, tag=0xbf31, nested=[IsdpAid, Iccid, RefreshFlag]): +class ProfileIdentifier(BER_TLV_IE, tag=0xa0, nested=[IsdpAid, Iccid]): +pass +class EnableProfileReq(BER_TLV_IE, tag=0xbf31, nested=[ProfileIdentifier, RefreshFlag]): pass class EnableProfileResp(BER_TLV_IE, tag=0xbf31, nested=[EnableResult]): pass @@ -220,7 +222,7 @@ class DisableResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidOrAidNotFound=1, profileNotInEnabledState=2, disallowedByPolicy=3, catBusy=5, undefinedError=127) -class DisableProfileReq(BER_TLV_IE, tag=0xbf32, nested=[IsdpAid, Iccid, RefreshFlag]): +class DisableProfileReq(BER_TLV_IE, tag=0xbf32, nested=[ProfileIdentifier, RefreshFlag]): pass class DisableProfileResp(BER_TLV_IE, tag=0xbf32, nested=[DisableResult]): pass @@ -229,7 +231,7 @@ class DeleteResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidOrAidNotFound=1, profileNotInDisabledState=2, disallowedByPolicy=3, undefinedError=127) -class DeleteProfileReq(BER_TLV_IE, tag=0xbf33, nested=[IsdpAid, Iccid]): +class DeleteProfileReq(BER_TLV_IE, tag=0xbf33, nested=[ProfileIdentifier]): pass class DeleteProfileResp(BER_TLV_IE, tag=0xbf33, nested=[DeleteResult]): pass @@ -404,13 +406,11 @@ @cmd2.with_argparser(en_prof_parser) def do_enable_profile(self, opts): """Perform an ES10c EnableProfile function.""" -ep_cmd_contents = [] if opts.isdp_aid: -ep_cmd_contents.append(IsdpAid(decoded=opts.isdp_aid)) +p_id = ProfileIdentifier(children=[IsdpAid(decoded=opts.isdp_aid)]) if opts.iccid: -ep_cmd_contents.append(Iccid(decoded=opts.iccid)) -if opts.refresh_required: -ep_cmd_contents.append(RefreshFlag()) +p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) +ep_cmd_contents = [p_id, RefreshFlag(decoded=opts.refresh_required)] ep_cmd = EnableProfileReq(children=ep_cmd_contents) ep = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, ep_cmd, EnableProfileResp) d = ep.to_dict() @@ -425,13 +425,11 @@ @cmd2.with_argparser(dis_prof_parser) def do_disable_profile(self, opts): """Perform an ES10c DisableProfile function.""" -dp_cmd_contents = [] if opts.isdp_aid: -dp_cmd_contents.append(IsdpAid(decoded=opts.isdp_aid)) +p_id = ProfileIdentifier(children=[IsdpAid(decoded=opts.isdp_aid)]) if opts.iccid: -dp_cmd_contents.append(Iccid(decoded=opts.iccid)) -if opts.refresh_required: -dp_cmd_contents.append(RefreshFlag()) +p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) +dp_cmd_contents = [p_id, RefreshFlag(decoded=opts.refresh_required)] dp_cmd = DisableProfileReq(children=dp_cmd_contents) dp = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DisableProfileResp) d = dp.to_dict() @@ -445,11 +443,11 @@ @cmd2.with_argparser(del_prof_parser) def do_delete_profile(self, opts): """Perform an ES10c DeleteProfile function.""" -dp_cmd_contents = [] if opts.isdp_aid: -dp_cmd_contents.append(IsdpAid(decoded=opts.isdp_aid)) +p_id = ProfileIdentifier(children=[IsdpAid(decoded=opts.isdp_aid)]) if opts.iccid: -dp_cmd_contents.append(Iccid(decoded=opts.iccid)) +p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) +dp_cmd_contents = [p_id]
[S] Change in pysim[master]: tlv: Fix encoding of zero-valued TLVs
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35243?usp=email ) Change subject: tlv: Fix encoding of zero-valued TLVs .. tlv: Fix encoding of zero-valued TLVs If a TLV was elementary (no nested IEs), and it had only a single integer content whose value is 0, we erroneously encoded that as zero-length TLV (len=0, no value part): >>> rf = pySim.euicc.RefreshFlag(decoded=0); >>> rf.to_bytes() b'' >>> rf.to_tlv() b'\x81\x00' After this change it is correct: >>> rf = pySim.euicc.RefreshFlag(decoded=0); >>> rf.to_bytes() b'\x00' >>> rf.to_tlv() b'\x81\x01\x00' Change-Id: I5f4c0555cff7df9ccfc4a56da12766d1bf89122f --- M pySim/tlv.py 1 file changed, 28 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/tlv.py b/pySim/tlv.py index 1ecc806..c85d92b 100644 --- a/pySim/tlv.py +++ b/pySim/tlv.py @@ -87,7 +87,7 @@ def to_bytes(self) -> bytes: """Convert from internal representation to binary bytes. Store the binary result in the internal state and return it.""" -if not self.decoded: +if self.decoded == None: do = b'' elif self._construct: do = self._construct.build(self.decoded, total_len=None) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5f4c0555cff7df9ccfc4a56da12766d1bf89122f Gerrit-Change-Number: 35243 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in pysim[master]: tlv: Fix encoding of zero-valued TLVs
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35243?usp=email ) Change subject: tlv: Fix encoding of zero-valued TLVs .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5f4c0555cff7df9ccfc4a56da12766d1bf89122f Gerrit-Change-Number: 35243 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 13:19:43 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: euicc: Fix encoding of {enable,disable,delete}_profile
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35244?usp=email ) Change subject: euicc: Fix encoding of {enable,disable,delete}_profile .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35244?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I12e2b16b2c1b4b01dfad0d1fb485399827f25ddc Gerrit-Change-Number: 35244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 13:19:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
Attention is currently required from: pespin. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email ) Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. Patch Set 3: -Code-Review (1 comment) File src/stream_srv.c: https://gerrit.osmocom.org/c/libosmo-netif/+/35240/comment/13923546_f9143c63 PS3, Line 373: return link->sockname; > I think I will undo this change. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 13:19:27 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: do not use the _scc object of the card object to select MF
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35248?usp=email ) Change subject: runtime: do not use the _scc object of the card object to select MF .. runtime: do not use the _scc object of the card object to select MF The constructor of the RuntimeState object selects the MF befor it does some other steps. However it does this through the _scc object of the card object. This method is before we had lchan abstraction, so we should now use the lchan object like in all other places. Related: OS#5418 Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c --- M pySim/runtime.py 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/runtime.py b/pySim/runtime.py index 58df22d..2447222 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -64,7 +64,7 @@ self.mf.add_file(f) # go back to MF before the next steps (addon probing might have changed DF) -self.card._scc.select_file('3F00') +self.lchan[0].select('MF') # add application ADFs + MF-files from profile apps = self._match_applications() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35248?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c Gerrit-Change-Number: 35248 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review-1 by pespin, Verified-1 by Jenkins Builder Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. stream: Use new multiaddr APIs to log whole set of sock addresses Until now, the used (existing) APIs were only retrieving 1 local and 1 remote address, even if the socket actually handled several, as it's possible with SCTP multi-homing setups. Related: SYS#6636 Depends: libosmocore.git Change-Id I48950754ed6f61ee5ffa04a447fab8903f10acc0 Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 --- M TODO-RELEASE M include/osmocom/netif/stream.h M src/stream_cli.c M src/stream_srv.c 4 files changed, 63 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/40/35240/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[S] Change in pysim[master]: runtime: explain why we may access the card object directly
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35249?usp=email ) Change subject: runtime: explain why we may access the card object directly .. runtime: explain why we may access the card object directly When we are in the constructor of RuntimeState, we may/must access the card object directly. Let's explain why, since it may not be immediately obvious. Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f Related: OS#5418 --- M pySim/runtime.py 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/runtime.py b/pySim/runtime.py index 2447222..670babc 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -110,6 +110,12 @@ # probe for those applications for f in sorted(set(apps_profile) - set(apps_taken), key=str): try: +# we can not use the lchan provided methods select, or select_file +# since those method work on an already finished file model. At +# this point we are still in the initialization process, so it is +# no problem when we access the card object directly without caring +# about updating other states. For normal selects at runtime, the +# caller must use the lchan provided methods select or select_file! data, sw = self.card.select_adf_by_aid(f.aid) self.selected_adf = f if sw == "9000": -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35249?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f Gerrit-Change-Number: 35249 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in pysim[master]: runtime: cosmetic: prnounce file reference data
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35250?usp=email ) Change subject: runtime: cosmetic: prnounce file reference data .. runtime: cosmetic: prnounce file reference data One of the most important properties of the RuntimeLchan are the selected_file/adf properties. Let's reformat the code so that those properties are more pronounced. Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1 Related: OS#5418 --- M pySim/runtime.py 1 file changed, 17 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/runtime.py b/pySim/runtime.py index 670babc..028bef1 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -170,11 +170,13 @@ def __init__(self, lchan_nr: int, rs: RuntimeState): self.lchan_nr = lchan_nr self.rs = rs +self.scc = self.rs.card._scc.fork_lchan(lchan_nr) + +# File reference data self.selected_file = self.rs.mf self.selected_adf = None self.selected_file_fcp = None self.selected_file_fcp_hex = None -self.scc = self.rs.card._scc.fork_lchan(lchan_nr) def add_lchan(self, lchan_nr: int) -> 'RuntimeLchan': """Add a new logical channel from the current logical channel. Just affects -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1 Gerrit-Change-Number: 35250 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34932?usp=email ) Change subject: runtime: refactor file selection methods select and select_file .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2 Gerrit-Change-Number: 34932 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:19:04 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: explain how file probing works
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35251?usp=email ) Change subject: runtime: explain how file probing works .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35251?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669 Gerrit-Change-Number: 35251 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:17:55 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: cosmetic: prnounce file reference data
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35250?usp=email ) Change subject: runtime: cosmetic: prnounce file reference data .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1 Gerrit-Change-Number: 35250 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:17:38 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: explain why we may access the card object directly
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35249?usp=email ) Change subject: runtime: explain why we may access the card object directly .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35249?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f Gerrit-Change-Number: 35249 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:16:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: do not use the _scc object of the card object to select MF
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35248?usp=email ) Change subject: runtime: do not use the _scc object of the card object to select MF .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35248?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c Gerrit-Change-Number: 35248 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:16:45 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
Attention is currently required from: dexter, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email ) Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically .. Patch Set 12: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba Gerrit-Change-Number: 34404 Gerrit-PatchSet: 12 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 13:16:11 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: client: move some items to internal header
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header .. Patch Set 2: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/2bdd9ba9_66be4cba PS2, Line 12: mgcp libosmo-mgcp-client -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 07 Dec 2023 13:14:47 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 07 Dec 2023 13:13:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-netif[master]: stream: Add missing osmo_stream_srv_link_get_fd() API
Attention is currently required from: fixeria, laforge, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email ) Change subject: stream: Add missing osmo_stream_srv_link_get_fd() API .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35241?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I1bd3f790d93af74c150938a59108b882ad2820f3 Gerrit-Change-Number: 35241 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 07 Dec 2023 13:12:25 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
Attention is currently required from: laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 07 Dec 2023 12:50:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: client: move some items to internal header
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 07 Dec 2023 12:47:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-mgw[master]: mgcp_client_test: fix function name
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email ) Change subject: mgcp_client_test: fix function name .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I213f9b2713ff80a16603b8342c204cb546cc782d Gerrit-Change-Number: 35245 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 07 Dec 2023 12:42:02 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: runtime: explain why we may access the card object directly
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35249?usp=email ) Change subject: runtime: explain why we may access the card object directly .. runtime: explain why we may access the card object directly When we are in the constructor of RuntimeState, we may/must access the card object directly. Let's explain why, since it may not be immediately obvious. Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f Related: OS#5418 --- M pySim/runtime.py 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/35249/1 diff --git a/pySim/runtime.py b/pySim/runtime.py index 2447222..670babc 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -110,6 +110,12 @@ # probe for those applications for f in sorted(set(apps_profile) - set(apps_taken), key=str): try: +# we can not use the lchan provided methods select, or select_file +# since those method work on an already finished file model. At +# this point we are still in the initialization process, so it is +# no problem when we access the card object directly without caring +# about updating other states. For normal selects at runtime, the +# caller must use the lchan provided methods select or select_file! data, sw = self.card.select_adf_by_aid(f.aid) self.selected_adf = f if sw == "9000": -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35249?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f Gerrit-Change-Number: 35249 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
[S] Change in pysim[master]: runtime: do not use the _scc object of the card object to select MF
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35248?usp=email ) Change subject: runtime: do not use the _scc object of the card object to select MF .. runtime: do not use the _scc object of the card object to select MF The constructor of the RuntimeState object selects the MF befor it does some other steps. However it does this through the _scc object of the card object. This method is before we had lchan abstraction, so we should now use the lchan object like in all other places. Related: OS#5418 Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c --- M pySim/runtime.py 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/35248/1 diff --git a/pySim/runtime.py b/pySim/runtime.py index 58df22d..2447222 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -64,7 +64,7 @@ self.mf.add_file(f) # go back to MF before the next steps (addon probing might have changed DF) -self.card._scc.select_file('3F00') +self.lchan[0].select('MF') # add application ADFs + MF-files from profile apps = self._match_applications() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35248?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c Gerrit-Change-Number: 35248 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
[S] Change in pysim[master]: runtime: cosmetic: prnounce file reference data
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35250?usp=email ) Change subject: runtime: cosmetic: prnounce file reference data .. runtime: cosmetic: prnounce file reference data One of the most important properties of the RuntimeLchan are the selected_file/adf properties. Let's reformat the code so that those properties are more pronounced. Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1 Related: OS#5418 --- M pySim/runtime.py 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/35250/1 diff --git a/pySim/runtime.py b/pySim/runtime.py index 670babc..028bef1 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -170,11 +170,13 @@ def __init__(self, lchan_nr: int, rs: RuntimeState): self.lchan_nr = lchan_nr self.rs = rs +self.scc = self.rs.card._scc.fork_lchan(lchan_nr) + +# File reference data self.selected_file = self.rs.mf self.selected_adf = None self.selected_file_fcp = None self.selected_file_fcp_hex = None -self.scc = self.rs.card._scc.fork_lchan(lchan_nr) def add_lchan(self, lchan_nr: int) -> 'RuntimeLchan': """Add a new logical channel from the current logical channel. Just affects -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1 Gerrit-Change-Number: 35250 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
[S] Change in pysim[master]: runtime: explain how file probing works
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35251?usp=email ) Change subject: runtime: explain how file probing works .. runtime: explain how file probing works We use a trick to probe a file (that does not exist in the local file model yet). Let's explain further how that works, in particular why we do not have to upate any state if probing fails. Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669 Related: OS#5418 --- M pySim/runtime.py 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/35251/1 diff --git a/pySim/runtime.py b/pySim/runtime.py index 028bef1..1155433 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -256,6 +256,12 @@ "Cannot select unknown file by name %s, only hexadecimal 4 digit FID is allowed" % fid) try: +# We access the card through the select_file method of the scc object. +# If we succeed, we know that the file exists on the card and we may +# proceed with creating a new CardEF object in the local file model at +# run time. In case the file does not exist on the card, we just abort. +# The state on the card (selected file/application) wont't be changed, +# so we do not have to update any state in that case. (data, sw) = self.scc.select_file(fid) except SwMatchError as swm: k = self.interpret_sw(swm.sw_actual) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35251?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669 Gerrit-Change-Number: 35251 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file
Attention is currently required from: dexter, fixeria, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: runtime: refactor file selection methods select and select_file .. runtime: refactor file selection methods select and select_file The implementation of the methods select and select_file of class RuntimeLchan is a bit complex. We access the card directly in several places which makes it difficult to track the state changes. We should clean this up so that we call self.rs.card.select_adf_by_aid/ self.scc.select_file from a single place only. This means that the method select uses the method select_file. This results in a much cleaner implementation. We also should take care that the important states that we track (selected_file, selected_adf, etc.) are updated by a single private method. Since the update always must happen after a select _select_post is a good place to do this. Related: OS#5418 Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2 --- M pySim/runtime.py 1 file changed, 73 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/34932/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2 Gerrit-Change-Number: 34932 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Attention: dexter Gerrit-MessageType: newpatchset
[M] Change in osmo-mgw[master]: mgcp-client: Transmit remote IP addr in CRCX if known and port=0
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35152?usp=email ) Change subject: mgcp-client: Transmit remote IP addr in CRCX if known and port=0 .. mgcp-client: Transmit remote IP addr in CRCX if known and port=0 A client may know the IP address during CRCX but not yet the port, or it may simply want to hint an initial IP address so that the MGW can better guess when allocating a local IP address. Related: SYS#6657 Change-Id: I30165dbac5e484011d0acf46af36f105954a501d --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 2 files changed, 56 insertions(+), 31 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ceb9592..8693b1b 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -1302,9 +1302,6 @@ local_ip_family = osmo_ip_str_type(local_ip); if (local_ip_family == AF_UNSPEC) return -EINVAL; - audio_ip_family = osmo_ip_str_type(mgcp_msg->audio_ip); - if (audio_ip_family == AF_UNSPEC) - return -EINVAL; /* Add owner/creator (SDP) */ MSGB_PRINTF_OR_RET("o=- %x 23 IN IP%c %s\r\n", mgcp_msg->call_id, @@ -1314,33 +1311,39 @@ /* Add session name (none) */ MSGB_PRINTF_OR_RET("s=-\r\n"); - /* Add RTP address and port */ - if (mgcp_msg->audio_port == 0) { - LOGPMGW(mgcp, LOGL_ERROR, - "Invalid port number, can not generate MGCP message\n"); - msgb_free(msg); - return -EINVAL; + /* Add RTP address */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_IP) { + audio_ip_family = osmo_ip_str_type(mgcp_msg->audio_ip); + if (audio_ip_family == AF_UNSPEC) + return -EINVAL; + if (strlen(mgcp_msg->audio_ip) <= 0) { + LOGPMGW(mgcp, LOGL_ERROR, + "Empty ip address, can not generate MGCP message\n"); + return -EINVAL; + } + MSGB_PRINTF_OR_RET("c=IN IP%c %s\r\n", + audio_ip_family == AF_INET6 ? '6' : '4', + mgcp_msg->audio_ip); } - if (strlen(mgcp_msg->audio_ip) <= 0) { - LOGPMGW(mgcp, LOGL_ERROR, - "Empty ip address, can not generate MGCP message\n"); - msgb_free(msg); - return -EINVAL; - } - MSGB_PRINTF_OR_RET("c=IN IP%c %s\r\n", - audio_ip_family == AF_INET6 ? '6' : '4', - mgcp_msg->audio_ip); /* Add time description, active time (SDP) */ MSGB_PRINTF_OR_RET("t=0 0\r\n"); - MSGB_PRINTF_OR_RET("m=audio %u RTP/AVP", mgcp_msg->audio_port); - for (i = 0; i < mgcp_msg->codecs_len; i++) { - pt = map_codec_to_pt(mgcp_msg->ptmap, mgcp_msg->ptmap_len, mgcp_msg->codecs[i]); - MSGB_PRINTF_OR_RET(" %u", pt); + /* Add RTP address port and codecs */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) { + if (mgcp_msg->audio_port == 0) { + LOGPMGW(mgcp, LOGL_ERROR, + "Invalid port number, can not generate MGCP message\n"); + return -EINVAL; + } + MSGB_PRINTF_OR_RET("m=audio %u RTP/AVP", mgcp_msg->audio_port); + for (i = 0; i < mgcp_msg->codecs_len; i++) { + pt = map_codec_to_pt(mgcp_msg->ptmap, mgcp_msg->ptmap_len, mgcp_msg->codecs[i]); + MSGB_PRINTF_OR_RET(" %u", pt); + } + MSGB_PRINTF_OR_RET("\r\n"); } - MSGB_PRINTF_OR_RET("\r\n"); /* Add optional codec parameters (fmtp) */ if (mgcp_msg->param_present) { @@ -1470,10 +1473,10 @@ MSGB_PRINTF_OR_RET("I: %s\r\n", mgcp_msg->conn_id); } - /* Using SDP makes sense when a valid IP/Port combination is specified, + /* Using SDP makes sense when a valid IP or Port is specified, * if we do not know this information yet, we fall back to LCO */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_IP - && mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) + || mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) use_sdp = true; /* Add local connection options (LCO) */ diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 432ad84..218527c 100644 ---
[M] Change in osmo-mgw[master]: mgcp-client: Transmit remote IP addr in CRCX if known and port=0
Attention is currently required from: dexter, fixeria, laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35152?usp=email ) Change subject: mgcp-client: Transmit remote IP addr in CRCX if known and port=0 .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35152?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I30165dbac5e484011d0acf46af36f105954a501d Gerrit-Change-Number: 35152 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 11:14:12 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_multiaddr_get_name_buf()
Attention is currently required from: laforge, neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email ) Change subject: socket: Introduce API osmo_sock_multiaddr_get_name_buf() .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48950754ed6f61ee5ffa04a447fab8903f10acc0 Gerrit-Change-Number: 35180 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 09:49:26 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: mgcp-client: Transmit remote IP addr in CRCX if known and port=0
Attention is currently required from: dexter, fixeria, laforge, neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35152?usp=email ) Change subject: mgcp-client: Transmit remote IP addr in CRCX if known and port=0 .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35152?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I30165dbac5e484011d0acf46af36f105954a501d Gerrit-Change-Number: 35152 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Attention: dexter Gerrit-Comment-Date: Thu, 07 Dec 2023 09:45:44 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-pcu[master]: gprs_rlcmac_sched: rewrite logic around idle block skip
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35151?usp=email ) Change subject: gprs_rlcmac_sched: rewrite logic around idle block skip .. Abandoned after a discussion we noticed that this patch goes in the wrong direction. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35151?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iadb62748b18605bf158169b317f880352bc0a5a6 Gerrit-Change-Number: 35151 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: jolly Gerrit-MessageType: abandon
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
Attention is currently required from: laforge, neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 07 Dec 2023 08:37:29 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment