Build failure of network:osmocom:nightly/osmo-cbc in Raspbian_11/armv7l

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-cbc/Raspbian_11/armv7l

Package network:osmocom:nightly/osmo-cbc failed to build in Raspbian_11/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-cbc

Last lines of build log:
[  440s] [494/503] installing glib-networking-2.66.0-2
[  440s] Processing triggers for libglib2.0-0:armhf (2.66.8-1) ...
[  440s] [495/503] installing libsoup2.4-1-2.72.0-2
[  440s] [496/503] installing libsoup-gnome2.4-1-2.72.0-2
[  441s] [497/503] installing librest-0.7-0-0.8.1-1.1
[  441s] [498/503] installing libgtk-3-0-3.24.24-4+deb11u2
[  442s] [499/503] installing libgtkspell3-3-0-3.0.10-1
[  443s] [500/503] installing libgdl-3-5-3.34.0-1
[  443s] [501/503] installing libgtkmm-3.0-1v5-3.24.2-2
[  444s] [502/503] installing inkscape-1.0.2-4
[  457s] [503/503] installing osmo-gsm-manuals-dev-1.3.0.202207220052
[  457s] configuring all installed packages...
[  457s] Processing triggers for hicolor-icon-theme (0.17-2) ...
[  457s] Processing triggers for dictionaries-common (1.28.4) ...
[  458s] Processing triggers for libc-bin (2.31-13+rpi1+deb11u3) ...
[  458s] Processing triggers for man-db (2.9.4-2) ...
[  458s] Not building database; man-db/auto-update is not 'true'.
[  458s] Processing triggers for tex-common (6.16) ...
[  459s] Running mktexlsr. This may take some time... done.
[  461s] Running updmap-sys. This may take some time... done.
[  461s] Running mktexlsr /var/lib/texmf ... done.
[  462s] Building format(s) --all.


Job seems to be stuck here, killed. (after 28800 seconds of inactivity)
[29270s]This may take some time... qemu-system-aarch64: terminating on 
signal 15 from pid 26754 ()
[29271s] ### VM INTERACTION END ###
[29271s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[29271s] or the build host has a kernel or hardware problem...

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Build failed in Jenkins: master-osmo-opencm3-projects » a1=default,a2=default,a3=default,a4=default,osmocom-master-debian9 #74

2022-07-22 Thread jenkins
See 


Changes:


--
Started by upstream project "master-osmo-opencm3-projects" build number 74
originally caused by:
 Started by timer
Running as SYSTEM
Building remotely on build2-deb9build-ansible (ttcn3 osmocom-gerrit-debian9 
osmocom-master-debian9 repo-install-test coverity) in workspace 

The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir 
 > 
 >  # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.osmocom.org/osmo-opencm3-projects # 
 > timeout=10
Fetching upstream changes from git://git.osmocom.org/osmo-opencm3-projects
 > git --version # timeout=10
 > git --version # 'git version 2.11.0'
 > git fetch --tags --progress -- git://git.osmocom.org/osmo-opencm3-projects 
 > +refs/heads/*:refs/remotes/origin/* # timeout=10
Checking out Revision cbff8e75d06b5e8ea9a196fa4fa706ba9f9ed124 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f cbff8e75d06b5e8ea9a196fa4fa706ba9f9ed124 # timeout=10
Commit message: "Make code compatible with picolibc >= 1.7.3"
 > git rev-list --no-walk cbff8e75d06b5e8ea9a196fa4fa706ba9f9ed124 # timeout=10
 > git remote # timeout=10
 > git submodule init # timeout=10
 > git submodule sync # timeout=10
 > git config --get remote.origin.url # timeout=10
 > git submodule init # timeout=10
 > git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10
 > git config --get submodule.libopencm3.url # timeout=10
 > git config -f .gitmodules --get submodule.libopencm3.path # timeout=10
 > git config --get submodule.librfn.url # timeout=10
 > git config -f .gitmodules --get submodule.librfn.path # timeout=10
 > git submodule update --init --recursive libopencm3 # timeout=10
 > git submodule update --init --recursive librfn # timeout=10
[osmocom-master-debian9] $ /bin/sh -xe /tmp/jenkins5438884891823311598.sh
+ ARTIFACT_STORE=/home/osmocom-build/jenkins_build_artifact_store
+ mkdir -p /home/osmocom-build/jenkins_build_artifact_store
+ docker run --rm=true --cap-add SYS_PTRACE -e ARTIFACT_STORE=/artifact_store 
-e ASCIIDOC_WARNINGS_CHECK=1 -e HOME=/build -e 
JOB_NAME=master-osmo-opencm3-projects/a1=default,a2=default,a3=default,a4=default,label=osmocom-master-debian9
 -e MAKE=make -e OSMOPY_DEBUG_TCP_SOCKETS=1 -e 
OSMO_GSM_MANUALS_DIR=/opt/osmo-gsm-manuals -e PARALLEL_MAKE=-j 8 -e PUBLISH=1 
-e WITH_MANUALS=1 -w /build -i -u build -v 
:/build
 -v /home/osmocom-build/jenkins_build_artifact_store:/artifact_store -v 
/home/osmocom-build/.ssh:/home/build/.ssh:ro 
osmocom-build/debian-bullseye-jenkins /build/contrib/jenkins.sh --publish
=== relay-driver START  ==
  CLEAN
  CC  console.c
  CC  console_stm32.c
In file included from ../../libopencm3//include/libopencm3/cm3/nvic.h:147,
 from ../../librfn/librfn/libopencm3/console_stm32.c:24:
../../libopencm3//include/libopencm3/dispatch/nvic.h:8:11: fatal error: 
libopencm3/stm32/f1/nvic.h: No such file or directory
 # include 
   ^~~~
compilation terminated.
make: *** [../../mk/libopencm3.mk:228: console_stm32.o] Error 1
Build step 'Execute shell' marked build as failure


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..

ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

Requires: osmo-cbc.git Change-Id I477568f9b8450ba14c914614fd2391d5486e
Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
---
M ttcn3-cbc-test/osmo-cbc.cfg
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved

Objections:
  fixeria: I would prefer this is not merged as is



diff --git a/ttcn3-cbc-test/osmo-cbc.cfg b/ttcn3-cbc-test/osmo-cbc.cfg
index 4332812..0e131c0 100644
--- a/ttcn3-cbc-test/osmo-cbc.cfg
+++ b/ttcn3-cbc-test/osmo-cbc.cfg
@@ -31,11 +31,9 @@
  sbcap
   local-ip 172.18.27.20
   local-port 29168
- peer ttcn3-bsc
-  protocol cbsp
+ peer cbsp ttcn3-bsc
   remote-port 
   remote-ip 172.18.27.100
- peer ttcn3-mme
-  protocol sbcap
+ peer sbcap ttcn3-mme
   remote-port 9998
   remote-ip 172.18.27.100

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
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


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread pespin
Attention is currently required from: laforge, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
Merging in order to avoid ttcn3-bc-master test case failures.
This not really breaking anything, it was already broken, so at least fixes 
master.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 17:46:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: sbcap: Fix encoding of Warning-Type

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28740 )


Change subject: sbcap: Fix encoding of Warning-Type
..

sbcap: Fix encoding of Warning-Type

Change-Id: I9f6a0779c20ba86962aaaebc9b40ad162d2f2f3e
---
M src/sbcap_msg.c
M tests/sbcap/sbcap_test.c
M tests/sbcap/sbcap_test.ok
3 files changed, 8 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/40/28740/1

diff --git a/src/sbcap_msg.c b/src/sbcap_msg.c
index d38f861..7dc3410 100644
--- a/src/sbcap_msg.c
+++ b/src/sbcap_msg.c
@@ -84,7 +84,6 @@
const struct smscb_message *smscb = >msg;
SBcAP_SBC_AP_PDU_t *pdu;
SBcAP_Write_Replace_Warning_Request_IEs_t *ie;
-   uint16_t ie_warning_type;
unsigned int i;
uint8_t *ptr;
 #if 0
@@ -150,17 +149,15 @@

if (smscb->is_etws) {
/* Warning Type, 3GPP TS 36.413 sec 9.2.1.50: */
-   ie_warning_type = smscb->etws.warning_type;
-   if (smscb->etws.user_alert)
-   ie_warning_type |= 0x0100;
-   if (smscb->etws.popup_on_display)
-   ie_warning_type |= 0x0080;
/* static const long asn_VAL_8_SBcAP_id_Warning_Type = 18; */
ie = sbcap_alloc_Write_Replace_Warning_Request_IE(18, 
SBcAP_Criticality_ignore,

SBcAP_Write_Replace_Warning_Request_IEs__value_PR_Warning_Type);
-   ie->value.choice.Warning_Type.buf = 
MALLOC(sizeof(ie_warning_type));
-   ie->value.choice.Warning_Type.size = sizeof(ie_warning_type);
-   memcpy(ie->value.choice.Warning_Type.buf, _warning_type, 
sizeof(ie_warning_type));
+   ie->value.choice.Warning_Type.buf = MALLOC(2);
+   ie->value.choice.Warning_Type.size = 2;
+   ie->value.choice.Warning_Type.buf[0] = 
((smscb->etws.warning_type & 0x7f) << 1);
+   if (smscb->etws.user_alert)
+   ie->value.choice.Warning_Type.buf[0] |= 0x01;
+   ie->value.choice.Warning_Type.buf[1] = 
(smscb->etws.popup_on_display) ? 0x80 : 0x0;
ASN_SEQUENCE_ADD(as_pdu, ie);

/* Warning Security Information, 3GPP TS 36.413 sec 9.2.1.51: */
diff --git a/tests/sbcap/sbcap_test.c b/tests/sbcap/sbcap_test.c
index 747d0b2..9c8a60f 100644
--- a/tests/sbcap/sbcap_test.c
+++ b/tests/sbcap/sbcap_test.c
@@ -14,7 +14,7 @@
struct msgb *msg;
SBcAP_SBC_AP_PDU_t *pdu;
SBcAP_Write_Replace_Warning_Request_IEs_t *ie;
-   uint16_t ie_warning_type = 0x01;
+   uint8_t ie_warning_type[2] = {(0x01 << 1) | 0x01, 0x80};
uint8_t ie_dcs = 2;
uint8_t ie_warning_sec_info[50] = {0x30, 0x40, 0x12, 0x23, 0x45};
uint8_t ie_warning_msg_content[SBCAP_WARN_MSG_CONTENTS_IE_MAX_LEN] = 
{0x30, 0x40, 0x12, 0x23, 0x45};
@@ -68,8 +68,6 @@
SBcAP_Write_Replace_Warning_Request_IEs__value_PR_Warning_Type);
ie->value.choice.Warning_Type.buf = MALLOC(sizeof(ie_warning_type));
ie->value.choice.Warning_Type.size = sizeof(ie_warning_type);
-   ie_warning_type |= 0x0100;
-   ie_warning_type |= 0x0080;
memcpy(ie->value.choice.Warning_Type.buf, _warning_type, 
sizeof(ie_warning_type));
ASN_SEQUENCE_ADD(as_pdu, ie);

diff --git a/tests/sbcap/sbcap_test.ok b/tests/sbcap/sbcap_test.ok
index b67583a..e679721 100644
--- a/tests/sbcap/sbcap_test.ok
+++ b/tests/sbcap/sbcap_test.ok
@@ -1,5 +1,5 @@
  test_asn1c_enc 
-Encoded message: 00 00 00 76 00 00 08 00 05 00 02 ab 01 00 0b 00 02 ab cd 00 
0a 00 02 00 1e 00 07 00 02 00 59 00 12 40 02 81 01 00 11 40 32 30 40 12 23 45 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 40 01 02 00 10 
40 16 00 13 30 40 12 23 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+Encoded message: 00 00 00 76 00 00 08 00 05 00 02 ab 01 00 0b 00 02 ab cd 00 
0a 00 02 00 1e 00 07 00 02 00 59 00 12 40 02 03 80 00 11 40 32 30 40 12 23 45 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 40 01 02 00 10 
40 16 00 13 30 40 12 23 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  test_asn1c_dec 
 Decoding message: 20 00 00 14 00 00 03 00 05 00 02 00 2b 00 0b 00 02 41 70 00 
01 00 01 00
 Decoded message successfully

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28740
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I9f6a0779c20ba86962aaaebc9b40ad162d2f2f3e
Gerrit-Change-Number: 28740
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in libosmocore[master]: gsm_23_041.h: Document CBS ETWS Warning Type values

2022-07-22 Thread pespin
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/28739

to look at the new patch set (#3).

Change subject: gsm_23_041.h: Document CBS ETWS Warning Type values
..

gsm_23_041.h: Document CBS ETWS Warning Type values

Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
---
M include/osmocom/gsm/protocol/gsm_23_041.h
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/28739/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28739
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
Gerrit-Change-Number: 28739
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gsm_23_041.h: Document CBS ETWS Warning Type values

2022-07-22 Thread pespin
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/28739

to look at the new patch set (#2).

Change subject: gsm_23_041.h: Document CBS ETWS Warning Type values
..

gsm_23_041.h: Document CBS ETWS Warning Type values

Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
---
M include/osmocom/gsm/protocol/gsm_23_041.h
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/28739/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28739
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
Gerrit-Change-Number: 28739
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gsm_23_041.h: Document CBS ETWS Warning Type values

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/28739 )


Change subject: gsm_23_041.h: Document CBS ETWS Warning Type values
..

gsm_23_041.h: Document CBS ETWS Warning Type values

Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
---
M include/osmocom/gsm/protocol/gsm_23_041.h
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/28739/1

diff --git a/include/osmocom/gsm/protocol/gsm_23_041.h 
b/include/osmocom/gsm/protocol/gsm_23_041.h
index e726cff..b13f393 100644
--- a/include/osmocom/gsm/protocol/gsm_23_041.h
+++ b/include/osmocom/gsm/protocol/gsm_23_041.h
@@ -2,6 +2,16 @@

 #include 
 
+/* Section 9.3.24: Warning-Type */
+enum {
+   CBS_ETWS_WARN_TYPE_EARTHQUAKE = 0,
+   CBS_ETWS_WARN_TYPE_TSUNAMI = 1,
+   CBS_ETWS_WARN_TYPE_EARTHQUAKE_AND_TSUNAMI = 2,
+   CBS_ETWS_WARN_TYPE_TEST = 3,
+   CBS_ETWS_WARN_TYPE_OTHER = 4,
+   /* 101-111 Reserved for future use */
+};
+
 /* Section 9.4.1.2: GSM Message Format */
 struct gsm23041_msg_param_gsm {
uint16_t serial_nr;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28739
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a5bb9b2c77b8e4a984631d199fc073183691c31
Gerrit-Change-Number: 28739
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-msc[master]: Change CC_CAUSE returned on unanswered MT Call

2022-07-22 Thread neels
Attention is currently required from: laforge, pespin, fixeria, keith, dexter.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/28509 )

Change subject: Change CC_CAUSE returned on unanswered MT Call
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
regarding proper CC timeout: the old cc implementation apparently only has one 
overall guard timer, see gsm48_cc_guard_timeout(). Instead of in call_leg.c 
which is all about RTP, we could set that trans.cc.release_cause value in that 
gsm48_cc_guard_timeout() function depending on the trans->cc.state?



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28509
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I4a9cfc388ec9ecb743d154a114a6db638eac4701
Gerrit-Change-Number: 28509
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Fri, 22 Jul 2022 17:07:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-msc[master]: Change CC_CAUSE returned on unanswered MT Call

2022-07-22 Thread neels
Attention is currently required from: laforge, pespin, fixeria, keith, dexter.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/28509 )

Change subject: Change CC_CAUSE returned on unanswered MT Call
..


Patch Set 1: Code-Review+1

(1 comment)

File src/libmsc/gsm_04_08_cc.c:

https://gerrit.osmocom.org/c/osmo-msc/+/28509/comment/4cd300a7_318ddd36
PS1, Line 281:   (trans->cc.state == 
GSM_CSTATE_CALL_RECEIVED) ?
> In adding this check, I should point out that I do not know what other CC 
> state is possible when we  […]
related: the cc state transitioning was written a very long time ago, before we 
had osmo_fsm. Specially for inter-MSC HO i implemented a new "proper" FSM for 
CC via MNCC in 2018, in mncc_fsm.[hc], because it was not possible to use the 
older cc implementation for what inter-msc requires. It is well possible and 
loosely intended to replace the old cc implementation with this new mncc_fsm (i 
wrote that intention into the comment on top of mncc_call.c). IMO it would 
clarify things and have "proper" state transition checking and so forth. Given 
the relatively low attention to osmo-msc in the past years the cc refactoring 
hasn't happened, and other things are more pressing, it doesn't seem to be 
happening any time soon. So until then we're left with figuring out the old cc 
implementation that osmo-msc still uses in the usual voice call scenarios. So:

It seems to me that you have already figured out at least one case where 
sending USER_NOTRESPOND makes more sense, and i trust you with that judgement.

I think this patch is fine, but if you would want to limit this cause to mgw X2 
expiry:
in call_leg.c, in call_leg_fsm_timer_cb(), you could detect the T that expired:

  if (fi->T == -2) ...

the usual pattern we use is to store state about whether a cause value has 
already been determined, for example add trans.cc.release_cause, and here use 
that if it is nonzero:

  trans->cc.release_cause ? : GSM48_CAUSE_RESOURCE_UNAVAIL

It seems that X2 is also used for a timeout during call release (though 
actually that seems like dead code), so probably

  if (fi->T == -2 && fi->state == CALL_LEG_ST_ESTABLISHING)
trans->cc.release_cause = GSM48_CC_CAUSE_USER_NOTRESPOND;

The missing link is that call_leg doesn't know its cc trans yet, so in call_leg 
we would need to add a backpointer to the trans, like rtp_stream already has: 
for_trans.

All of this just if you think it is worthwhile...



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28509
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I4a9cfc388ec9ecb743d154a114a6db638eac4701
Gerrit-Change-Number: 28509
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Fri, 22 Jul 2022 17:03:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: keith 
Gerrit-MessageType: comment


Change in osmo-cbc[master]: cbc-apitool: print usage instead of crashing if no subcmd passed

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28738 )


Change subject: cbc-apitool: print usage instead of crashing if no subcmd passed
..

cbc-apitool: print usage instead of crashing if no subcmd passed

The "required" param was added in python 3.7.

Change-Id: Ia8d13beeb8da64644d1aaf36deeddda4de889a6c
---
M contrib/cbc-apitool.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/38/28738/1

diff --git a/contrib/cbc-apitool.py b/contrib/cbc-apitool.py
index 20d9819..299846a 100755
--- a/contrib/cbc-apitool.py
+++ b/contrib/cbc-apitool.py
@@ -117,7 +117,7 @@
 parser.add_argument("-p", "--port", help="TCP port to connect to", 
type=int, default=12345)
 parser.add_argument("-v", "--verbose", help="increase output verbosity", 
action='count', default=0)
 
-subparsers = parser.add_subparsers()
+subparsers = parser.add_subparsers(required=True)

 parser_c_cbs = subparsers.add_parser('create-cbs', help='Create a new CBS 
message')
 parser_c_cbs.add_argument("--msg-id", type=int, help='Message Identifier', 
required=True)

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28738
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d13beeb8da64644d1aaf36deeddda4de889a6c
Gerrit-Change-Number: 28738
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-cbc[master]: Support CBSP/TCP and SBc-AP/SCTP client mode

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28732 )

Change subject: Support CBSP/TCP and SBc-AP/SCTP client mode
..


Patch Set 2:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28732
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I3ec54b615b41b56f7a9c64298e3fcaac37f4b60e
Gerrit-Change-Number: 28732
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 22 Jul 2022 16:13:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-cbc[master]: Support CBSP/TCP and SBc-AP/SCTP client mode

2022-07-22 Thread pespin
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-cbc/+/28732

to look at the new patch set (#3).

Change subject: Support CBSP/TCP and SBc-AP/SCTP client mode
..

Support CBSP/TCP and SBc-AP/SCTP client mode

This patch adds support to set up a CBSP link so that osmo-cbc connects
as a TCP client to the BSC, which runs as a TCP server.
Similary, support to set up a SBc-AP link so that osmo-cbc connects
as a SCTP client to the MME, which runs as SCTP server.

A new "mode (client|server|disabled)" VTY command is added to use one
mother or the other, and also to disable the link and hence the peer
until it is set again. This is useful if the peer is under manintenance
for instance.

client sockets are created automatically when the "peer" vty node is
exited if the link is not yet created, hence creating it at startup or
if moved back from "disabled" mode. If client socket dies, it will
keep attempting reconnect every 5 seconds.

Related: OS#4945
Change-Id: I3ec54b615b41b56f7a9c64298e3fcaac37f4b60e
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M include/osmocom/cbc/cbc_peer.h
M include/osmocom/cbc/cbsp_link.h
M include/osmocom/cbc/sbcap_link.h
M src/cbc_main.c
M src/cbc_peer.c
M src/cbc_vty.c
M src/cbsp_link.c
M src/sbcap_link.c
9 files changed, 476 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/32/28732/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28732
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I3ec54b615b41b56f7a9c64298e3fcaac37f4b60e
Gerrit-Change-Number: 28732
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-upf[master]: add contrib/set_cap_net_admin.sh

2022-07-22 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/28311 )

Change subject: add contrib/set_cap_net_admin.sh
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
> two reasons: […]
Doesn't look valid points to me.
- doc/reminder: that's what UserManual is for.
- having to set up cap_net_admin all the time: You also need to run it every 
time and you don't add a script run_upf.sh for that. This should be set in your 
own env (osmo-dev?) IMHO, not here, specially since it's basically a oneliner.

I really don't see the point in having this in, let's see what other think.



--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28311
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: If31c304e2602d3c37d5d8a5a2705417b2fc4686c
Gerrit-Change-Number: 28311
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Fri, 22 Jul 2022 16:10:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ci[master]: scripts/common-obs: use git commit --no-verify

2022-07-22 Thread neels
Attention is currently required from: osmith.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/28638 )

Change subject: scripts/common-obs: use git commit --no-verify
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
i'd like to better understand... --no-verify skips the linter? why do these 
commits see linter problems at all, and then why does it make sense to skip it?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/28638
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Icdb50cdd1217d848e1e640fbffd7a88b9c8bc8c6
Gerrit-Change-Number: 28638
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Fri, 22 Jul 2022 16:08:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-upf[master]: add contrib/set_cap_net_admin.sh

2022-07-22 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/28311 )

Change subject: add contrib/set_cap_net_admin.sh
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
> As mentioned I'm not sure this is needed here.
two reasons:

it's a doc/reminder of how setting cap_net_admin works.

when developing, after rebuilding osmo-upf i have to set cap_net_admin all the 
time, it's a convenient script for the dev cycle.

debian packaging: good point, not sure how that is done, would be great if i 
could delegate that part, i see it as a separate patch; this script is not at 
all intended to replace whatever the packaging should do.



--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28311
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: If31c304e2602d3c37d5d8a5a2705417b2fc4686c
Gerrit-Change-Number: 28311
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 16:03:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-cbc[master]: cbc-apitool: Fix port stored in var as a string

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28737 )


Change subject: cbc-apitool: Fix port stored in var as a string
..

cbc-apitool: Fix port stored in var as a string

Passing "-p 12345" on the cmd line, fixes:
"""
  File "/osmo-cbc/contrib/./cbc-apitool.py", line 20, in build_url
return "http://%s:%u%s%s; % (server_host, server_port, BASE_PATH, suffix)
TypeError: %u format: a real number is required, not str
"""

Change-Id: Ief688bb8c2a6cfa410608a6896ce3cb5df4eb48e
---
M contrib/cbc-apitool.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/37/28737/1

diff --git a/contrib/cbc-apitool.py b/contrib/cbc-apitool.py
index 0c5028a..20d9819 100755
--- a/contrib/cbc-apitool.py
+++ b/contrib/cbc-apitool.py
@@ -114,7 +114,7 @@

 parser = argparse.ArgumentParser()
 parser.add_argument("-H", "--host", help="Host to connect to", 
default="localhost")
-parser.add_argument("-p", "--port", help="TCP port to connect to", 
default=12345)
+parser.add_argument("-p", "--port", help="TCP port to connect to", 
type=int, default=12345)
 parser.add_argument("-v", "--verbose", help="increase output verbosity", 
action='count', default=0)

 subparsers = parser.add_subparsers()

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28737
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ief688bb8c2a6cfa410608a6896ce3cb5df4eb48e
Gerrit-Change-Number: 28737
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-cbc[master]: Split cbsp/sbcap server socket creation from struct allocation

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28736 )


Change subject: Split cbsp/sbcap server socket creation from struct allocation
..

Split cbsp/sbcap server socket creation from struct allocation

This will be needed when we add client support, since clients will
require the mgr structs to be available during VTY parsing.

Change-Id: I14e49d8d2e603925d7f06a7edb710c0eceb02ea3
---
M include/osmocom/cbc/cbsp_link.h
M include/osmocom/cbc/sbcap_link.h
M src/cbc_data.c
M src/cbsp_link.c
M src/sbcap_link.c
5 files changed, 82 insertions(+), 50 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/36/28736/1

diff --git a/include/osmocom/cbc/cbsp_link.h b/include/osmocom/cbc/cbsp_link.h
index 7fcacdf..9f964e8 100644
--- a/include/osmocom/cbc/cbsp_link.h
+++ b/include/osmocom/cbc/cbsp_link.h
@@ -24,7 +24,8 @@
int (*rx_cb)(struct cbc_cbsp_link *link, struct osmo_cbsp_decoded *dec);
 };

-struct cbc_cbsp_mgr *cbc_cbsp_mgr_create(void *ctx);
+struct cbc_cbsp_mgr *cbc_cbsp_mgr_alloc(void *ctx);
+int cbc_cbsp_mgr_open_srv(struct cbc_cbsp_mgr *mgr);

 /* a CBSP link with a single (remote) peer connected to us */
 struct cbc_cbsp_link {
diff --git a/include/osmocom/cbc/sbcap_link.h b/include/osmocom/cbc/sbcap_link.h
index 5946544..da804a3 100644
--- a/include/osmocom/cbc/sbcap_link.h
+++ b/include/osmocom/cbc/sbcap_link.h
@@ -26,7 +26,8 @@
/* receive call-back; called for every received message */
int (*rx_cb)(struct cbc_sbcap_link *link, SBcAP_SBC_AP_PDU_t *pdu);
 };
-struct cbc_sbcap_mgr *cbc_sbcap_mgr_create(void *ctx);
+struct cbc_sbcap_mgr *cbc_sbcap_mgr_alloc(void *ctx);
+int cbc_sbcap_mgr_open_srv(struct cbc_sbcap_mgr *mgr);

 /* an SBc-AP link with a single (remote) peer connected to us */
 struct cbc_sbcap_link {
diff --git a/src/cbc_data.c b/src/cbc_data.c
index 5d5a64f..2e350e9 100644
--- a/src/cbc_data.c
+++ b/src/cbc_data.c
@@ -54,6 +54,12 @@
OSMO_ASSERT(cbc->it_q.rest2main);
osmo_fd_register(>it_q.rest2main->event_ofd);

+   cbc->cbsp.mgr = cbc_cbsp_mgr_alloc(cbc);
+   OSMO_ASSERT(cbc->cbsp.mgr);
+
+   cbc->sbcap.mgr = cbc_sbcap_mgr_alloc(cbc);
+   OSMO_ASSERT(cbc->sbcap.mgr);
+
return cbc;
 }

@@ -64,14 +70,14 @@

tall_rest_ctx = talloc_named_const(cbc, 0, "REST");

-   if (!(cbc->cbsp.mgr = cbc_cbsp_mgr_create(cbc))) {
+   if ((rc = cbc_cbsp_mgr_open_srv(cbc->cbsp.mgr)) < 0) {
LOGP(DMAIN, LOGL_ERROR, "Error binding CBSP port\n");
-   return -EIO;
+   return rc;
}

-   if (!(cbc->sbcap.mgr = cbc_sbcap_mgr_create(cbc))) {
+   if ((rc = cbc_sbcap_mgr_open_srv(cbc->sbcap.mgr)) < 0) {
LOGP(DMAIN, LOGL_ERROR, "Error binding SBc-AP port\n");
-   return -EIO;
+   return rc;
}

rc = rest_api_init(tall_rest_ctx, cbc->config.ecbe.local_host, 
cbc->config.ecbe.local_port);
diff --git a/src/cbsp_link.c b/src/cbsp_link.c
index cd1c308..baf2def 100644
--- a/src/cbsp_link.c
+++ b/src/cbsp_link.c
@@ -225,35 +225,44 @@
osmo_stream_srv_destroy(link->conn);
 }

-/* initialize the CBC-side CBSP server */
-struct cbc_cbsp_mgr *cbc_cbsp_mgr_create(void *ctx)
+/*
+ * CBSP Manager
+ */
+struct cbc_cbsp_mgr *cbc_cbsp_mgr_alloc(void *ctx)
 {
-   struct cbc_cbsp_mgr *cbc = talloc_zero(ctx, struct cbc_cbsp_mgr);
-   int rc;
+   struct cbc_cbsp_mgr *mgr;
+
+   mgr = talloc_zero(ctx, struct cbc_cbsp_mgr);
+   OSMO_ASSERT(mgr);
+   mgr->rx_cb = cbc_cbsp_link_rx_cb;
+   INIT_LLIST_HEAD(>links);
+
+   return mgr;
+}
+
+/* initialize the CBC-side CBSP server */
+int cbc_cbsp_mgr_open_srv(struct cbc_cbsp_mgr *mgr)
+{
char *bind_ip = g_cbc->config.cbsp.local_host;
int bind_port = g_cbc->config.cbsp.local_port;
+   struct osmo_stream_srv_link *srv_link;
+   int rc;

-   if (bind_port == -1)
-   bind_port = CBSP_TCP_PORT;
-
-   OSMO_ASSERT(cbc);
-   cbc->rx_cb = cbc_cbsp_link_rx_cb;
-   INIT_LLIST_HEAD(>links);
-   cbc->srv_link = osmo_stream_srv_link_create(cbc);
-   osmo_stream_srv_link_set_data(cbc->srv_link, cbc);
-   osmo_stream_srv_link_set_nodelay(cbc->srv_link, true);
-   osmo_stream_srv_link_set_port(cbc->srv_link, bind_port);
+   srv_link = osmo_stream_srv_link_create(mgr);
+   osmo_stream_srv_link_set_data(srv_link, mgr);
+   osmo_stream_srv_link_set_nodelay(srv_link, true);
+   osmo_stream_srv_link_set_port(srv_link, bind_port);
if (bind_ip)
-   osmo_stream_srv_link_set_addr(cbc->srv_link, bind_ip);
-   osmo_stream_srv_link_set_accept_cb(cbc->srv_link, cbsp_cbc_accept_cb);
-   rc = osmo_stream_srv_link_open(cbc->srv_link);
+   osmo_stream_srv_link_set_addr(srv_link, bind_ip);
+   osmo_stream_srv_link_set_accept_cb(srv_link, 

Change in osmo-upf[master]: add some comments in upf_gtp.c

2022-07-22 Thread dexter
Attention is currently required from: neels.
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/28707 )

Change subject: add some comments in upf_gtp.c
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28707
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I58f86cd84207a74e078ae4758bbed76bb1595d95
Gerrit-Change-Number: 28707
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Fri, 22 Jul 2022 15:52:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Build failure of network:osmocom:nightly/osmo-hnbgw in Debian_Unstable/x86_64

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hnbgw/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-hnbgw failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-hnbgw

Last lines of build log:
[   44s] logging output to //.build.log...
[   44s] processing recipe 
/.build-srcdir/osmo-hnbgw_1.3.0.1.7eb8.202207220052.dsc ...
[   44s] init_buildsystem --configdir /.build/configs --cachedir 
/var/cache/build /.build-srcdir/osmo-hnbgw_1.3.0.1.7eb8.202207220052.dsc build 
...
[   44s] running base-files postinstall script
[   44s] chown: invalid user: 'root:root'
[   44s] running base-passwd preinstall script
[   44s] running base-passwd postinstall script
[   45s] running gawk postinstall script
[   45s] running user-setup postinstall script
[   46s] querying package ids...
[   51s] [1/514] installing autotools-dev-20220109.1
[   51s] [2/514] installing binutils-common-2.38.90.20220713-2
[   52s] [3/514] installing cpp-4:12.1.0-1
[   52s] dpkg: cpp: dependency problems, but configuring anyway as you 
requested:
[   52s]  cpp depends on cpp-12 (>= 12.1.0-5~); however:
[   52s]   Package cpp-12 is not installed.
[   52s] update-alternatives: error: alternative path /usr/bin/cpp doesn't exist
[   52s] dpkg: error processing package cpp (--install):
[   52s]  installed cpp package post-installation script subprocess returned 
error exit status 2
[   52s] Errors were encountered while processing:
[   52s]  cpp
[   52s] exit ...
[   52s] ### VM INTERACTION START ###
[   52s] [   18.396686][T1] sysrq: Power Off
[   52s] [   18.433219][   T16] reboot: Power down
[   53s] ### VM INTERACTION END ###
[   53s] 
[   53s] lamb62 failed "build osmo-hnbgw_1.3.0.1.7eb8.202207220052.dsc" at Fri 
Jul 22 15:49:36 UTC 2022.
[   53s] 

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Change in pysim[master]: sysmocom_sja2: Prevent KeyError/None exception on encode

2022-07-22 Thread fixeria
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/28735 )

Change subject: sysmocom_sja2: Prevent KeyError/None exception on encode
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28735
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib2da5adda4fae374ab14bb8100f338691aef719a
Gerrit-Change-Number: 28735
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Jul 2022 15:45:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Build failure of network:osmocom:nightly/osmo-sgsn in Debian_Unstable/x86_64

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-sgsn failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-sgsn

Last lines of build log:
[   42s] logging output to //.build.log...
[   42s] processing recipe /.build-srcdir/osmo-sgsn_1.9.0.202207220052.dsc ...
[   42s] init_buildsystem --configdir /.build/configs --cachedir 
/var/cache/build /.build-srcdir/osmo-sgsn_1.9.0.202207220052.dsc build ...
[   42s] running base-files postinstall script
[   42s] chown: invalid user: 'root:root'
[   42s] running base-passwd preinstall script
[   42s] running base-passwd postinstall script
[   42s] running gawk postinstall script
[   42s] running user-setup postinstall script
[   44s] querying package ids...
[   50s] [1/515] installing autotools-dev-20220109.1
[   50s] [2/515] installing binutils-common-2.38.90.20220713-2
[   50s] [3/515] installing cpp-4:12.1.0-1
[   50s] dpkg: cpp: dependency problems, but configuring anyway as you 
requested:
[   50s]  cpp depends on cpp-12 (>= 12.1.0-5~); however:
[   50s]   Package cpp-12 is not installed.
[   50s] update-alternatives: error: alternative path /usr/bin/cpp doesn't exist
[   50s] dpkg: error processing package cpp (--install):
[   50s]  installed cpp package post-installation script subprocess returned 
error exit status 2
[   50s] Errors were encountered while processing:
[   50s]  cpp
[   50s] exit ...
[   50s] ### VM INTERACTION START ###
[   51s] [   14.978001][T1] sysrq: Power Off
[   51s] [   14.985685][   T16] reboot: Power down
[   51s] ### VM INTERACTION END ###
[   51s] 
[   51s] hurricane3 failed "build osmo-sgsn_1.9.0.202207220052.dsc" at Fri Jul 
22 15:41:34 UTC 2022.
[   51s] 

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-hnodeb in Debian_Unstable/x86_64

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hnodeb/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-hnodeb failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-hnodeb

Last lines of build log:
[   19s] logging output to //.build.log...
[   19s] processing recipe /.build-srcdir/osmo-hnodeb_0.1.0.202207220052.dsc ...
[   19s] init_buildsystem --configdir /.build/configs --cachedir 
/var/cache/build /.build-srcdir/osmo-hnodeb_0.1.0.202207220052.dsc build ...
[   19s] running base-files postinstall script
[   19s] chown: invalid user: 'root:root'
[   19s] running base-passwd preinstall script
[   19s] running base-passwd postinstall script
[   19s] running gawk postinstall script
[   19s] running user-setup postinstall script
[   20s] querying package ids...
[   23s] [1/513] installing autotools-dev-20220109.1
[   23s] [2/513] installing binutils-common-2.38.90.20220713-2
[   23s] [3/513] installing cpp-4:12.1.0-1
[   23s] dpkg: cpp: dependency problems, but configuring anyway as you 
requested:
[   23s]  cpp depends on cpp-12 (>= 12.1.0-5~); however:
[   23s]   Package cpp-12 is not installed.
[   23s] update-alternatives: error: alternative path /usr/bin/cpp doesn't exist
[   23s] dpkg: error processing package cpp (--install):
[   23s]  installed cpp package post-installation script subprocess returned 
error exit status 2
[   23s] Errors were encountered while processing:
[   23s]  cpp
[   23s] exit ...
[   23s] ### VM INTERACTION START ###
[   23s] [8.567512][T1] sysrq: Power Off
[   23s] [8.569412][T7] reboot: Power down
[   23s] ### VM INTERACTION END ###
[   23s] 
[   23s] sheep84 failed "build osmo-hnodeb_0.1.0.202207220052.dsc" at Fri Jul 
22 15:38:49 UTC 2022.
[   23s] 

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_Unstable/x86_64

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[   33s] logging output to //.build.log...
[   33s] processing recipe 
/.build-srcdir/osmo-msc_1.9.0.2.99bd.202207220052.dsc ...
[   33s] init_buildsystem --configdir /.build/configs --cachedir 
/var/cache/build /.build-srcdir/osmo-msc_1.9.0.2.99bd.202207220052.dsc build ...
[   33s] running base-files postinstall script
[   33s] chown: invalid user: 'root:root'
[   33s] running base-passwd preinstall script
[   33s] running base-passwd postinstall script
[   33s] running gawk postinstall script
[   33s] running user-setup postinstall script
[   34s] querying package ids...
[   37s] [1/516] installing autotools-dev-20220109.1
[   37s] [2/516] installing binutils-common-2.38.90.20220713-2
[   38s] [3/516] installing cpp-4:12.1.0-1
[   38s] dpkg: cpp: dependency problems, but configuring anyway as you 
requested:
[   38s]  cpp depends on cpp-12 (>= 12.1.0-5~); however:
[   38s]   Package cpp-12 is not installed.
[   38s] update-alternatives: error: alternative path /usr/bin/cpp doesn't exist
[   38s] dpkg: error processing package cpp (--install):
[   38s]  installed cpp package post-installation script subprocess returned 
error exit status 2
[   38s] Errors were encountered while processing:
[   38s]  cpp
[   38s] exit ...
[   38s] ### VM INTERACTION START ###
[   38s] [   12.667154][T1] sysrq: Power Off
[   38s] [   12.670273][   T16] reboot: Power down
[   38s] ### VM INTERACTION END ###
[   38s] 
[   38s] lamb62 failed "build osmo-msc_1.9.0.2.99bd.202207220052.dsc" at Fri 
Jul 22 15:32:58 UTC 2022.
[   38s] 

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bsc-nat in Debian_Unstable/x86_64

2022-07-22 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc-nat/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-bsc-nat failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc-nat

Last lines of build log:
[   19s] logging output to //.build.log...
[   19s] processing recipe /.build-srcdir/osmo-bsc-nat_0.1.0.202207220052.dsc 
...
[   19s] init_buildsystem --configdir /.build/configs --cachedir 
/var/cache/build /.build-srcdir/osmo-bsc-nat_0.1.0.202207220052.dsc build ...
[   19s] running base-files postinstall script
[   19s] chown: invalid user: 'root:root'
[   19s] running base-passwd preinstall script
[   19s] running base-passwd postinstall script
[   19s] running gawk postinstall script
[   19s] running user-setup postinstall script
[   20s] querying package ids...
[   23s] [1/506] installing autotools-dev-20220109.1
[   23s] [2/506] installing binutils-common-2.38.90.20220713-2
[   23s] [3/506] installing cpp-4:12.1.0-1
[   23s] dpkg: cpp: dependency problems, but configuring anyway as you 
requested:
[   23s]  cpp depends on cpp-12 (>= 12.1.0-5~); however:
[   23s]   Package cpp-12 is not installed.
[   23s] update-alternatives: error: alternative path /usr/bin/cpp doesn't exist
[   23s] dpkg: error processing package cpp (--install):
[   23s]  installed cpp package post-installation script subprocess returned 
error exit status 2
[   23s] Errors were encountered while processing:
[   23s]  cpp
[   23s] exit ...
[   23s] ### VM INTERACTION START ###
[   23s] [8.651533][T1] sysrq: Power Off
[   23s] [8.653218][T7] reboot: Power down
[   23s] ### VM INTERACTION END ###
[   23s] 
[   23s] sheep85 failed "build osmo-bsc-nat_0.1.0.202207220052.dsc" at Fri Jul 
22 15:26:52 UTC 2022.
[   23s] 

-- 
Configure notifications at https://build.opensuse.org/my/subscriptions
openSUSE Build Service (https://build.opensuse.org/)


Change in osmo-upf[master]: add osmo-pfcp-tool

2022-07-22 Thread neels
Attention is currently required from: laforge.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/28310 )

Change subject: add osmo-pfcp-tool
..


Patch Set 3:

(1 comment)

Patchset:

PS1:
> still nothing in the commit message.
(btw, in the subversion project we had the rule that the commit log should 
actually only say "add foo", based on the premise that a description of "foo" 
should be at the proper places like readme / cmdline help / docs ... not sure 
that i have the proper docs in this commit, just the CR reminded me of that 
aspect)



--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28310
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
Gerrit-Change-Number: 28310
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Jul 2022 15:26:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-upf[master]: add osmo-pfcp-tool

2022-07-22 Thread neels
Attention is currently required from: neels.
Hello Jenkins Builder, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-upf/+/28310

to look at the new patch set (#3).

Change subject: add osmo-pfcp-tool
..

add osmo-pfcp-tool

A tool for quick testing of PFCP interaction with a UPF, based on VTY
scripts / interaction.

The main motivation to create this tool was to test both the CPF and UPF
sides of the new PFCP protocol encoding and decoding, and then to test
interaction of osmo-upf with the kernel modules. It may also come in
handy as a fast way to verify basic operation in a production
environment.

Related: SYS#5599
Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
---
M configure.ac
A contrib/osmo-pfcp-tool-scripts/assoc_setup.vty
A contrib/osmo-pfcp-tool-scripts/assoc_setup_retrans.vty
A contrib/osmo-pfcp-tool-scripts/encaps_plus_tunmap.vty
A contrib/osmo-pfcp-tool-scripts/endecaps_session_est.vty
A contrib/osmo-pfcp-tool-scripts/heartbeat.vty
A contrib/osmo-pfcp-tool-scripts/osmo-pfcp-tool.cfg
A contrib/osmo-pfcp-tool-scripts/osmo-upf-11.cfg
A contrib/osmo-pfcp-tool-scripts/osmo-upf-12.cfg
A contrib/osmo-pfcp-tool-scripts/session_est_without_assoc.vty
A contrib/osmo-pfcp-tool-scripts/session_mod.vty
A contrib/osmo-pfcp-tool-scripts/tunmap_session_est.vty
M src/Makefile.am
A src/osmo-pfcp-tool/Makefile.am
A src/osmo-pfcp-tool/osmo_pfcp_tool_main.c
A src/osmo-pfcp-tool/pfcp_tool.c
A src/osmo-pfcp-tool/pfcp_tool.h
A src/osmo-pfcp-tool/pfcp_tool_vty.c
18 files changed, 1,624 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/10/28310/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28310
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
Gerrit-Change-Number: 28310
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-upf[master]: implement GTPv1-U ECHO response

2022-07-22 Thread neels
Attention is currently required from: neels, pespin.
Hello Jenkins Builder, laforge, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-upf/+/28312

to look at the new patch set (#4).

Change subject: implement GTPv1-U ECHO response
..

implement GTPv1-U ECHO response

Accept data on the GTPv1-U socket and respond to GTPv1-U ECHO REQUEST
messages.

We should keep a deterministic recovery counter that increases with
every restart. As a quick and dirty way just use the current time at
startup for now, until osmo-upf reaches production maturity.

Related: OS#5599
Change-Id: I135370a7723e2c667ec681f50c21107cde63ea5b
---
M include/osmocom/upf/Makefile.am
M include/osmocom/upf/upf.h
A include/osmocom/upf/upf_gtpu_echo.h
M src/osmo-upf/Makefile.am
M src/osmo-upf/upf.c
M src/osmo-upf/upf_gtp.c
A src/osmo-upf/upf_gtpu_echo.c
7 files changed, 176 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/12/28312/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28312
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I135370a7723e2c667ec681f50c21107cde63ea5b
Gerrit-Change-Number: 28312
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in pysim[master]: sysmocom_sja2: Prevent KeyError/None exception on encode

2022-07-22 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/28735 )


Change subject: sysmocom_sja2: Prevent KeyError/None exception on encode
..

sysmocom_sja2: Prevent KeyError/None exception on encode

Fix a bug in the pySim.sysmocom_sja2 module, where we defined unnamed
bits in BitStruct without a default value causing exceptions like this:

EXCEPTION of type 'KeyError' occurred with message: 'None'

Change-Id: Ib2da5adda4fae374ab14bb8100f338691aef719a
Closes: OS#5575
---
M pySim/sysmocom_sja2.py
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/28735/1

diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py
index d00a2cb..5d25993 100644
--- a/pySim/sysmocom_sja2.py
+++ b/pySim/sysmocom_sja2.py
@@ -137,7 +137,7 @@
 class EF_SIM_AUTH_KEY(TransparentEF):
 def __init__(self, fid='6f20', name='EF.SIM_AUTH_KEY'):
 super().__init__(fid, name=name, desc='USIM authentication key')
-CfgByte = BitStruct(Bit[2],
+CfgByte = BitStruct(Default(BitsInteger(2), 0),
 'use_sres_deriv_func_2'/Bit,
 'use_opc_instead_of_op'/Bit,
 'algorithm'/Enum(Nibble, milenage=4, comp128v1=1, 
comp128v2=2, comp128v3=3))
@@ -192,7 +192,7 @@
 class EF_USIM_AUTH_KEY(TransparentEF):
 def __init__(self, fid='af20', name='EF.USIM_AUTH_KEY'):
 super().__init__(fid, name=name, desc='USIM authentication key')
-CfgByte = BitStruct(Bit, 'only_4bytes_res_in_3g'/Bit,
+CfgByte = BitStruct(Default(Bit, 0), 'only_4bytes_res_in_3g'/Bit,
 'use_sres_deriv_func_2_in_3g'/Bit,
 'use_opc_instead_of_op'/Bit,
 'algorithm'/Enum(Nibble, milenage=4, sha1_aka=5, 
xor=15))
@@ -210,7 +210,7 @@
 class EF_USIM_AUTH_KEY_2G(TransparentEF):
 def __init__(self, fid='af22', name='EF.USIM_AUTH_KEY_2G'):
 super().__init__(fid, name=name, desc='USIM authentication key in 2G 
context')
-CfgByte = BitStruct(Bit, 'only_4bytes_res_in_3g'/Bit,
+CfgByte = BitStruct(Default(Bit,0), 'only_4bytes_res_in_3g'/Bit,
 'use_sres_deriv_func_2_in_3g'/Bit,
 'use_opc_instead_of_op'/Bit,
 'algorithm'/Enum(Nibble, milenage=4, comp128v1=1, 
comp128v2=2, comp128v3=3))

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28735
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib2da5adda4fae374ab14bb8100f338691aef719a
Gerrit-Change-Number: 28735
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread fixeria
Attention is currently required from: laforge, dexter.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/28725 )

Change subject: Introduce APDU/TPDU trace decoder
..


Patch Set 5:

(1 comment)

File pySim/apdu/__init__.py:

https://gerrit.osmocom.org/c/pysim/+/28725/comment/fcd14e9c_562bf0d2
PS5, Line 70: cmd
rsp?



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 5
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Fri, 22 Jul 2022 15:03:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-cbc[master]: Move struct cbc bring up code to its own file and functions

2022-07-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28734 )

Change subject: Move struct cbc bring up code to its own file and functions
..

Move struct cbc bring up code to its own file and functions

This way it's clear and we have in one place all the related code that
neds to be run at a given time.t

Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M include/osmocom/cbc/cbc_data.h
M include/osmocom/cbc/debug.h
M src/Makefile.am
A src/cbc_data.c
M src/cbc_main.c
M src/rest_api.c
7 files changed, 100 insertions(+), 34 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/examples/osmo-cbc/osmo-cbc.cfg 
b/doc/examples/osmo-cbc/osmo-cbc.cfg
index cc4272f..994da8c 100644
--- a/doc/examples/osmo-cbc/osmo-cbc.cfg
+++ b/doc/examples/osmo-cbc/osmo-cbc.cfg
@@ -1,4 +1,5 @@
 log stderr
+ logging level main notice
  logging level rest notice
  logging level cbsp notice
  logging level sbcap notice
diff --git a/include/osmocom/cbc/cbc_data.h b/include/osmocom/cbc/cbc_data.h
index d96e5ca..d3a8319 100644
--- a/include/osmocom/cbc/cbc_data.h
+++ b/include/osmocom/cbc/cbc_data.h
@@ -79,6 +79,8 @@
 };

 extern struct cbc *g_cbc;
+struct cbc *cbc_alloc(void *ctx);
+int cbc_start(struct cbc *cbc);

 /* rest_api.c */
 int rest_api_init(void *ctx, const char *bind_addr, uint16_t port);
diff --git a/include/osmocom/cbc/debug.h b/include/osmocom/cbc/debug.h
index 1ec0a8e..025419e 100644
--- a/include/osmocom/cbc/debug.h
+++ b/include/osmocom/cbc/debug.h
@@ -1,6 +1,7 @@
 #pragma once

 enum {
+   DMAIN,
DCBSP,
DSBcAP,
DREST,
diff --git a/src/Makefile.am b/src/Makefile.am
index 32cccd7..e72b20b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@
 bin_PROGRAMS = osmo-cbc

 osmo_cbc_SOURCES = \
+   cbc_data.c \
cbc_main.c \
cbc_message.c \
cbc_peer.c \
diff --git a/src/cbc_data.c b/src/cbc_data.c
new file mode 100644
index 000..5d5a64f
--- /dev/null
+++ b/src/cbc_data.c
@@ -0,0 +1,83 @@
+/* Osmocom CBC (Cell Broacast Centre) */
+
+/* (C) 2022 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ * Author: Pau Espin Pedrol 
+ *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct cbc *cbc_alloc(void *ctx)
+{
+   struct cbc *cbc;
+
+   cbc = talloc_zero(ctx, struct cbc);
+   INIT_LLIST_HEAD(>peers);
+   INIT_LLIST_HEAD(>messages);
+   INIT_LLIST_HEAD(>expired_messages);
+   cbc->config.cbsp.local_host = talloc_strdup(cbc, "127.0.0.1");
+   cbc->config.cbsp.local_port = CBSP_TCP_PORT;
+   /* cbc->config.sbcap local_host set up during VTY (and vty_go_parent) */
+   cbc->config.sbcap.local_port = SBcAP_SCTP_PORT;
+   cbc->config.ecbe.local_host = talloc_strdup(cbc, "127.0.0.1");
+   cbc->config.ecbe.local_port = 12345;
+
+   cbc->it_q.rest2main = osmo_it_q_alloc(cbc, "rest2main", 10, 
rest2main_read_cb, NULL);
+   OSMO_ASSERT(cbc->it_q.rest2main);
+   osmo_fd_register(>it_q.rest2main->event_ofd);
+
+   return cbc;
+}
+
+int cbc_start(struct cbc *cbc)
+{
+   void *tall_rest_ctx;
+   int rc;
+
+   tall_rest_ctx = talloc_named_const(cbc, 0, "REST");
+
+   if (!(cbc->cbsp.mgr = cbc_cbsp_mgr_create(cbc))) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding CBSP port\n");
+   return -EIO;
+   }
+
+   if (!(cbc->sbcap.mgr = cbc_sbcap_mgr_create(cbc))) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding SBc-AP port\n");
+   return -EIO;
+   }
+
+   rc = rest_api_init(tall_rest_ctx, cbc->config.ecbe.local_host, 
cbc->config.ecbe.local_port);
+   if (rc < 0) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding ECBE port\n");
+   return -EIO;
+   }
+   return 0;
+}
diff --git a/src/cbc_main.c b/src/cbc_main.c
index cd80e31..4ad59b6 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -45,9 +45,6 @@
 #include 

 #include 
-#include 
-#include 
-#include 
 #include 
 #include 

@@ -55,6 +52,13 @@
 struct cbc *g_cbc;

 static const 

Change in osmo-cbc[master]: Move struct cbc bring up code to its own file and functions

2022-07-22 Thread laforge
Attention is currently required from: pespin.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28734 )

Change subject: Move struct cbc bring up code to its own file and functions
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28734
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
Gerrit-Change-Number: 28734
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 14:13:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: Move struct cbc bring up code to its own file and functions

2022-07-22 Thread pespin
Attention is currently required from: pespin.
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-cbc/+/28734

to look at the new patch set (#3).

Change subject: Move struct cbc bring up code to its own file and functions
..

Move struct cbc bring up code to its own file and functions

This way it's clear and we have in one place all the related code that
neds to be run at a given time.t

Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M include/osmocom/cbc/cbc_data.h
M include/osmocom/cbc/debug.h
M src/Makefile.am
A src/cbc_data.c
M src/cbc_main.c
M src/rest_api.c
7 files changed, 100 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/34/28734/3
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28734
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
Gerrit-Change-Number: 28734
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-cbc[master]: Move struct cbc bring up code to its won file and functions

2022-07-22 Thread pespin
Attention is currently required from: pespin.
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-cbc/+/28734

to look at the new patch set (#2).

Change subject: Move struct cbc bring up code to its won file and functions
..

Move struct cbc bring up code to its won file and functions

This way it's clear and we have in one place all the related code that
neds to be run at a given time.t

Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M include/osmocom/cbc/cbc_data.h
M include/osmocom/cbc/debug.h
M src/Makefile.am
A src/cbc_data.c
M src/cbc_main.c
M src/rest_api.c
7 files changed, 100 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/34/28734/2
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28734
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
Gerrit-Change-Number: 28734
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-cbc[master]: vty: Define peer proto during 'peer' node cmd

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28718 )

Change subject: vty: Define peer proto during 'peer' node cmd
..

vty: Define peer proto during 'peer' node cmd

This way we lock the type (proto) of each peer at creation time.
Otherwise, having the possibility of changing the protocol of the peer
makes all the code too complex and there's no good way to prevent the
protocol from being changed at any time creating unexpected issues.
If the user wants to change the protocol, she can do so by removing the
peer and re-adding it through the VTY with the desired protocol.

Change-Id: I477568f9b8450ba14c914614fd2391d5486e
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M src/cbc_vty.c
2 files changed, 40 insertions(+), 13 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/doc/examples/osmo-cbc/osmo-cbc.cfg 
b/doc/examples/osmo-cbc/osmo-cbc.cfg
index dc33b09..cc4272f 100644
--- a/doc/examples/osmo-cbc/osmo-cbc.cfg
+++ b/doc/examples/osmo-cbc/osmo-cbc.cfg
@@ -14,12 +14,10 @@
   local-ip 127.0.0.1
   local-ip ::1
   local-port 29168
- peer example-bsc
-  protocol cbsp
+ peer cbsp example-bsc
   remote-ip 127.0.0.2
   remote-port 48049
- peer example-mme
-  protocol sbcap
+ peer sbcap example-mme
   remote-ip 127.0.0.2
   remote-ip ::2
   remote-port 29168
diff --git a/src/cbc_vty.c b/src/cbc_vty.c
index 36d646d..7e5a9db 100644
--- a/src/cbc_vty.c
+++ b/src/cbc_vty.c
@@ -44,6 +44,10 @@
{ 0, NULL }
 };

+#define CBC_PEER_PROTO_NAME_VTY_CMD "(cbsp|sbcap)"
+#define CBC_PEER_PROTO_NAME_VTY_STR "Cell Broadcast Service Protocol (GSM)\n" \
+"SBc Application Part (LTE)\n"
+
 static void dump_one_cbc_peer(struct vty *vty, const struct cbc_peer *peer)
 {
const char *state = "";
@@ -519,13 +523,17 @@

 /* PEER */

-DEFUN(cfg_cbc_peer, cfg_cbc_peer_cmd,
+DEFUN_DEPRECATED(cfg_cbc_peer_old, cfg_cbc_peer_old_cmd,
"peer NAME",
"Remote Peer\n"
"Name identifying the peer\n")
 {
struct cbc_peer *peer;

+   vty_out(vty, "%% This function is deprecated, use "
+   "'peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME' instead. "
+   "Assuming 'cbsp' for peers being created%s", VTY_NEWLINE);
+
peer = cbc_peer_by_name(argv[0]);
if (!peer)
peer = cbc_peer_create(argv[0], CBC_PEER_PROTO_CBSP);
@@ -537,6 +545,27 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_cbc_peer, cfg_cbc_peer_cmd,
+   "peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME",
+   "Remote Peer\n"
+   CBC_PEER_PROTO_NAME_VTY_STR
+   "Name identifying the peer\n")
+{
+   struct cbc_peer *peer;
+   enum cbc_peer_protocol proto;
+
+   proto = get_string_value(cbc_peer_proto_name_vty, argv[0]);
+   peer = cbc_peer_by_name(argv[1]);
+   if (!peer)
+   peer = cbc_peer_create(argv[1], proto);
+   if (!peer)
+   return CMD_WARNING;
+
+   vty->node = PEER_NODE;
+   vty->index = peer;
+   return CMD_SUCCESS;
+}
+
 DEFUN(cfg_cbc_no_peer, cfg_cbc_no_peer_cmd,
"no peer NAME",
NO_STR "Remote Peer\n"
@@ -554,13 +583,13 @@
 }


-DEFUN(cfg_peer_proto, cfg_peer_proto_cmd,
-   "protocol (cbsp|sbcap)",
+DEFUN_DEPRECATED(cfg_peer_proto, cfg_peer_proto_cmd,
+   "protocol " CBC_PEER_PROTO_NAME_VTY_CMD,
"Configure Protocol of Peer\n"
-   "Cell Broadcast Service Protocol (GSM)\n")
+   CBC_PEER_PROTO_NAME_VTY_STR)
 {
-   struct cbc_peer *peer = (struct cbc_peer *) vty->index;
-   peer->proto = get_string_value(cbc_peer_proto_name_vty, argv[0]);
+   vty_out(vty, "%% This function is deprecated and does nothing, use "
+   "'peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME' instead%s", 
VTY_NEWLINE);
return CMD_SUCCESS;
 }

@@ -646,9 +675,8 @@
 static void write_one_peer(struct vty *vty, struct cbc_peer *peer)
 {
unsigned int i;
-   vty_out(vty, " peer %s%s", peer->name, VTY_NEWLINE);
-   vty_out(vty, "  protocol %s%s",
-   get_value_string(cbc_peer_proto_name_vty, peer->proto), 
VTY_NEWLINE);
+   vty_out(vty, " peer %s %s%s", get_value_string(cbc_peer_proto_name_vty, 
peer->proto),
+   peer->name, VTY_NEWLINE);
if (peer->remote_port == -1)
vty_out(vty, "  no remote-port%s", VTY_NEWLINE);
else
@@ -696,6 +724,7 @@
install_element(SBcAP_NODE, _sbcap_no_local_ip_cmd);
install_element(SBcAP_NODE, _sbcap_local_port_cmd);

+   install_element(CBC_NODE, _cbc_peer_old_cmd);
install_element(CBC_NODE, _cbc_peer_cmd);
install_element(CBC_NODE, _cbc_no_peer_cmd);
install_node(_node, NULL);

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28718
To unsubscribe, or for help writing mail filters, visit 

Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread laforge
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/pysim/+/28725

to look at the new patch set (#5).

Change subject: Introduce APDU/TPDU trace decoder
..

Introduce APDU/TPDU trace decoder

This introduces a new pySim.apdu module hierarchy, which contains
classes that represent TPDU/APDUs as exchanged between
SIM/UICC/USIM/ISIM card and UE.

It contains instruction level decoders for SELECT, READ BINARY and
friends, and then uses the pySim.filesystem.Runtime{Lchan,State} classes
to keep track of the currently selected EF/DF/ADF for each logical
channel, and uses the file-specific decoder classes of pySim to decode
the actual file content that is being read or written.

This provides a much more meaningful decode of protocol traces than
wireshark will ever be able to give us.

Furthermore, there's the new pySim.apdu_source set of classes which
provides "input plugins" for obtaining APDU traces in a variety of
formats.  So far, GSMTAP UDP live capture and pyshark based RSPRO
live and pcap file reading are imlpemented.

Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Closes: OS#5126
---
M README.md
M contrib/jenkins.sh
A pySim-trace.py
A pySim/apdu/__init__.py
A pySim/apdu/global_platform.py
A pySim/apdu/ts_102_221.py
A pySim/apdu/ts_31_102.py
A pySim/apdu_source/__init__.py
A pySim/apdu_source/gsmtap.py
A pySim/apdu_source/pyshark_rspro.py
A pySim/gsmtap.py
M pySim/ts_31_102.py
M requirements.txt
M setup.py
A tests/test_apdu.py
15 files changed, 1,855 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/28725/5
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 5
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread pespin
Attention is currently required from: laforge, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> So that means the -latest will be failing for the next X months until we 
> release a new version. […]
Having the existing minimal set infrastructure to work at the same time for 
CBSP and SBc-AP was by far the easiest and quickest in time, so I went that way.
We have a set of hours available for this, so when I'm done with implementing 
the system working, we can spend time on stuff like improving the tests, etc.
It makes sense to make a new release once I'm done.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 13:38:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread fixeria
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> There's no backward compatibility anyway, since the tests also expect SBc-AP 
> to be present in any ca […]
So that means the -latest will be failing for the next X months until we 
release a new version. And AFAICS, it's already failing (all tests red). Was it 
discussed somewhere and decided to not care? Or maybe you're planning to tag a 
new release of osmo-cbc after the SBcAP work is done? I am asking because 
usually we do care about backwards compatibility.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
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-Comment-Date: Fri, 22 Jul 2022 13:25:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread osmith
Attention is currently required from: laforge, pespin, fixeria.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
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: Fri, 22 Jul 2022 13:05:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: Move struct cbc bring up code to its won file and functions

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28734 )


Change subject: Move struct cbc bring up code to its won file and functions
..

Move struct cbc bring up code to its won file and functions

This way it's clear and we have in one place all the related code that
neds to be run at a given time.

Change-Id: I00fe755340664d4ca4a5cfdcae8d4cd33b2f40a1
---
M include/osmocom/cbc/cbc_data.h
M include/osmocom/cbc/debug.h
M src/Makefile.am
A src/cbc_data.c
M src/cbc_main.c
5 files changed, 98 insertions(+), 34 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/34/28734/1

diff --git a/include/osmocom/cbc/cbc_data.h b/include/osmocom/cbc/cbc_data.h
index d96e5ca..d3a8319 100644
--- a/include/osmocom/cbc/cbc_data.h
+++ b/include/osmocom/cbc/cbc_data.h
@@ -79,6 +79,8 @@
 };

 extern struct cbc *g_cbc;
+struct cbc *cbc_alloc(void *ctx);
+int cbc_start(struct cbc *cbc);

 /* rest_api.c */
 int rest_api_init(void *ctx, const char *bind_addr, uint16_t port);
diff --git a/include/osmocom/cbc/debug.h b/include/osmocom/cbc/debug.h
index 1ec0a8e..025419e 100644
--- a/include/osmocom/cbc/debug.h
+++ b/include/osmocom/cbc/debug.h
@@ -1,6 +1,7 @@
 #pragma once

 enum {
+   DMAIN,
DCBSP,
DSBcAP,
DREST,
diff --git a/src/Makefile.am b/src/Makefile.am
index 32cccd7..e72b20b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@
 bin_PROGRAMS = osmo-cbc

 osmo_cbc_SOURCES = \
+   cbc_data.c \
cbc_main.c \
cbc_message.c \
cbc_peer.c \
diff --git a/src/cbc_data.c b/src/cbc_data.c
new file mode 100644
index 000..6f0db6c
--- /dev/null
+++ b/src/cbc_data.c
@@ -0,0 +1,84 @@
+/* Osmocom CBC (Cell Broacast Centre) */
+
+/* (C) 2022 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ * Author: Pau Espin Pedrol 
+ *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct cbc *cbc_alloc(void *ctx)
+{
+   struct cbc *cbc;
+
+   cbc = talloc_zero(ctx, struct cbc);
+   INIT_LLIST_HEAD(_cbc->peers);
+   INIT_LLIST_HEAD(_cbc->messages);
+   INIT_LLIST_HEAD(_cbc->expired_messages);
+   cbc->config.cbsp.local_host = talloc_strdup(cbc, "127.0.0.1");
+   cbc->config.cbsp.local_port = CBSP_TCP_PORT;
+   /* g_cbc->config.sbcap local_host set up during VTY (and vty_go_parent) 
*/
+   cbc->config.sbcap.local_port = SBcAP_SCTP_PORT;
+   cbc->config.ecbe.local_host = talloc_strdup(cbc, "127.0.0.1");
+   cbc->config.ecbe.local_port = 12345;
+
+   LOGP(DREST, LOGL_INFO, "Main thread tid: %lu\n", pthread_self());
+   cbc->it_q.rest2main = osmo_it_q_alloc(cbc, "rest2main", 10, 
rest2main_read_cb, NULL);
+   OSMO_ASSERT(cbc->it_q.rest2main);
+   osmo_fd_register(>it_q.rest2main->event_ofd);
+
+   return cbc;
+}
+
+int cbc_start(struct cbc *cbc)
+{
+   void *tall_rest_ctx;
+   int rc;
+
+   tall_rest_ctx = talloc_named_const(cbc, 0, "REST");
+
+   if (!(g_cbc->cbsp.mgr = cbc_cbsp_mgr_create(cbc))) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding CBSP port\n");
+   return -EIO;
+   }
+
+   if (!(g_cbc->sbcap.mgr = cbc_sbcap_mgr_create(cbc))) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding SBc-AP port\n");
+   return -EIO;
+   }
+
+   rc = rest_api_init(tall_rest_ctx, cbc->config.ecbe.local_host, 
cbc->config.ecbe.local_port);
+   if (rc < 0) {
+   LOGP(DMAIN, LOGL_ERROR, "Error binding ECBE port\n");
+   return -EIO;
+   }
+   return 0;
+}
diff --git a/src/cbc_main.c b/src/cbc_main.c
index cd80e31..4ad59b6 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -45,9 +45,6 @@
 #include 

 #include 
-#include 
-#include 
-#include 
 #include 
 #include 

@@ -55,6 +52,13 @@
 struct cbc *g_cbc;

 static const struct log_info_cat log_info_cat[] = {
+   [DMAIN] = {
+   .name = "DMAIN",
+   .description = "Main logging category",
+   .color = "\033[1;30m",
+   .enabled = 1,
+   .loglevel = LOGL_NOTICE,
+   },
[DCBSP] = {

Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread pespin
Attention is currently required from: osmith, laforge, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> Actually, what's missing is some sed magic ensuring backwards compatibility 
> with ttcn3-cbc-test-late […]
There's no backward compatibility anyway, since the tests also expect SBc-AP to 
be present in any case, which latest version of osmo-cbc doesn't support.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:57:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread fixeria
Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1:
Actually, what's missing is some sed magic ensuring backwards compatibility 
with ttcn3-cbc-test-latest.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:47:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: vty: Define peer proto during 'peer' node cmd

2022-07-22 Thread fixeria
Attention is currently required from: osmith, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28718 )

Change subject: vty: Define peer proto during 'peer' node cmd
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28718
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I477568f9b8450ba14c914614fd2391d5486e
Gerrit-Change-Number: 28718
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:46:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread fixeria
Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )

Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:44:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: remove unused #imports in sched_clck.c

2022-07-22 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28726 )

Change subject: trxcon: remove unused #imports in sched_clck.c
..

trxcon: remove unused #imports in sched_clck.c

Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
---
M src/host/trxcon/src/sched_clck.c
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/src/sched_clck.c b/src/host/trxcon/src/sched_clck.c
index 9c77382..7ac83e2 100644
--- a/src/host/trxcon/src/sched_clck.c
+++ b/src/host/trxcon/src/sched_clck.c
@@ -32,15 +32,11 @@

 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 

 #include 
 #include 
-#include 

 #define MAX_FN_SKEW50
 #define TRX_LOSS_FRAMES400

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28726
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
Gerrit-Change-Number: 28726
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmocom-bb[master]: trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

2022-07-22 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28729 )

Change subject: trxcon: l1ctl_server_{start,shutdown}() -> 
l1ctl_server_{alloc,free}()
..

trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

l1ctl_server_start() does not actually start the server, it simply
allocates memory and initializes it.  l1ctl_server_shutdown() does
the opposite.  Let's use more precise symbol names.

Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
M src/host/trxcon/src/l1ctl_server.c
M src/host/trxcon/src/trxcon.c
3 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
index 003d146..94c0a9c 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
@@ -54,8 +54,8 @@
void *priv;
 };

-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg);
-void l1ctl_server_shutdown(struct l1ctl_server *server);
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct 
l1ctl_server_cfg *cfg);
+void l1ctl_server_free(struct l1ctl_server *server);

 int l1ctl_client_send(struct l1ctl_client *client, struct msgb *msg);
 void l1ctl_client_conn_close(struct l1ctl_client *client);
diff --git a/src/host/trxcon/src/l1ctl_server.c 
b/src/host/trxcon/src/l1ctl_server.c
index 8d57fff..8827900 100644
--- a/src/host/trxcon/src/l1ctl_server.c
+++ b/src/host/trxcon/src/l1ctl_server.c
@@ -206,7 +206,7 @@
talloc_free(client);
 }

-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg)
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct 
l1ctl_server_cfg *cfg)
 {
struct l1ctl_server *server;
int rc;
@@ -239,7 +239,7 @@
return server;
 }

-void l1ctl_server_shutdown(struct l1ctl_server *server)
+void l1ctl_server_free(struct l1ctl_server *server)
 {
LOGP(DL1C, LOGL_NOTICE, "Shutdown L1CTL server\n");

diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 7fa774d..1e12293 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -563,7 +563,7 @@
.conn_close_cb = _conn_close_cb,
};

-   server = l1ctl_server_start(tall_trxcon_ctx, _cfg);
+   server = l1ctl_server_alloc(tall_trxcon_ctx, _cfg);
if (server == NULL) {
rc = EXIT_FAILURE;
goto exit;
@@ -587,7 +587,7 @@

 exit:
if (server != NULL)
-   l1ctl_server_shutdown(server);
+   l1ctl_server_free(server);

/* Deinitialize logging */
log_fini();

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28729
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
Gerrit-Change-Number: 28729
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmocom-bb[master]: trxcon: allocate memory in l1ctl_server_start()

2022-07-22 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28728 )

Change subject: trxcon: allocate memory in l1ctl_server_start()
..

trxcon: allocate memory in l1ctl_server_start()

Calling l1ctl_server_shutdown() whenever the server is not initialized
will result in accessing uninitialized values.  This can happen if we
goto exit before l1ctl_server_start() was called.

Initializing the server with zeroes is not an option, because we need
to initilize llist_head and osmo_fd structures with proper values.

Allocate and initialize struct l1ctl_server in l1ctl_server_start(),
deinitialize and free() in l1ctl_server_shutdown().

Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e
Related: CID#275254
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
M src/host/trxcon/src/l1ctl_server.c
M src/host/trxcon/src/trxcon.c
3 files changed, 16 insertions(+), 13 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
index 84420f2..003d146 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
@@ -24,8 +24,6 @@
 struct l1ctl_server_cfg {
/* UNIX socket path to listen on */
const char *sock_path;
-   /* talloc context to be used for new clients */
-   void *talloc_ctx;
/* maximum number of connected clients */
unsigned int num_clients_max;
/* functions to be called on various events */
@@ -56,8 +54,7 @@
void *priv;
 };

-int l1ctl_server_start(struct l1ctl_server *server,
-  const struct l1ctl_server_cfg *cfg);
+struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg);
 void l1ctl_server_shutdown(struct l1ctl_server *server);

 int l1ctl_client_send(struct l1ctl_client *client, struct msgb *msg);
diff --git a/src/host/trxcon/src/l1ctl_server.c 
b/src/host/trxcon/src/l1ctl_server.c
index 6047bed..8d57fff 100644
--- a/src/host/trxcon/src/l1ctl_server.c
+++ b/src/host/trxcon/src/l1ctl_server.c
@@ -128,7 +128,7 @@
return -ENOMEM;
}

-   client = talloc_zero(server->cfg->talloc_ctx, struct l1ctl_client);
+   client = talloc_zero(server, struct l1ctl_client);
if (client == NULL) {
LOGP(DL1C, LOGL_ERROR, "Failed to allocate an L1CTL client\n");
close(client_fd);
@@ -206,13 +206,16 @@
talloc_free(client);
 }

-int l1ctl_server_start(struct l1ctl_server *server,
-  const struct l1ctl_server_cfg *cfg)
+struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg)
 {
+   struct l1ctl_server *server;
int rc;

LOGP(DL1C, LOGL_NOTICE, "Init L1CTL server (sock_path=%s)\n", 
cfg->sock_path);

+   server = talloc(ctx, struct l1ctl_server);
+   OSMO_ASSERT(server != NULL);
+
*server = (struct l1ctl_server) {
.clients = LLIST_HEAD_INIT(server->clients),
.cfg = cfg,
@@ -230,10 +233,10 @@
LOGP(DL1C, LOGL_ERROR, "Could not create UNIX socket: %s\n",
strerror(errno));
talloc_free(server);
-   return rc;
+   return NULL;
}

-   return 0;
+   return server;
 }

 void l1ctl_server_shutdown(struct l1ctl_server *server)
@@ -254,4 +257,6 @@
close(server->ofd.fd);
server->ofd.fd = -1;
}
+
+   talloc_free(server);
 }
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 9f672e8..7fa774d 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -508,7 +508,7 @@
 int main(int argc, char **argv)
 {
struct l1ctl_server_cfg server_cfg;
-   struct l1ctl_server server;
+   struct l1ctl_server *server = NULL;
int rc = 0;

printf("%s", COPYRIGHT);
@@ -557,14 +557,14 @@
/* Start the L1CTL server */
server_cfg = (struct l1ctl_server_cfg) {
.sock_path = app_data.bind_socket,
-   .talloc_ctx = tall_trxcon_ctx,
.num_clients_max = 1, /* only one connection for now */
.conn_read_cb = _rx_cb,
.conn_accept_cb = _conn_accept_cb,
.conn_close_cb = _conn_close_cb,
};

-   if (l1ctl_server_start(, _cfg) != 0) {
+   server = l1ctl_server_start(tall_trxcon_ctx, _cfg);
+   if (server == NULL) {
rc = EXIT_FAILURE;
goto exit;
}
@@ -586,7 +586,8 @@
osmo_select_main(0);

 exit:
-   l1ctl_server_shutdown();
+   if (server != NULL)
+   l1ctl_server_shutdown(server);

  

Change in osmocom-bb[master]: trxcon: fix NULL pointer dereference in trx_if_open()

2022-07-22 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28727 )

Change subject: trxcon: fix NULL pointer dereference in trx_if_open()
..

trxcon: fix NULL pointer dereference in trx_if_open()

Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Related: CID#275253
---
M src/host/trxcon/src/trx_if.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index dd679f2..d7e28c6 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -704,14 +704,14 @@
/* Try to allocate memory */
trx = talloc_zero(trxcon, struct trx_instance);
if (!trx) {
-   LOGPFSML(trx->fi, LOGL_ERROR, "Failed to allocate memory\n");
+   LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate memory\n");
return NULL;
}

/* Allocate a new dedicated state machine */
trx->fi = osmo_fsm_inst_alloc_child(_fsm, trxcon->fi, 
TRX_EVENT_OFFLINE);
if (trx->fi == NULL) {
-   LOGPFSML(trx->fi, LOGL_ERROR, "Failed to allocate an instance "
+   LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate an 
instance "
"of FSM '%s'\n", trx_fsm.name);
talloc_free(trx);
return NULL;

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28727
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Gerrit-Change-Number: 28727
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmocom-bb[master]: trxcon: call osmo_timer_del() unconditionally

2022-07-22 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28719 )

Change subject: trxcon: call osmo_timer_del() unconditionally
..

trxcon: call osmo_timer_del() unconditionally

osmo_timer_del() does check if a timer is active internally.

Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
---
M src/host/trxcon/src/l1ctl.c
M src/host/trxcon/src/trx_if.c
M src/host/trxcon/src/trxcon.c
3 files changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index 66ddac1..f8faa97 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -186,8 +186,7 @@
trxcon->fbsb_conf_sent = true;

/* Abort FBSB expire timer */
-   if (osmo_timer_pending(>fbsb_timer))
-   osmo_timer_del(>fbsb_timer);
+   osmo_timer_del(>fbsb_timer);

return l1ctl_client_send(l1c, msg);
 }
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index f627de8..dd679f2 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -504,8 +504,7 @@
LOGPFSML(trx->fi, LOGL_INFO, "Response message: '%s'\n", buf);

/* Abort expire timer */
-   if (osmo_timer_pending(>trx_ctrl_timer))
-   osmo_timer_del(>trx_ctrl_timer);
+   osmo_timer_del(>trx_ctrl_timer);

/* Get command for response message */
if (llist_empty(>trx_ctrl_list)) {
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 77f481a..9f672e8 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -364,8 +364,7 @@
if (trxcon->trx != NULL)
trx_if_close(trxcon->trx);

-   if (osmo_timer_pending(>fbsb_timer))
-   osmo_timer_del(>fbsb_timer);
+   osmo_timer_del(>fbsb_timer);

if (trxcon->fi != NULL)
osmo_fsm_inst_free(trxcon->fi);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28719
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
Gerrit-Change-Number: 28719
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in docker-playground[master]: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28733 )


Change subject: ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format
..

ttcn3-cbc: Adapt osmo-cbc 'peer' node to new format

Requires: osmo-cbc.git Change-Id I477568f9b8450ba14c914614fd2391d5486e
Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
---
M ttcn3-cbc-test/osmo-cbc.cfg
1 file changed, 2 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/33/28733/1

diff --git a/ttcn3-cbc-test/osmo-cbc.cfg b/ttcn3-cbc-test/osmo-cbc.cfg
index 4332812..0e131c0 100644
--- a/ttcn3-cbc-test/osmo-cbc.cfg
+++ b/ttcn3-cbc-test/osmo-cbc.cfg
@@ -31,11 +31,9 @@
  sbcap
   local-ip 172.18.27.20
   local-port 29168
- peer ttcn3-bsc
-  protocol cbsp
+ peer cbsp ttcn3-bsc
   remote-port 
   remote-ip 172.18.27.100
- peer ttcn3-mme
-  protocol sbcap
+ peer sbcap ttcn3-mme
   remote-port 9998
   remote-ip 172.18.27.100

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28733
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3654acdf4b68886133af7f418726903f3fee57eb
Gerrit-Change-Number: 28733
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-cbc[master]: cbc_main: Fix setting default SBc-AP local address

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28731 )

Change subject: cbc_main: Fix setting default SBc-AP local address
..

cbc_main: Fix setting default SBc-AP local address

The issue was not spotted until now because until recently
cbc_vty_go_parent was not called due to another bug.

Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
---
M src/cbc_main.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/cbc_main.c b/src/cbc_main.c
index a670722..cd80e31 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -88,7 +88,7 @@
switch (vty->node) {
case SBcAP_NODE:
/* If no local addr set, add a default one: */
-   if (g_cbc->config.sbcap.num_local_host) {
+   if (g_cbc->config.sbcap.num_local_host == 0) {
g_cbc->config.sbcap.local_host[0] = 
talloc_strdup(g_cbc, "127.0.0.1");
g_cbc->config.sbcap.num_local_host = 1;
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28731
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
Gerrit-Change-Number: 28731
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-cbc[master]: cbc_main: Fix setting default SBc-AP local address

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28731 )

Change subject: cbc_main: Fix setting default SBc-AP local address
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28731
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
Gerrit-Change-Number: 28731
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:26:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread laforge
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/pysim/+/28725

to look at the new patch set (#4).

Change subject: Introduce APDU/TPDU trace decoder
..

Introduce APDU/TPDU trace decoder

This introduces a new pySim.apdu module hierarchy, which contains
classes that represent TPDU/APDUs as exchanged between
SIM/UICC/USIM/ISIM card and UE.

It contains instruction level decoders for SELECT, READ BINARY and
friends, and then uses the pySim.filesystem.Runtime{Lchan,State} classes
to keep track of the currently selected EF/DF/ADF for each logical
channel, and uses the file-specific decoder classes of pySim to decode
the actual file content that is being read or written.

This provides a much more meaningful decode of protocol traces than
wireshark will ever be able to give us.

Furthermore, there's the new pySim.apdu_source set of classes which
provides "input plugins" for obtaining APDU traces in a variety of
formats.  So far, GSMTAP UDP live capture and pyshark based RSPRO
live and pcap file reading are imlpemented.

Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Closes: OS#5126
---
M README.md
M contrib/jenkins.sh
A pySim-trace.py
A pySim/apdu/__init__.py
A pySim/apdu/global_platform.py
A pySim/apdu/ts_102_221.py
A pySim/apdu/ts_31_102.py
A pySim/apdu_source/__init__.py
A pySim/apdu_source/gsmtap.py
A pySim/apdu_source/pyshark_rspro.py
A pySim/gsmtap.py
M pySim/ts_31_102.py
M requirements.txt
M setup.py
A tests/test_apdu.py
15 files changed, 1,855 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/28725/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-upf[master]: add osmo-pfcp-tool

2022-07-22 Thread laforge
Attention is currently required from: neels.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/28310 )

Change subject: add osmo-pfcp-tool
..


Patch Set 2:

(1 comment)

Patchset:

PS1:
> commitlog needs at least a paragraph of description about the tool.
still nothing in the commit message.



--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28310
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
Gerrit-Change-Number: 28310
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:19:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in libosmocore[master]: gb/gprs_ns: call osmo_timer_del() unconditionally

2022-07-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/28720 )

Change subject: gb/gprs_ns: call osmo_timer_del() unconditionally
..

gb/gprs_ns: call osmo_timer_del() unconditionally

osmo_timer_del() does check if a timer is active internally.

Change-Id: I3fdfcde33bc6f8a88680ad3f1dde2b6ff8846020
---
M src/gb/gprs_ns.c
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 9f5df8f..e250eda 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -352,8 +352,7 @@
  */
 void gprs_nsvc_delete(struct gprs_nsvc *nsvc)
 {
-   if (osmo_timer_pending(>timer))
-   osmo_timer_del(>timer);
+   osmo_timer_del(>timer);
llist_del(>list);
rate_ctr_group_free(nsvc->ctrg);
osmo_stat_item_group_free(nsvc->statg);
@@ -750,8 +749,7 @@
nsvc->nsei, get_value_string(timer_mode_strs, mode),
seconds);

-   if (osmo_timer_pending(>timer))
-   osmo_timer_del(>timer);
+   osmo_timer_del(>timer);

osmo_gettimeofday(>timer_started, NULL);
nsvc->timer_mode = mode;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28720
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3fdfcde33bc6f8a88680ad3f1dde2b6ff8846020
Gerrit-Change-Number: 28720
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: gb/gprs_ns: call osmo_timer_del() unconditionally

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/28720 )

Change subject: gb/gprs_ns: call osmo_timer_del() unconditionally
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28720
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3fdfcde33bc6f8a88680ad3f1dde2b6ff8846020
Gerrit-Change-Number: 28720
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:18:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: .gitignore: remove non-existing files

2022-07-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/28721 )

Change subject: .gitignore: remove non-existing files
..

.gitignore: remove non-existing files

Change-Id: I7c74a4770cb64520a711a41f4a19fbbf87b78a12
---
M .gitignore
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 0bbe478..dd2d5c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,14 +44,11 @@
 osmo-bsc-*.tar.gz

 # apps and app data
-hlr.sqlite3
 src/utils/bs11_config
 src/ipaccess/ipaccess-config
 src/ipaccess/abisip-find
 src/ipaccess/ipaccess-proxy
 src/utils/isdnsync
-src/osmo-bsc_nat/osmo-bsc_nat
-src/osmo-bsc_nat/*.cfg*
 src/osmo-bsc/osmo-bsc
 src/osmo-bsc/*.cfg*
 src/utils/meas_vis

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28721
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c74a4770cb64520a711a41f4a19fbbf87b78a12
Gerrit-Change-Number: 28721
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: call osmo_timer_del() unconditionally, without osmo_timer_pending()

2022-07-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/28722 )

Change subject: call osmo_timer_del() unconditionally, without 
osmo_timer_pending()
..

call osmo_timer_del() unconditionally, without osmo_timer_pending()

osmo_timer_del() does check if a timer is active internally.

Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
---
M src/osmo-bsc/acc.c
M tests/acc/acc_test.c
M tests/gsm0408/gsm0408_test.c
3 files changed, 6 insertions(+), 11 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c
index 1f23107..80a3576 100644
--- a/src/osmo-bsc/acc.c
+++ b/src/osmo-bsc/acc.c
@@ -73,9 +73,8 @@
if (!osmo_timer_pending(_mgr->rotate_timer))
osmo_timer_schedule(_mgr->rotate_timer, 
acc_mgr->rotation_time_sec, 0);
} else {
-   /* No rotation needed, disable rotation timer */
-   if (osmo_timer_pending(_mgr->rotate_timer))
-   osmo_timer_del(_mgr->rotate_timer);
+   /* No rotation needed, disable rotation timer (if pending) */
+   osmo_timer_del(_mgr->rotate_timer);
}
 }

@@ -565,8 +564,7 @@
  */
 void acc_ramp_abort(struct acc_ramp *acc_ramp)
 {
-   if (osmo_timer_pending(_ramp->step_timer))
-   osmo_timer_del(_ramp->step_timer);
+   osmo_timer_del(_ramp->step_timer);

acc_mgr_set_len_allowed_ramp(_ramp->bts->acc_mgr, 10);
 }
diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c
index ce3b0cb..887e891 100644
--- a/tests/acc/acc_test.c
+++ b/tests/acc/acc_test.c
@@ -58,10 +58,8 @@
 #define bts_del(bts) _bts_del(bts, __func__)
 static inline void _bts_del(struct gsm_bts *bts, const char *msg)
 {
-   if (osmo_timer_pending(>acc_mgr.rotate_timer))
-   osmo_timer_del(>acc_mgr.rotate_timer);
-   if (osmo_timer_pending(>acc_ramp.step_timer))
-   osmo_timer_del(>acc_ramp.step_timer);
+   osmo_timer_del(>acc_mgr.rotate_timer);
+   osmo_timer_del(>acc_ramp.step_timer);
/* no need to llist_del(>list), we never registered the bts there. 
*/
talloc_free(bts->site_mgr);
fprintf(stderr, "BTS deallocated OK in %s()\n", msg);
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 03b2ee1..999ee80 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -137,8 +137,7 @@
 #define bts_del(bts) _bts_del(bts, __func__)
 static inline void _bts_del(struct gsm_bts *bts, const char *msg)
 {
-   if (osmo_timer_pending(>acc_mgr.rotate_timer))
-   osmo_timer_del(>acc_mgr.rotate_timer);
+   osmo_timer_del(>acc_mgr.rotate_timer);
/* no need to llist_del(>list), we never registered the bts there. 
*/
talloc_free(bts->site_mgr);
printf("BTS deallocated OK in %s()\n", msg);

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
Gerrit-Change-Number: 28722
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: call osmo_timer_del() unconditionally, without osmo_timer_pending()

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/28722 )

Change subject: call osmo_timer_del() unconditionally, without 
osmo_timer_pending()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
Gerrit-Change-Number: 28722
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:18:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: WIP: support TCP/SCTP clients

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28732 )


Change subject: WIP: support TCP/SCTP clients
..

WIP: support TCP/SCTP clients

Change-Id: I3ec54b615b41b56f7a9c64298e3fcaac37f4b60e
---
M include/osmocom/cbc/cbc_peer.h
M include/osmocom/cbc/cbsp_link.h
M include/osmocom/cbc/sbcap_link.h
M src/cbc_main.c
M src/cbc_peer.c
M src/cbc_vty.c
M src/cbsp_link.c
M src/sbcap_link.c
8 files changed, 473 insertions(+), 32 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/32/28732/1

diff --git a/include/osmocom/cbc/cbc_peer.h b/include/osmocom/cbc/cbc_peer.h
index 785ea09..cf2a578 100644
--- a/include/osmocom/cbc/cbc_peer.h
+++ b/include/osmocom/cbc/cbc_peer.h
@@ -19,6 +19,16 @@
CBC_PEER_PROTO_SBcAP
 };

+enum cbc_peer_link_mode {
+   CBC_PEER_LINK_MODE_DISABLED = 0,
+   CBC_PEER_LINK_MODE_SERVER,
+   CBC_PEER_LINK_MODE_CLIENT,
+};
+
+extern const struct value_string cbc_peer_link_mode_names[];
+static inline const char *cbc_peer_link_mode_name(enum cbc_peer_link_mode val)
+{ return get_value_string(cbc_peer_link_mode_names, val); }
+
 struct cbc_peer {
struct llist_head list; /* linked to cbc.peers */
const char *name;
@@ -34,6 +44,7 @@
struct cbc_sabp_link *sabp;
struct cbc_sbcap_link *sbcap;
} link;
+   enum cbc_peer_link_mode link_mode;
 };

 extern const struct value_string cbc_peer_proto_name[];
@@ -44,3 +55,4 @@
 struct cbc_peer *cbc_peer_by_name(const char *name);
 struct cbc_peer *cbc_peer_by_addr_proto(const char *remote_host, uint16_t 
remote_port,
enum cbc_peer_protocol proto);
+int cbc_peer_apply_cfg_chg(struct cbc_peer *peer);
diff --git a/include/osmocom/cbc/cbsp_link.h b/include/osmocom/cbc/cbsp_link.h
index 7fcacdf..ad5fa71 100644
--- a/include/osmocom/cbc/cbsp_link.h
+++ b/include/osmocom/cbc/cbsp_link.h
@@ -30,19 +30,22 @@
 struct cbc_cbsp_link {
/* entry in osmo_cbsp_cbc.links */
struct llist_head list;
-   /* stream server connection for this link */
-   struct osmo_stream_srv *conn;
/* partially received CBSP message (rx completion pending) */
struct msgb *rx_msg;
-
struct osmo_fsm_inst *fi;
-
struct cbc_peer *peer;
+   bool is_client;
+   union {
+   struct osmo_stream_srv *srv_conn;
+   struct osmo_stream_cli *cli_conn;
+   void *conn; /* used when we just care about the pointer */
+   };
 };

 struct cbc_cbsp_link *cbc_cbsp_link_alloc(struct cbc_cbsp_mgr *cbc, struct 
cbc_peer *peer);
 void cbc_cbsp_link_free(struct cbc_cbsp_link *link);
 const char *cbc_cbsp_link_name(const struct cbc_cbsp_link *link);
+int cbc_cbsp_link_open_cli(struct cbc_cbsp_link *link);
 void cbc_cbsp_link_tx(struct cbc_cbsp_link *link, struct osmo_cbsp_decoded 
*cbsp);
 void cbc_cbsp_link_close(struct cbc_cbsp_link *link);
 int cbc_cbsp_link_rx_cb(struct cbc_cbsp_link *link, struct osmo_cbsp_decoded 
*dec);
diff --git a/include/osmocom/cbc/sbcap_link.h b/include/osmocom/cbc/sbcap_link.h
index 5946544..6185e3d 100644
--- a/include/osmocom/cbc/sbcap_link.h
+++ b/include/osmocom/cbc/sbcap_link.h
@@ -32,15 +32,20 @@
 struct cbc_sbcap_link {
/* entry in osmo_sbcap_cbc.links */
struct llist_head list;
-   /* stream server connection for this link */
-   struct osmo_stream_srv *conn;
struct osmo_fsm_inst *fi;
struct cbc_peer *peer;
+   bool is_client;
+   union {
+   struct osmo_stream_srv *srv_conn;
+   struct osmo_stream_cli *cli_conn;
+   void *conn; /* used when we just care about the pointer */
+   };
 };

 struct cbc_sbcap_link *cbc_sbcap_link_alloc(struct cbc_sbcap_mgr *cbc, struct 
cbc_peer *peer);
 void cbc_sbcap_link_free(struct cbc_sbcap_link *link);
 const char *cbc_sbcap_link_name(const struct cbc_sbcap_link *link);
+int cbc_sbcap_link_open_cli(struct cbc_sbcap_link *link);
 void cbc_sbcap_link_tx(struct cbc_sbcap_link *link, SBcAP_SBC_AP_PDU_t *pdu);
 void cbc_sbcap_link_close(struct cbc_sbcap_link *link);
 int cbc_sbcap_link_rx_cb(struct cbc_sbcap_link *link, SBcAP_SBC_AP_PDU_t *pdu);
diff --git a/src/cbc_main.c b/src/cbc_main.c
index cd80e31..4198383 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -50,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 

 static void *tall_cbc_ctx;
 struct cbc *g_cbc;
@@ -95,6 +96,11 @@
vty->node = CONFIG_NODE;
vty->index = NULL;
break;
+   case PEER_NODE:
+   cbc_peer_apply_cfg_chg((struct cbc_peer *)vty->index);
+   vty->node = CONFIG_NODE;
+   vty->index = NULL;
+   break;
default:
vty->node = CONFIG_NODE;
vty->index = NULL;
@@ -276,6 +282,7 @@
exit(1);

Change in osmo-bsc[master]: .gitignore: remove non-existing files

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/28721 )

Change subject: .gitignore: remove non-existing files
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28721
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c74a4770cb64520a711a41f4a19fbbf87b78a12
Gerrit-Change-Number: 28721
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:18:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: cbc_main: Fix setting default SBc-AP local address

2022-07-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28731 )


Change subject: cbc_main: Fix setting default SBc-AP local address
..

cbc_main: Fix setting default SBc-AP local address

The issue was not spotted until now because until recently
cbc_vty_go_parent was not called due to another bug.

Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
---
M src/cbc_main.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/31/28731/1

diff --git a/src/cbc_main.c b/src/cbc_main.c
index a670722..cd80e31 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -88,7 +88,7 @@
switch (vty->node) {
case SBcAP_NODE:
/* If no local addr set, add a default one: */
-   if (g_cbc->config.sbcap.num_local_host) {
+   if (g_cbc->config.sbcap.num_local_host == 0) {
g_cbc->config.sbcap.local_host[0] = 
talloc_strdup(g_cbc, "127.0.0.1");
g_cbc->config.sbcap.num_local_host = 1;
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28731
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
Gerrit-Change-Number: 28731
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-bts[master]: osmo-bts-trx: call osmo_timer_del() unconditionally

2022-07-22 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/28723 )

Change subject: osmo-bts-trx: call osmo_timer_del() unconditionally
..

osmo-bts-trx: call osmo_timer_del() unconditionally

osmo_timer_del() does check if a timer is active internally.

Change-Id: I16dca28120061ffc1f118d1e4a1ea986c1639bf7
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index bff10d7..ba29788 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -685,8 +685,7 @@
LOGPPHI(l1h->phy_inst, DTRX, LOGL_INFO, "Response message: '%s'\n", 
buf);

/* abort timer and send next message, if any */
-   if (osmo_timer_pending(>trx_ctrl_timer))
-   osmo_timer_del(>trx_ctrl_timer);
+   osmo_timer_del(>trx_ctrl_timer);

/* get command for response message */
if (llist_empty(>trx_ctrl_list)) {
@@ -1222,8 +1221,7 @@
l1h->last_acked = NULL;

/* Tx queue is now empty, so there's no point in keeping the retrans 
timer armed: */
-   if (osmo_timer_pending(>trx_ctrl_timer))
-   osmo_timer_del(>trx_ctrl_timer);
+   osmo_timer_del(>trx_ctrl_timer);
 }

 /*! close the TRX for given handle (data + control socket) */

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/28723
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I16dca28120061ffc1f118d1e4a1ea986c1639bf7
Gerrit-Change-Number: 28723
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bts[master]: osmo-bts-trx: call osmo_timer_del() unconditionally

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/28723 )

Change subject: osmo-bts-trx: call osmo_timer_del() unconditionally
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/28723
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I16dca28120061ffc1f118d1e4a1ea986c1639bf7
Gerrit-Change-Number: 28723
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:17:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28729 )

Change subject: trxcon: l1ctl_server_{start,shutdown}() -> 
l1ctl_server_{alloc,free}()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28729
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
Gerrit-Change-Number: 28729
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:17:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: allocate memory in l1ctl_server_start()

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28728 )

Change subject: trxcon: allocate memory in l1ctl_server_start()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28728
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e
Gerrit-Change-Number: 28728
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:17:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: fix NULL pointer dereference in trx_if_open()

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28727 )

Change subject: trxcon: fix NULL pointer dereference in trx_if_open()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28727
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Gerrit-Change-Number: 28727
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:17:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: remove unused #imports in sched_clck.c

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28726 )

Change subject: trxcon: remove unused #imports in sched_clck.c
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28726
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
Gerrit-Change-Number: 28726
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:16:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: call osmo_timer_del() unconditionally

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28719 )

Change subject: trxcon: call osmo_timer_del() unconditionally
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28719
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
Gerrit-Change-Number: 28719
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:16:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: vty: Define peer proto during 'peer' node cmd

2022-07-22 Thread laforge
Attention is currently required from: osmith, pespin, fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28718 )

Change subject: vty: Define peer proto during 'peer' node cmd
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28718
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I477568f9b8450ba14c914614fd2391d5486e
Gerrit-Change-Number: 28718
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 12:16:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread laforge
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/pysim/+/28725

to look at the new patch set (#3).

Change subject: Introduce APDU/TPDU trace decoder
..

Introduce APDU/TPDU trace decoder

This introduces a new pySim.apdu module hierarchy, which contains
classes that represent TPDU/APDUs as exchanged between
SIM/UICC/USIM/ISIM card and UE.

It contains instruction level decoders for SELECT, READ BINARY and
friends, and then uses the pySim.filesystem.Runtime{Lchan,State} classes
to keep track of the currently selected EF/DF/ADF for each logical
channel, and uses the file-specific decoder classes of pySim to decode
the actual file content that is being read or written.

This provides a much more meaningful decode of protocol traces than
wireshark will ever be able to give us.

Furthermore, there's the new pySim.apdu_source set of classes which
provides "input plugins" for obtaining APDU traces in a variety of
formats.  So far, GSMTAP UDP live capture and pyshark based RSPRO
live and pcap file reading are imlpemented.

Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Closes: OS#5126
---
M README.md
A pySim-trace.py
A pySim/apdu/__init__.py
A pySim/apdu/global_platform.py
A pySim/apdu/ts_102_221.py
A pySim/apdu/ts_31_102.py
A pySim/apdu_source/__init__.py
A pySim/apdu_source/gsmtap.py
A pySim/apdu_source/pyshark_rspro.py
A pySim/gsmtap.py
M pySim/ts_31_102.py
M requirements.txt
M setup.py
A tests/test_apdu.py
14 files changed, 1,853 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/28725/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-cbc[master]: vty: Define peer proto during 'peer' node cmd

2022-07-22 Thread pespin
Attention is currently required from: laforge, fixeria.
Hello Jenkins Builder, laforge, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-cbc/+/28718

to look at the new patch set (#2).

Change subject: vty: Define peer proto during 'peer' node cmd
..

vty: Define peer proto during 'peer' node cmd

This way we lock the type (proto) of each peer at creation time.
Otherwise, having the possibility of changing the protocol of the peer
makes all the code too complex and there's no good way to prevent the
protocol from being changed at any time creating unexpected issues.
If the user wants to change the protocol, she can do so by removing the
peer and re-adding it through the VTY with the desired protocol.

Change-Id: I477568f9b8450ba14c914614fd2391d5486e
---
M doc/examples/osmo-cbc/osmo-cbc.cfg
M src/cbc_vty.c
2 files changed, 40 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/18/28718/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28718
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I477568f9b8450ba14c914614fd2391d5486e
Gerrit-Change-Number: 28718
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


Change in docker-playground[master]: ttcn3-cbc: Reorder osmo-cbc.cfg nodes

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28714 )

Change subject: ttcn3-cbc: Reorder osmo-cbc.cfg nodes
..

ttcn3-cbc: Reorder osmo-cbc.cfg nodes

This is the new expected working order.

Related: osmo-cbc.git I7623ea5874552e57764327e94a9c3a4de7b71d67
Change-Id: Ia6f9cb6ac5935b8253521a6bfe11e6905e77523d
---
M ttcn3-cbc-test/osmo-cbc.cfg
1 file changed, 9 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/ttcn3-cbc-test/osmo-cbc.cfg b/ttcn3-cbc-test/osmo-cbc.cfg
index 2c4721b..4332812 100644
--- a/ttcn3-cbc-test/osmo-cbc.cfg
+++ b/ttcn3-cbc-test/osmo-cbc.cfg
@@ -1,7 +1,4 @@
 !
-! OsmoCBC (0.1.0.5-e88e) configuration saved from vty
-!!
-!
 log gsmtap 172.18.27.100
  logging level set-all debug
  logging filter all 1
@@ -25,6 +22,15 @@
 !
 cbc
  unknown-peers reject
+ ecbe
+  local-ip 172.18.27.20
+  local-port 12345
+ cbsp
+  local-ip 172.18.27.20
+  local-port 48049
+ sbcap
+  local-ip 172.18.27.20
+  local-port 29168
  peer ttcn3-bsc
   protocol cbsp
   remote-port 
@@ -33,12 +39,3 @@
   protocol sbcap
   remote-port 9998
   remote-ip 172.18.27.100
- cbsp
-  local-ip 172.18.27.20
-  local-port 48049
- sbcap
-  local-ip 172.18.27.20
-  local-port 29168
- ecbe
-  local-ip 172.18.27.20
-  local-port 12345

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28714
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ia6f9cb6ac5935b8253521a6bfe11e6905e77523d
Gerrit-Change-Number: 28714
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in docker-playground[master]: ttcn3-cbc: Reorder osmo-cbc.cfg nodes

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/28714 )

Change subject: ttcn3-cbc: Reorder osmo-cbc.cfg nodes
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28714
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ia6f9cb6ac5935b8253521a6bfe11e6905e77523d
Gerrit-Change-Number: 28714
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:51:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo_dia2gsup[master]: Bump version: 0.1.1

2022-07-22 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730 )

Change subject: Bump version: 0.1.1
..

Bump version: 0.1.1

Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
---
M debian/changelog
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  daniel: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 6e45d35..1872b56 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+osmo-diameter2gsup (0.1.1) unstable; urgency=medium
+
+  [ Daniel Willmann ]
+  * diameter: Change default bind IP to 127.0.0.8
+
+  [ Alexander Couzens ]
+  * add rebar.lock to define known working dependencies
+  * debian: add missing Build-Depends debhelper
+  * debian: rework packaging
+  * debian: add generate_build_dep.sh to vendor erlang dependencies
+
+ -- Oliver Smith   Fri, 22 Jul 2022 12:48:34 +0200
+
 osmo-diameter2gsup (0.1.0) unstable; urgency=medium

   * Initial release.

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
Gerrit-Change-Number: 28730
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmocom-bb[master]: trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

2022-07-22 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28729 )

Change subject: trxcon: l1ctl_server_{start,shutdown}() -> 
l1ctl_server_{alloc,free}()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28729
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
Gerrit-Change-Number: 28729
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:24:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: allocate memory in l1ctl_server_start()

2022-07-22 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28728 )

Change subject: trxcon: allocate memory in l1ctl_server_start()
..


Patch Set 1: Code-Review+1

(1 comment)

File src/host/trxcon/src/l1ctl_server.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/28728/comment/05497361_e937f94d
PS1, Line 220:  .clients = LLIST_HEAD_INIT(server->clients),
this looks really weird.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28728
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e
Gerrit-Change-Number: 28728
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:24:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo_dia2gsup[master]: Bump version: 0.1.1

2022-07-22 Thread daniel
Attention is currently required from: osmith.
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730 )

Change subject: Bump version: 0.1.1
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
Gerrit-Change-Number: 28730
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:19:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: fix NULL pointer dereference in trx_if_open()

2022-07-22 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28727 )

Change subject: trxcon: fix NULL pointer dereference in trx_if_open()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28727
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Gerrit-Change-Number: 28727
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:18:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: trxcon: remove unused #imports in sched_clck.c

2022-07-22 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28726 )

Change subject: trxcon: remove unused #imports in sched_clck.c
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28726
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
Gerrit-Change-Number: 28726
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:18:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo_dia2gsup[master]: Bump version: 0.1.1

2022-07-22 Thread pespin
Attention is currently required from: osmith, daniel.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730 )

Change subject: Bump version: 0.1.1
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
Gerrit-Change-Number: 28730
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:16:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread laforge
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/pysim/+/28725

to look at the new patch set (#2).

Change subject: Introduce APDU/TPDU trace decoder
..

Introduce APDU/TPDU trace decoder

This introduces a new pySim.apdu module hierarchy, which contains
classes that represent TPDU/APDUs as exchanged between
SIM/UICC/USIM/ISIM card and UE.

It contains instruction level decoders for SELECT, READ BINARY and
friends, and then uses the pySim.filesystem.Runtime{Lchan,State} classes
to keep track of the currently selected EF/DF/ADF for each logical
channel, and uses the file-specific decoder classes of pySim to decode
the actual file content that is being read or written.

This provides a much more meaningful decode of protocol traces than
wireshark will ever be able to give us.

Furthermore, there's the new pySim.apdu_source set of classes which
provides "input plugins" for obtaining APDU traces in a variety of
formats.  So far, GSMTAP UDP live capture and pyshark based RSPRO
live and pcap file reading are imlpemented.

Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Closes: OS#5126
---
M README.md
A pySim-trace.py
A pySim/apdu/__init__.py
A pySim/apdu/global_platform.py
A pySim/apdu/ts_102_221.py
A pySim/apdu/ts_31_102.py
A pySim/apdu_source/__init__.py
A pySim/apdu_source/gsmtap.py
A pySim/apdu_source/pyshark_rspro.py
A pySim/gsmtap.py
M pySim/ts_31_102.py
M requirements.txt
M setup.py
13 files changed, 1,754 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/28725/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-cbc[master]: Fix cbc_vty_go_parent() not being called

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28717 )

Change subject: Fix cbc_vty_go_parent() not being called
..

Fix cbc_vty_go_parent() not being called

Change-Id: I946c503f5a40eafbee6e7fa359781548b74e45a6
---
M src/cbc_main.c
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/src/cbc_main.c b/src/cbc_main.c
index f136ace..a670722 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -116,7 +116,6 @@
.copyright = cbc_copyright,
.go_parent_cb   = cbc_vty_go_parent,
.version = PACKAGE_VERSION,
-   .go_parent_cb = NULL,
.is_config_node = NULL,
 };


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28717
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I946c503f5a40eafbee6e7fa359781548b74e45a6
Gerrit-Change-Number: 28717
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-cbc[master]: Refactor {cbsp,sbcap}_cbc_accept_cb

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28712 )

Change subject: Refactor {cbsp,sbcap}_cbc_accept_cb
..

Refactor {cbsp,sbcap}_cbc_accept_cb

Delay allocating the structures until really needed.
First do checks agains the opened connection, and if an issue is
detected simply close the fd.
Next, fetch or allocate the related peer.
Finally, create the link from the fd.
This makes it easier to add early extra checks later when peers will
contain info on link_mode (client|server|disabled) later on.

Change-Id: Id4f83ec6b0b14e556b1caa9c80e7f68d062fec57
---
M include/osmocom/cbc/cbsp_link.h
M include/osmocom/cbc/sbcap_link.h
M src/cbsp_link.c
M src/cbsp_link_fsm.c
M src/sbcap_link.c
M src/sbcap_link_fsm.c
6 files changed, 139 insertions(+), 80 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/cbc/cbsp_link.h b/include/osmocom/cbc/cbsp_link.h
index 6699222..7fcacdf 100644
--- a/include/osmocom/cbc/cbsp_link.h
+++ b/include/osmocom/cbc/cbsp_link.h
@@ -40,6 +40,8 @@
struct cbc_peer *peer;
 };

+struct cbc_cbsp_link *cbc_cbsp_link_alloc(struct cbc_cbsp_mgr *cbc, struct 
cbc_peer *peer);
+void cbc_cbsp_link_free(struct cbc_cbsp_link *link);
 const char *cbc_cbsp_link_name(const struct cbc_cbsp_link *link);
 void cbc_cbsp_link_tx(struct cbc_cbsp_link *link, struct osmo_cbsp_decoded 
*cbsp);
 void cbc_cbsp_link_close(struct cbc_cbsp_link *link);
diff --git a/include/osmocom/cbc/sbcap_link.h b/include/osmocom/cbc/sbcap_link.h
index a4618e1..5946544 100644
--- a/include/osmocom/cbc/sbcap_link.h
+++ b/include/osmocom/cbc/sbcap_link.h
@@ -38,6 +38,8 @@
struct cbc_peer *peer;
 };

+struct cbc_sbcap_link *cbc_sbcap_link_alloc(struct cbc_sbcap_mgr *cbc, struct 
cbc_peer *peer);
+void cbc_sbcap_link_free(struct cbc_sbcap_link *link);
 const char *cbc_sbcap_link_name(const struct cbc_sbcap_link *link);
 void cbc_sbcap_link_tx(struct cbc_sbcap_link *link, SBcAP_SBC_AP_PDU_t *pdu);
 void cbc_sbcap_link_close(struct cbc_sbcap_link *link);
diff --git a/src/cbsp_link.c b/src/cbsp_link.c
index bc421f2..cd1c308 100644
--- a/src/cbsp_link.c
+++ b/src/cbsp_link.c
@@ -19,6 +19,7 @@
  */

 #include 
+#include 
 #include 
 #include 

@@ -37,6 +38,36 @@
 #include 
 #include 

+struct cbc_cbsp_link *cbc_cbsp_link_alloc(struct cbc_cbsp_mgr *cbc, struct 
cbc_peer *peer)
+{
+   struct cbc_cbsp_link *link;
+
+   link = talloc_zero(cbc, struct cbc_cbsp_link);
+   OSMO_ASSERT(link);
+
+   link->peer = peer;
+
+   link->fi = osmo_fsm_inst_alloc(_link_fsm, link, link, LOGL_DEBUG, 
NULL);
+   if (!link->fi) {
+   LOGPCC(link, LOGL_ERROR, "Unable to allocate FSM\n");
+   talloc_free(link);
+   return NULL;
+   }
+
+   llist_add_tail(>list, >links);
+   return link;
+}
+
+void cbc_cbsp_link_free(struct cbc_cbsp_link *link)
+{
+   if (!link)
+   return;
+   llist_del(>list);
+   if (link->fi)
+   osmo_fsm_inst_free(link->fi);
+   talloc_free(link);
+}
+
 const char *cbc_cbsp_link_name(const struct cbc_cbsp_link *link)
 {
OSMO_ASSERT(link);
@@ -112,10 +143,10 @@
 static int cbsp_cbc_accept_cb(struct osmo_stream_srv_link *srv_link, int fd)
 {
struct cbc_cbsp_mgr *cbc = osmo_stream_srv_link_get_data(srv_link);
-   struct cbc_cbsp_link *link = talloc_zero(cbc, struct cbc_cbsp_link);
+   struct cbc_peer *peer;
+   struct cbc_cbsp_link *link;
char remote_ip[INET6_ADDRSTRLEN], portbuf[6];
int remote_port;
-   OSMO_ASSERT(link);

remote_ip[0] = '\0';
portbuf[0] = '\0';
@@ -124,45 +155,41 @@

LOGP(DCBSP, LOGL_NOTICE, "New CBSP link connection from %s:%u\n", 
remote_ip, remote_port);

-   link->conn = osmo_stream_srv_create(srv_link, srv_link, fd, 
cbsp_cbc_read_cb, cbsp_cbc_closed_cb, link);
-   if (!link->conn) {
-   LOGP(DCBSP, LOGL_ERROR, "Unable to create stream server for 
%s:%d\n",
-   remote_ip, remote_port);
-   talloc_free(link);
-   return -1;
-   }
-   link->fi = osmo_fsm_inst_alloc(_link_fsm, link, link, LOGL_DEBUG, 
NULL);
-   if (!link->fi) {
-   LOGPCC(link, LOGL_ERROR, "Unable to allocate FSM\n");
-   cbc_cbsp_link_close(link);
-   talloc_free(link);
-   return -1;
-   }
-   llist_add_tail(>list, >links);
-
/* Match link to peer */
-   link->peer = cbc_peer_by_addr_proto(remote_ip, remote_port, 
CBC_PEER_PROTO_CBSP);
-   if (!link->peer) {
-   if (g_cbc->config.permit_unknown_peers) {
-   LOGPCC(link, LOGL_NOTICE, "Accepting unknown CBSP peer 
%s:%d\n",
-   

Change in osmo-cbc[master]: Make cbsp,sbcap mgr available in data model

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28716 )

Change subject: Make cbsp,sbcap mgr available in data model
..

Make cbsp,sbcap mgr available in data model

Change-Id: I60c3ded80c38bcf50b831c6e9db719a8d2cba5b1
---
M include/osmocom/cbc/cbc_data.h
M src/cbc_main.c
2 files changed, 11 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/include/osmocom/cbc/cbc_data.h b/include/osmocom/cbc/cbc_data.h
index 16861e7..d96e5ca 100644
--- a/include/osmocom/cbc/cbc_data.h
+++ b/include/osmocom/cbc/cbc_data.h
@@ -42,6 +42,8 @@
 
/*
  * CBC itself
  
*/
+struct cbc_cbsp_mgr;
+struct cbc_sbcap_mgr;

 struct cbc {
struct {
@@ -61,6 +63,13 @@
} ecbe;
} config;

+   struct {
+   struct cbc_cbsp_mgr *mgr;
+   } cbsp;
+   struct {
+   struct cbc_sbcap_mgr *mgr;
+   } sbcap;
+
struct llist_head messages; /* cbc_message.list */
struct llist_head expired_messages; /* cbc_message.list */
struct llist_head peers;/* cbc_peer.list */
diff --git a/src/cbc_main.c b/src/cbc_main.c
index dcc1725..f136ace 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -277,12 +277,12 @@
exit(1);
}

-   if (cbc_cbsp_mgr_create(tall_cbc_ctx) == NULL) {
+   if (!(g_cbc->cbsp.mgr = cbc_cbsp_mgr_create(tall_cbc_ctx))) {
perror("Error binding CBSP port");
exit(1);
}

-   if (cbc_sbcap_mgr_create(tall_cbc_ctx) == NULL) {
+   if (!(g_cbc->sbcap.mgr = cbc_sbcap_mgr_create(tall_cbc_ctx))) {
perror("Error binding SBc-AP port\n");
exit(1);
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28716
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I60c3ded80c38bcf50b831c6e9db719a8d2cba5b1
Gerrit-Change-Number: 28716
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-cbc[master]: cbc_vty: use install_element[_ve](), not install_lib_element[_ve]()

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28715 )

Change subject: cbc_vty: use install_element[_ve](), not 
install_lib_element[_ve]()
..

cbc_vty: use install_element[_ve](), not install_lib_element[_ve]()

As the naming suggests, install_lib_element[_ve]() should be used
for commands registered by libraries.  This API allows to enforce
some rules for command attribute letters and should not be used
by application specific commands.

Change-Id: I8c0c8ac66dfc4fc2b8bf9102fba0df2dd988e7c9
---
M src/cbc_vty.c
1 file changed, 23 insertions(+), 23 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/cbc_vty.c b/src/cbc_vty.c
index 9f2c073..36d646d 100644
--- a/src/cbc_vty.c
+++ b/src/cbc_vty.c
@@ -671,38 +671,38 @@

 void cbc_vty_init(void)
 {
-   install_lib_element_ve(_peers_cmd);
-   install_lib_element_ve(_message_cbs_cmd);
-   install_lib_element_ve(_messages_cbs_cmd);
-   install_lib_element_ve(_messages_etws_cmd);
+   install_element_ve(_peers_cmd);
+   install_element_ve(_message_cbs_cmd);
+   install_element_ve(_messages_cbs_cmd);
+   install_element_ve(_messages_etws_cmd);

-   install_lib_element(CONFIG_NODE, _cbc_cmd);
+   install_element(CONFIG_NODE, _cbc_cmd);
install_node(_node, config_write_cbc);
-   install_lib_element(CBC_NODE, _permit_unknown_peers_cmd);
+   install_element(CBC_NODE, _permit_unknown_peers_cmd);

-   install_lib_element(CBC_NODE, _cbsp_cmd);
+   install_element(CBC_NODE, _cbsp_cmd);
install_node(_node, NULL);
-   install_lib_element(CBSP_NODE, _cbsp_local_ip_cmd);
-   install_lib_element(CBSP_NODE, _cbsp_local_port_cmd);
+   install_element(CBSP_NODE, _cbsp_local_ip_cmd);
+   install_element(CBSP_NODE, _cbsp_local_port_cmd);

-   install_lib_element(CBC_NODE, _ecbe_cmd);
+   install_element(CBC_NODE, _ecbe_cmd);
install_node(_node, NULL);
-   install_lib_element(ECBE_NODE, _ecbe_local_ip_cmd);
-   install_lib_element(ECBE_NODE, _ecbe_local_port_cmd);
+   install_element(ECBE_NODE, _ecbe_local_ip_cmd);
+   install_element(ECBE_NODE, _ecbe_local_port_cmd);

-   install_lib_element(CBC_NODE, _sbcap_cmd);
+   install_element(CBC_NODE, _sbcap_cmd);
install_node(_node, NULL);
-   install_lib_element(SBcAP_NODE, _sbcap_local_ip_cmd);
-   install_lib_element(SBcAP_NODE, _sbcap_no_local_ip_cmd);
-   install_lib_element(SBcAP_NODE, _sbcap_local_port_cmd);
+   install_element(SBcAP_NODE, _sbcap_local_ip_cmd);
+   install_element(SBcAP_NODE, _sbcap_no_local_ip_cmd);
+   install_element(SBcAP_NODE, _sbcap_local_port_cmd);

-   install_lib_element(CBC_NODE, _cbc_peer_cmd);
-   install_lib_element(CBC_NODE, _cbc_no_peer_cmd);
+   install_element(CBC_NODE, _cbc_peer_cmd);
+   install_element(CBC_NODE, _cbc_no_peer_cmd);
install_node(_node, NULL);
-   install_lib_element(PEER_NODE, _peer_proto_cmd);
-   install_lib_element(PEER_NODE, _peer_remote_port_cmd);
-   install_lib_element(PEER_NODE, _peer_no_remote_port_cmd);
-   install_lib_element(PEER_NODE, _peer_remote_ip_cmd);
-   install_lib_element(PEER_NODE, _peer_no_remote_ip_cmd);
+   install_element(PEER_NODE, _peer_proto_cmd);
+   install_element(PEER_NODE, _peer_remote_port_cmd);
+   install_element(PEER_NODE, _peer_no_remote_port_cmd);
+   install_element(PEER_NODE, _peer_remote_ip_cmd);
+   install_element(PEER_NODE, _peer_no_remote_ip_cmd);

 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28715
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I8c0c8ac66dfc4fc2b8bf9102fba0df2dd988e7c9
Gerrit-Change-Number: 28715
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-cbc[master]: cbc_vty: write peer config nodes at the end

2022-07-22 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28713 )

Change subject: cbc_vty: write peer config nodes at the end
..

cbc_vty: write peer config nodes at the end

This way we end up with more "global" configs at the start of the file,
which are read/applied first, and later all the per-peer information,
which is a list of variable length.

Change-Id: I7623ea5874552e57764327e94a9c3a4de7b71d67
---
M src/cbc_vty.c
1 file changed, 13 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve



diff --git a/src/cbc_vty.c b/src/cbc_vty.c
index ddf2891..9f2c073 100644
--- a/src/cbc_vty.c
+++ b/src/cbc_vty.c
@@ -321,11 +321,20 @@
return CMD_SUCCESS;
 }

+static int config_write_ecbe(struct vty *vty);
+static int config_write_cbsp(struct vty *vty);
+static int config_write_sbcap(struct vty *vty);
+static int config_write_peer(struct vty *vty);
+
 static int config_write_cbc(struct vty *vty)
 {
vty_out(vty, "cbc%s", VTY_NEWLINE);
vty_out(vty, " unknown-peers %s%s",
g_cbc->config.permit_unknown_peers ? "accept" : "reject", 
VTY_NEWLINE);
+   config_write_ecbe(vty);
+   config_write_cbsp(vty);
+   config_write_sbcap(vty);
+   config_write_peer(vty);
return CMD_SUCCESS;
 }

@@ -672,24 +681,24 @@
install_lib_element(CBC_NODE, _permit_unknown_peers_cmd);

install_lib_element(CBC_NODE, _cbsp_cmd);
-   install_node(_node, config_write_cbsp);
+   install_node(_node, NULL);
install_lib_element(CBSP_NODE, _cbsp_local_ip_cmd);
install_lib_element(CBSP_NODE, _cbsp_local_port_cmd);

install_lib_element(CBC_NODE, _ecbe_cmd);
-   install_node(_node, config_write_ecbe);
+   install_node(_node, NULL);
install_lib_element(ECBE_NODE, _ecbe_local_ip_cmd);
install_lib_element(ECBE_NODE, _ecbe_local_port_cmd);

install_lib_element(CBC_NODE, _sbcap_cmd);
-   install_node(_node, config_write_sbcap);
+   install_node(_node, NULL);
install_lib_element(SBcAP_NODE, _sbcap_local_ip_cmd);
install_lib_element(SBcAP_NODE, _sbcap_no_local_ip_cmd);
install_lib_element(SBcAP_NODE, _sbcap_local_port_cmd);

install_lib_element(CBC_NODE, _cbc_peer_cmd);
install_lib_element(CBC_NODE, _cbc_no_peer_cmd);
-   install_node(_node, config_write_peer);
+   install_node(_node, NULL);
install_lib_element(PEER_NODE, _peer_proto_cmd);
install_lib_element(PEER_NODE, _peer_remote_port_cmd);
install_lib_element(PEER_NODE, _peer_no_remote_port_cmd);

--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28713
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I7623ea5874552e57764327e94a9c3a4de7b71d67
Gerrit-Change-Number: 28713
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-cbc[master]: Make cbsp,sbcap mgr available in data model

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28716 )

Change subject: Make cbsp,sbcap mgr available in data model
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28716
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I60c3ded80c38bcf50b831c6e9db719a8d2cba5b1
Gerrit-Change-Number: 28716
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:14:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: cbc_vty: write peer config nodes at the end

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28713 )

Change subject: cbc_vty: write peer config nodes at the end
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28713
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I7623ea5874552e57764327e94a9c3a4de7b71d67
Gerrit-Change-Number: 28713
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:14:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: cbc_vty: use install_element[_ve](), not install_lib_element[_ve]()

2022-07-22 Thread pespin
Attention is currently required from: neels, fixeria, dexter.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28715 )

Change subject: cbc_vty: use install_element[_ve](), not 
install_lib_element[_ve]()
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28715
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I8c0c8ac66dfc4fc2b8bf9102fba0df2dd988e7c9
Gerrit-Change-Number: 28715
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:14:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-cbc[master]: Refactor {cbsp,sbcap}_cbc_accept_cb

2022-07-22 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-cbc/+/28712 )

Change subject: Refactor {cbsp,sbcap}_cbc_accept_cb
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28712
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Id4f83ec6b0b14e556b1caa9c80e7f68d062fec57
Gerrit-Change-Number: 28712
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 22 Jul 2022 11:14:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo_dia2gsup[master]: Bump version: 0.1.1

2022-07-22 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730 )

Change subject: Bump version: 0.1.1
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
Once merged, I'll push a 0.1.1 tag pointing to this patch. This will allow 
having osmo-dia2gsup in osmocom:latest.



--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
Gerrit-Change-Number: 28730
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 22 Jul 2022 10:57:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo_dia2gsup[master]: Bump version: 0.1.1

2022-07-22 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730 )


Change subject: Bump version: 0.1.1
..

Bump version: 0.1.1

Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
---
M debian/changelog
1 file changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_dia2gsup 
refs/changes/30/28730/1

diff --git a/debian/changelog b/debian/changelog
index 6e45d35..1872b56 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+osmo-diameter2gsup (0.1.1) unstable; urgency=medium
+
+  [ Daniel Willmann ]
+  * diameter: Change default bind IP to 127.0.0.8
+
+  [ Alexander Couzens ]
+  * add rebar.lock to define known working dependencies
+  * debian: add missing Build-Depends debhelper
+  * debian: rework packaging
+  * debian: add generate_build_dep.sh to vendor erlang dependencies
+
+ -- Oliver Smith   Fri, 22 Jul 2022 12:48:34 +0200
+
 osmo-diameter2gsup (0.1.0) unstable; urgency=medium

   * Initial release.

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I30c104822a96d14f80cad320b801149f38b886b7
Gerrit-Change-Number: 28730
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread fixeria
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/28725 )

Change subject: Introduce APDU/TPDU trace decoder
..


Patch Set 1:

(2 comments)

File pySim/gsmtap.py:

https://gerrit.osmocom.org/c/pysim/+/28725/comment/8960a263_adf7d995
PS1, Line 153: Int8ub
> Well, the check in the code allows us to be more flexible, I think it's one 
> of those situation where […]
One advantage of using Const is that the parser will fail early with a clean 
error message, and not somewhere in the middle with less obvious reason like 
ShortRead. The version check below is done after parsing, so it only works if 
the bytestream was parsed without exceptions. I any case, this is not critical, 
you can keep this unchanged.


File pySim/ts_31_102.py:

https://gerrit.osmocom.org/c/pysim/+/28725/comment/5e0495d8_671c6d30 
PS1, Line 303: # 3gPP TS 31.102 Section 7.5.2.1
> why is it unrelated?  That DataObject is referenced in the tracer: […]
Ah, indeed. Nevermind.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Jul 2022 10:55:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in pysim[master]: Introduce APDU/TPDU trace decoder

2022-07-22 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/28725 )

Change subject: Introduce APDU/TPDU trace decoder
..


Patch Set 1:

(2 comments)

File pySim/gsmtap.py:

https://gerrit.osmocom.org/c/pysim/+/28725/comment/a23abdea_c457679f
PS1, Line 153: Int8ub
> I would use Const(b'\x02') to enforce GSMTAPv2 (GSMTAP_VERSION).
Well, the check in the code allows us to be more flexible, I think it's one of 
those situation where I can't say one is clearly better than the other.


File pySim/ts_31_102.py:

https://gerrit.osmocom.org/c/pysim/+/28725/comment/747256b9_e697db5a
PS1, Line 303: # 3gPP TS 31.102 Section 7.5.2.1
> unrelated?
why is it unrelated?  That DataObject is referenced in the tracer:

pySim/apdu/ts_31_102.py:from pySim.ts_31_102 import SUCI_TlvDataObject



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28725
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I862d93163d495a294364168f7818641e47b18c0a
Gerrit-Change-Number: 28725
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 22 Jul 2022 10:42:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in pysim[master]: ts_31_102: Fix EF_EPSLOCI argument ordering

2022-07-22 Thread laforge
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28711 
)

Change subject: ts_31_102: Fix EF_EPSLOCI argument ordering
..

ts_31_102: Fix EF_EPSLOCI argument ordering

We were invoking the constructor with the description as 4th positional
argument, but that was actually the 'size' argument in this case.

Let's swap the order to be aligned with other file constructors.

Change-Id: I9acee757f096fef0d8bacbec3b52f56267cd52f6
---
M pySim/ts_31_102.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 5df7369..aa36b71 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -860,8 +860,8 @@

 # TS 31.102 Section 4.2.91
 class EF_EPSLOCI(TransparentEF):
-def __init__(self, fid='6fe3', sfid=0x1e, name='EF.EPSLOCI', size=(18, 18),
- desc='EPS Location Information', **kwargs):
+def __init__(self, fid='6fe3', sfid=0x1e, name='EF.EPSLOCI',
+ desc='EPS Location Information', size=(18,18), **kwargs):
 super().__init__(fid, sfid=sfid, name=name, desc=desc, size=size, 
**kwargs)
 upd_status_constr = Enum(
 Byte, updated=0, not_updated=1, roaming_not_allowed=2)



2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28711
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9acee757f096fef0d8bacbec3b52f56267cd52f6
Gerrit-Change-Number: 28711
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmocom-bb[master]: trxcon: allocate memory in l1ctl_server_start()

2022-07-22 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28728 )


Change subject: trxcon: allocate memory in l1ctl_server_start()
..

trxcon: allocate memory in l1ctl_server_start()

Calling l1ctl_server_shutdown() whenever the server is not initialized
will result in accessing uninitialized values.  This can happen if we
goto exit before l1ctl_server_start() was called.

Initializing the server with zeroes is not an option, because we need
to initilize llist_head and osmo_fd structures with proper values.

Allocate and initialize struct l1ctl_server in l1ctl_server_start(),
deinitialize and free() in l1ctl_server_shutdown().

Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e
Related: CID#275254
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
M src/host/trxcon/src/l1ctl_server.c
M src/host/trxcon/src/trxcon.c
3 files changed, 16 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/28/28728/1

diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
index 84420f2..003d146 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
@@ -24,8 +24,6 @@
 struct l1ctl_server_cfg {
/* UNIX socket path to listen on */
const char *sock_path;
-   /* talloc context to be used for new clients */
-   void *talloc_ctx;
/* maximum number of connected clients */
unsigned int num_clients_max;
/* functions to be called on various events */
@@ -56,8 +54,7 @@
void *priv;
 };
 
-int l1ctl_server_start(struct l1ctl_server *server,
-  const struct l1ctl_server_cfg *cfg);
+struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg);
 void l1ctl_server_shutdown(struct l1ctl_server *server);

 int l1ctl_client_send(struct l1ctl_client *client, struct msgb *msg);
diff --git a/src/host/trxcon/src/l1ctl_server.c 
b/src/host/trxcon/src/l1ctl_server.c
index 6047bed..8d57fff 100644
--- a/src/host/trxcon/src/l1ctl_server.c
+++ b/src/host/trxcon/src/l1ctl_server.c
@@ -128,7 +128,7 @@
return -ENOMEM;
}

-   client = talloc_zero(server->cfg->talloc_ctx, struct l1ctl_client);
+   client = talloc_zero(server, struct l1ctl_client);
if (client == NULL) {
LOGP(DL1C, LOGL_ERROR, "Failed to allocate an L1CTL client\n");
close(client_fd);
@@ -206,13 +206,16 @@
talloc_free(client);
 }

-int l1ctl_server_start(struct l1ctl_server *server,
-  const struct l1ctl_server_cfg *cfg)
+struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg)
 {
+   struct l1ctl_server *server;
int rc;

LOGP(DL1C, LOGL_NOTICE, "Init L1CTL server (sock_path=%s)\n", 
cfg->sock_path);

+   server = talloc(ctx, struct l1ctl_server);
+   OSMO_ASSERT(server != NULL);
+
*server = (struct l1ctl_server) {
.clients = LLIST_HEAD_INIT(server->clients),
.cfg = cfg,
@@ -230,10 +233,10 @@
LOGP(DL1C, LOGL_ERROR, "Could not create UNIX socket: %s\n",
strerror(errno));
talloc_free(server);
-   return rc;
+   return NULL;
}

-   return 0;
+   return server;
 }

 void l1ctl_server_shutdown(struct l1ctl_server *server)
@@ -254,4 +257,6 @@
close(server->ofd.fd);
server->ofd.fd = -1;
}
+
+   talloc_free(server);
 }
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 9f672e8..7fa774d 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -508,7 +508,7 @@
 int main(int argc, char **argv)
 {
struct l1ctl_server_cfg server_cfg;
-   struct l1ctl_server server;
+   struct l1ctl_server *server = NULL;
int rc = 0;

printf("%s", COPYRIGHT);
@@ -557,14 +557,14 @@
/* Start the L1CTL server */
server_cfg = (struct l1ctl_server_cfg) {
.sock_path = app_data.bind_socket,
-   .talloc_ctx = tall_trxcon_ctx,
.num_clients_max = 1, /* only one connection for now */
.conn_read_cb = _rx_cb,
.conn_accept_cb = _conn_accept_cb,
.conn_close_cb = _conn_close_cb,
};

-   if (l1ctl_server_start(, _cfg) != 0) {
+   server = l1ctl_server_start(tall_trxcon_ctx, _cfg);
+   if (server == NULL) {
rc = EXIT_FAILURE;
goto exit;
}
@@ -586,7 +586,8 @@
osmo_select_main(0);

 exit:
-   l1ctl_server_shutdown();
+   if (server != NULL)
+   l1ctl_server_shutdown(server);

/* Deinitialize logging */

Change in osmocom-bb[master]: trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

2022-07-22 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28729 )


Change subject: trxcon: l1ctl_server_{start,shutdown}() -> 
l1ctl_server_{alloc,free}()
..

trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()

l1ctl_server_start() does not actually start the server, it simply
allocates memory and initializes it.  l1ctl_server_shutdown() does
the opposite.  Let's use more precise symbol names.

Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
M src/host/trxcon/src/l1ctl_server.c
M src/host/trxcon/src/trxcon.c
3 files changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/28729/1

diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
index 003d146..94c0a9c 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
@@ -54,8 +54,8 @@
void *priv;
 };

-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg);
-void l1ctl_server_shutdown(struct l1ctl_server *server);
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct 
l1ctl_server_cfg *cfg);
+void l1ctl_server_free(struct l1ctl_server *server);

 int l1ctl_client_send(struct l1ctl_client *client, struct msgb *msg);
 void l1ctl_client_conn_close(struct l1ctl_client *client);
diff --git a/src/host/trxcon/src/l1ctl_server.c 
b/src/host/trxcon/src/l1ctl_server.c
index 8d57fff..8827900 100644
--- a/src/host/trxcon/src/l1ctl_server.c
+++ b/src/host/trxcon/src/l1ctl_server.c
@@ -206,7 +206,7 @@
talloc_free(client);
 }

-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct 
l1ctl_server_cfg *cfg)
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct 
l1ctl_server_cfg *cfg)
 {
struct l1ctl_server *server;
int rc;
@@ -239,7 +239,7 @@
return server;
 }

-void l1ctl_server_shutdown(struct l1ctl_server *server)
+void l1ctl_server_free(struct l1ctl_server *server)
 {
LOGP(DL1C, LOGL_NOTICE, "Shutdown L1CTL server\n");

diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 7fa774d..1e12293 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -563,7 +563,7 @@
.conn_close_cb = _conn_close_cb,
};

-   server = l1ctl_server_start(tall_trxcon_ctx, _cfg);
+   server = l1ctl_server_alloc(tall_trxcon_ctx, _cfg);
if (server == NULL) {
rc = EXIT_FAILURE;
goto exit;
@@ -587,7 +587,7 @@

 exit:
if (server != NULL)
-   l1ctl_server_shutdown(server);
+   l1ctl_server_free(server);

/* Deinitialize logging */
log_fini();

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28729
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
Gerrit-Change-Number: 28729
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmocom-bb[master]: trxcon: fix NULL pointer dereference in trx_if_open()

2022-07-22 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28727 )


Change subject: trxcon: fix NULL pointer dereference in trx_if_open()
..

trxcon: fix NULL pointer dereference in trx_if_open()

Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Related: CID#275253
---
M src/host/trxcon/src/trx_if.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/27/28727/1

diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index dd679f2..d7e28c6 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -704,14 +704,14 @@
/* Try to allocate memory */
trx = talloc_zero(trxcon, struct trx_instance);
if (!trx) {
-   LOGPFSML(trx->fi, LOGL_ERROR, "Failed to allocate memory\n");
+   LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate memory\n");
return NULL;
}

/* Allocate a new dedicated state machine */
trx->fi = osmo_fsm_inst_alloc_child(_fsm, trxcon->fi, 
TRX_EVENT_OFFLINE);
if (trx->fi == NULL) {
-   LOGPFSML(trx->fi, LOGL_ERROR, "Failed to allocate an instance "
+   LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate an 
instance "
"of FSM '%s'\n", trx_fsm.name);
talloc_free(trx);
return NULL;

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28727
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Gerrit-Change-Number: 28727
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmocom-bb[master]: trxcon: remove unused #imports in sched_clck.c

2022-07-22 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28726 )


Change subject: trxcon: remove unused #imports in sched_clck.c
..

trxcon: remove unused #imports in sched_clck.c

Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
---
M src/host/trxcon/src/sched_clck.c
1 file changed, 0 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/28726/1

diff --git a/src/host/trxcon/src/sched_clck.c b/src/host/trxcon/src/sched_clck.c
index 9c77382..7ac83e2 100644
--- a/src/host/trxcon/src/sched_clck.c
+++ b/src/host/trxcon/src/sched_clck.c
@@ -32,15 +32,11 @@

 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 

 #include 
 #include 
-#include 

 #define MAX_FN_SKEW50
 #define TRX_LOSS_FRAMES400

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28726
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
Gerrit-Change-Number: 28726
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


  1   2   >