[S] Change in osmo-msc[master]: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp

2023-12-12 Thread osmith
Attention is currently required from: neels.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35307?usp=email )

Change subject: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp
..


Patch Set 2:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-msc/+/35307/comment/4fa8d9ab_04d75cad
PS2, Line 30: Depends: osmo-mgw If58590bda8627519ff07e0b6f43aa47a274f052b
update TODO-RELEASE?



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
Gerrit-Change-Number: 35307
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 13 Dec 2023 07:51:39 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35345?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 35345
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:02:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35344?usp=email )

Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
Gerrit-Change-Number: 35344
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:02:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35343?usp=email )

Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
Gerrit-Change-Number: 35343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:02:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: Bump version: 1.11.0.3-240b2 → 1.11.1

2023-12-12 Thread fixeria
Attention is currently required from: dexter, osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35342?usp=email )

Change subject: Bump version: 1.11.0.3-240b2 → 1.11.1
..


Patch Set 1: Code-Review+1

(1 comment)

Patchset:

PS1:
> add -2 to block until the osmo-pcu, osmo-bts, osmo-bsc releases are tested 
> together
I cannot test this one because I don't have an RBS BTS. Maybe 
@pma...@sysmocom.de?



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Ifd79073966bd945ce8c330b5dd94f5406b887bc7
Gerrit-Change-Number: 35342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:01:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35341?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I4b58912ad7be3070829614853901aa19108ba2c0
Gerrit-Change-Number: 35341
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:01:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35340?usp=email )

Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Iebb3a634fee680bdc3636a61f3ccaa1e97e54a64
Gerrit-Change-Number: 35340
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:00:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35339?usp=email )

Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I23df067df99b76048667131905c4448d32d80640
Gerrit-Change-Number: 35339
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 03:00:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: Bump version: 1.7.1.3-6a6a1 → 1.7.2

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35346?usp=email )

Change subject: Bump version: 1.7.1.3-6a6a1 → 1.7.2
..


Patch Set 1: Verified+1 Code-Review+2

(1 comment)

Patchset:

PS1:
I confirm that it works with the upcoming osmo-pcu v1.4.0.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
Gerrit-Change-Number: 35346
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:59:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Bump version: 1.3.1.13-8a4c → 1.4.0

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email )

Change subject: Bump version: 1.3.1.13-8a4c → 1.4.0
..


Patch Set 1: Verified+1 Code-Review+1

(1 comment)

Patchset:

PS1:
I confirm that it works with the upcoming osmo-bts v1.7.2.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5b4efbffc6cf056a1e6865d077da4c7870a7e375
Gerrit-Change-Number: 35337
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:57:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()"

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email )

Change subject: Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()"
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I714efdc9c9403d3ff74e18df1629e2de6876e9d7
Gerrit-Change-Number: 35336
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:56:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_...

2023-12-12 Thread fixeria
Attention is currently required from: laforge, osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email )

Change subject: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()""
..


Patch Set 1: Code-Review+1

(1 comment)

Patchset:

PS1:
We could have avoided having to revert a revert if we branched from master, so 
that we would have cleaner history in master. But I don't want to block here.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idd113e328a693df2e8f2f5d172eaf5bf2bfcf009
Gerrit-Change-Number: 35338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:56:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: Bump version: 1.7.1.3-6a6a1 → 1.7.2

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35346?usp=email )

Change subject: Bump version: 1.7.1.3-6a6a1 → 1.7.2
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
Gerrit-Change-Number: 35346
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:42:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35345?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 35345
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:42:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35344?usp=email )

Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
Gerrit-Change-Number: 35344
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:41:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread fixeria
Attention is currently required from: osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35343?usp=email )

Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
Gerrit-Change-Number: 35343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:40:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: ipa_ccm_tlv_to_unitdata(): free previous string if present before all...

2023-12-12 Thread fixeria
Attention is currently required from: laforge, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35347?usp=email )

Change subject: ipa_ccm_tlv_to_unitdata(): free previous string if present 
before allocating new one
..


Patch Set 1: Code-Review+1

(1 comment)

File src/gsm/ipa.c:

https://gerrit.osmocom.org/c/libosmocore/+/35347/comment/c56b7091_e5d3d24b
PS1, Line 271: in
actually, `out` or even `inout`



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35347?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I66cbd900676875145810ad1d5c07e719311852fb
Gerrit-Change-Number: 35347
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:40:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-mgw[master]: client: safely handle dealloc on event dispatch

2023-12-12 Thread fixeria
Attention is currently required from: neels.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35349?usp=email )

Change subject: client: safely handle dealloc on event dispatch
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35349?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6f1c0f6a26f9cd6993dc1910a44070ec0438e636
Gerrit-Change-Number: 35349
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:37:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: ipa: Use ASP name as ipa_unit_name on dynamic ASPs

2023-12-12 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email )

Change subject: ipa: Use ASP name as ipa_unit_name on dynamic ASPs
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Gerrit-Change-Number: 35348
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 02:36:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-sccp[master]: cosmetic: Fix typo in function doc

2023-12-12 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35335?usp=email )

Change subject: cosmetic: Fix typo in function doc
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35335?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I1c4fe7d1b3a5cdd4c2c9c942e292a7135467d9e2
Gerrit-Change-Number: 35335
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 01:58:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email )

Change subject: client: move some items to internal header
..

client: move some items to internal header

There is an upcoming modification of structs mgcp_msg and mgcp_response.
When it is public API, it needs to be kept backwards compatible.

But no libosmo-mgcp-client caller (in the osmocom-cni world) has used
these structs in years and years. Everyone should use the higher level
osmo_mgcpc_* API only.

Move this legacy API to a private header, so we no longer need to worry
about compatibility there.

Related: OS#6171
Related: I798e02c6663376d3d52f4a74fc4b32411ce95bed
Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187
---
M TODO-RELEASE
M include/osmocom/mgcp_client/mgcp_client.h
M include/osmocom/mgcp_client/mgcp_client_internal.h
M src/libosmo-mgcp-client/mgcp_client_fsm.c
4 files changed, 99 insertions(+), 65 deletions(-)

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




diff --git a/TODO-RELEASE b/TODO-RELEASE
index c5a3b36..82368ff 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -24,3 +24,14 @@
 # If any interfaces have been removed or changed since the last public 
release, a=0.
 #
 #library   whatdescription / commit summary line
+libosmo-mgcp-clientremove public API   These public API items have not 
been called by any of our osmo-programs
+   for many years. Any sane caller 
of libosmo-mgcp-client should use the
+   higher level osmo_mgcpc_* API 
instead. Move these to a private header:
+   struct mgcp_response_head
+   struct mgcp_response
+   struct mgcp_msg
+   mgcp_response_parse_params()
+   mgcp_client_tx()
+   mgcp_client_cancel()
+   mgcp_msg_gen()
+   mgcp_msg_trans_id()
diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index 9a0611a..a96ae19 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -79,28 +79,6 @@
unsigned int pt;
 };

-struct mgcp_response_head {
-   int response_code;
-   mgcp_trans_id_t trans_id;
-   char comment[MGCP_COMMENT_MAXLEN];
-   char conn_id[MGCP_CONN_ID_MAXLEN];
-   char endpoint[MGCP_ENDPOINT_MAXLEN];
-   bool x_osmo_osmux_use;
-   uint8_t x_osmo_osmux_cid;
-};
-
-struct mgcp_response {
-   char *body;
-   struct mgcp_response_head head;
-   uint16_t audio_port;
-   char audio_ip[INET6_ADDRSTRLEN];
-   unsigned int ptime;
-   enum mgcp_codecs codecs[MGCP_MAX_CODECS];
-   unsigned int codecs_len;
-   struct ptmap ptmap[MGCP_MAX_CODECS];
-   unsigned int ptmap_len;
-};
-
 enum mgcp_verb {
MGCP_VERB_CRCX,
MGCP_VERB_MDCX,
@@ -109,37 +87,6 @@
MGCP_VERB_RSIP,
 };

-#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001
-#define MGCP_MSG_PRESENCE_CALL_ID  0x0002
-#define MGCP_MSG_PRESENCE_CONN_ID  0x0004
-#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008
-#define MGCP_MSG_PRESENCE_AUDIO_PORT   0x0010
-#define MGCP_MSG_PRESENCE_CONN_MODE0x0020
-#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000
-#define MGCP_MSG_PRESENCE_X_OSMO_IGN   0x8000
-
-struct mgcp_msg {
-   enum mgcp_verb verb;
-   /* See MGCP_MSG_PRESENCE_* constants */
-   uint32_t presence;
-   char endpoint[MGCP_ENDPOINT_MAXLEN];
-   unsigned int call_id;
-   char *conn_id;
-   uint16_t audio_port;
-   char *audio_ip;
-   enum mgcp_connection_mode conn_mode;
-   unsigned int ptime;
-   enum mgcp_codecs codecs[MGCP_MAX_CODECS];
-   unsigned int codecs_len;
-   struct ptmap ptmap[MGCP_MAX_CODECS];
-   unsigned int ptmap_len;
-   uint32_t x_osmo_ign;
-   bool x_osmo_osmux_use;
-   int x_osmo_osmux_cid; /* -1 is wildcard */
-   bool param_present;
-   struct mgcp_codec_param param;
-};
-
 struct mgcp_client_conf *mgcp_client_conf_alloc(void *ctx);
 void mgcp_client_conf_init(struct mgcp_client_conf *conf) 
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use mgcp_client_conf_alloc() (or 
even better, switch to the mgcp_client_pool API!)");
 void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf 
*conf);
@@ -161,20 +108,8 @@
 const char *mgcp_client_e1_epname(void *ctx, const struct mgcp_client *mgcp, 
uint8_t trunk_id, uint8_t ts,
  uint8_t rate, uint8_t offset);

-/* Invoked when an MGCP response is received or sending failed.  When 

[S] Change in osmo-mgw[master]: fix possible NULL deref on early media

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email )

Change subject: fix possible NULL deref on early media
..

fix possible NULL deref on early media

end.codec may be NULL, depending on whether a single matching codec
could be found or not, i.e. based on external input. So let's not crash
if an RTP packet arrives while end.codec == NULL.

Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 16 insertions(+), 2 deletions(-)

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




diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 674c096..e37437d 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1514,8 +1514,9 @@
return -1;

/* Handle AMR frame format conversion (octet-aligned vs. 
bandwith-efficient) */
-   if (mc->proto == MGCP_PROTO_RTP &&
-   mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) {
+   if (mc->proto == MGCP_PROTO_RTP
+   && conn_src->end.codec
+   && mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) {
/* Make sure that the incoming AMR frame format matches the 
frame format that the call agent has
 * communicated via SDP when the connection was 
created/modfied. */
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3
Gerrit-Change-Number: 35263
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-mgw[master]: fix possible NULL deref on early media

2023-12-12 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email )

Change subject: fix possible NULL deref on early media
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3
Gerrit-Change-Number: 35263
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 01:55:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: sdp: allow more space for fmtp

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35306?usp=email )

Change subject: sdp: allow more space for fmtp
..

sdp: allow more space for fmtp

In osmo-mgw, we recently chose 256 for maximum fmtp length.
Adjust to that here, too.

Change-Id: Ib9b9608d8d8f7ce34596a950dbc480e8a72ebf97
---
M include/osmocom/msc/sdp_msg.h
1 file changed, 13 insertions(+), 1 deletion(-)

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




diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h
index e62f22b..724440c 100644
--- a/include/osmocom/msc/sdp_msg.h
+++ b/include/osmocom/msc/sdp_msg.h
@@ -25,7 +25,7 @@
/* Like "GSM", "AMR", "EFR", ... */
char subtype_name[16];
unsigned int rate;
-   char fmtp[64];
+   char fmtp[256];
 };

 struct sdp_audio_codecs {

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ib9b9608d8d8f7ce34596a950dbc480e8a72ebf97
Gerrit-Change-Number: 35306
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-msc[master]: test_call: codecs: allow specific PT numbers [2/2]

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35141?usp=email )

Change subject: test_call: codecs: allow specific PT numbers [2/2]
..

test_call: codecs: allow specific PT numbers [2/2]

In msc_vlr_test_call.c, allow to tell MO non-default payload type
numbers in the SDP, to verify that it adopts the other call leg's PT
numbers.

Actually apply the non-default payload type number (AMR=96 instead of
the default of 112 from codec_mapping.c) and see the effects in
msc_vlr_test_call.err.

The diff shows that, as intended, the change in payload type number
should result in modifying the MGW endpoint to change the earlier '112'
to the modified '96' used in this test.

Related: OS#6258
Change-Id: I25df2ed7ad792fbe66dfd0fbf08182c9cf6cfc5b
---
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
2 files changed, 77 insertions(+), 26 deletions(-)

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




diff --git a/tests/msc_vlr/msc_vlr_test_call.c 
b/tests/msc_vlr/msc_vlr_test_call.c
index e67ac7d..9307938 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -1071,9 +1071,9 @@
LIST_END
},
.mt_rx_assigned_codec = "AMR",
-   .mt_tx_sdp_mncc_rtp_create = { "AMR", "GSM-EFR", "GSM", 
"GSM-HR-08" },
-   .mt_tx_sdp_mncc_alert_ind = { "AMR", "GSM-EFR", "GSM", 
"GSM-HR-08" },
-   .mt_tx_sdp_mncc_setup_cnf = { "AMR", "GSM-EFR", "GSM", 
"GSM-HR-08" },
+   .mt_tx_sdp_mncc_rtp_create = { "AMR#96", "GSM-EFR", "GSM", 
"GSM-HR-08" },
+   .mt_tx_sdp_mncc_alert_ind = { "AMR#96", "GSM-EFR", "GSM", 
"GSM-HR-08" },
+   .mt_tx_sdp_mncc_setup_cnf = { "AMR#96", "GSM-EFR", "GSM", 
"GSM-HR-08" },
.mo_tx_sdp_mncc_setup_compl_ind = {},
},
 };
@@ -1146,6 +1146,24 @@
return sb.buf;
 }

+/* Split an input string of "AMR#96" into "AMR" and 96: copy the subtype name 
without the "#96" part to
+ * split_subtype_name_and_pt_nr which must be a char[16]. If pt_nr is 
non-NULL, write the 96 to *pt_nr.
+ */
+static void split_subtype_name_and_pt_nr(char subtype_name_wo_pt[], int 
*pt_nr, const char *input)
+{
+   char *hash;
+   osmo_strlcpy(subtype_name_wo_pt, input, 16);
+   hash = strchr(subtype_name_wo_pt, '#');
+   if (hash) {
+   *hash = '\0';
+   if (pt_nr)
+   *pt_nr = atoi(hash + 1);
+   }
+}
+
+/* Validate that the codecs in sdp_str appear in the order as expected by the 
list of subtype names in expected_codecs.
+ * Ignore any payload type numbers ("#96") in expected_codecs.
+ */
 static bool validate_sdp(const char *func, const char *desc,
 const char *sdp_str, const char * const 
expected_codecs[])
 {
@@ -1159,11 +1177,13 @@

expect_pos = expected_codecs;
foreach_sdp_audio_codec(codec, _codecs) {
+   char subtype_name_wo_pt[16];
if (!*expect_pos) {
BTW("%s: %s: ERROR: did not expect %s", func, desc, 
codec->subtype_name);
return false;
}
-   if (strcmp(*expect_pos, codec->subtype_name)) {
+   split_subtype_name_and_pt_nr(subtype_name_wo_pt, NULL, 
*expect_pos);
+   if (strcmp(subtype_name_wo_pt, codec->subtype_name)) {
BTW("%s: %s: ERROR: mismatch: in idx %d, expect %s, got 
%s", func, desc,
(int)(expect_pos - expected_codecs), *expect_pos, 
codec->subtype_name);
return false;
@@ -1232,6 +1252,8 @@
} \
} while (0)

+/* Compose a valid SDP string from the list of codec subtype names given. If a 
subtype name includes a payload type
+ * number ("AMR#96") then use that PT number in the SDP instead of the default 
from codec_mapping.c. */
 static struct sdp_msg *sdp_from_subtype_names(const char *const *subtype_names)
 {
static struct sdp_msg sdp;
@@ -1239,12 +1261,19 @@
const char *const *subtype_name;
osmo_sockaddr_str_from_str(, "1.2.3.4", 56);
for (subtype_name = subtype_names; *subtype_name; subtype_name++) {
-   const struct codec_mapping *m = 
codec_mapping_by_subtype_name(*subtype_name);
+   char subtype_name_wo_pt[16];
+   const struct codec_mapping *m;
+   struct sdp_audio_codec *ac;
+   int set_pt = -1;
+   split_subtype_name_and_pt_nr(subtype_name_wo_pt, _pt, 
*subtype_name);
+   m = codec_mapping_by_subtype_name(subtype_name_wo_pt);
if (!m) {
BTW("ERROR: unknown subtype_name: %s", *subtype_name);
abort();
}
-   sdp_audio_codecs_add_copy(_codecs, >sdp);
+   

[S] Change in osmo-msc[master]: add comment in codec_mapping.c

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35139?usp=email )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: add comment in codec_mapping.c
..

add comment in codec_mapping.c

Related: OS#6258
Change-Id: I0905a1264cd8f940c7a9964addf241091425fe72
---
M src/libmsc/codec_mapping.c
1 file changed, 11 insertions(+), 0 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/libmsc/codec_mapping.c b/src/libmsc/codec_mapping.c
index 4063514..8eea242 100644
--- a/src/libmsc/codec_mapping.c
+++ b/src/libmsc/codec_mapping.c
@@ -111,6 +111,7 @@
},
{
.sdp = {
+   /* 112 is just what we use by default. The other call 
leg may impose a different number. */
.payload_type = 112,
.subtype_name = "AMR",
.rate = 8000,

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I0905a1264cd8f940c7a9964addf241091425fe72
Gerrit-Change-Number: 35139
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-msc[master]: msc_vlr_test_call: drop misleading log

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35137?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: msc_vlr_test_call: drop misleading log
..

msc_vlr_test_call: drop misleading log

It was true once, but not since "do CN CRCX first"
Ie433db1ba0c46d4b97538a969233c155cefac21c

Related: OS#6258
Change-Id: I94e430e4e5b5bf18dbb155258d82f599ada453e6
---
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
2 files changed, 31 insertions(+), 18 deletions(-)

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




diff --git a/tests/msc_vlr/msc_vlr_test_call.c 
b/tests/msc_vlr/msc_vlr_test_call.c
index 3b91524..1264dfd 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -242,7 +242,7 @@

BTW("a call is initiated");

-   btw("CC SETUP causes CRCX towards CN");
+   btw("CC SETUP causes CRCX towards CN and RAN");
expect_crcx(RTP_TO_CN);
expect_crcx(RTP_TO_RAN);
ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
@@ -262,7 +262,7 @@
OSMO_ASSERT(cc_to_mncc_tx_confirmed);
mncc.callref = mncc_rtp.callref = cc_to_mncc_tx_got_callref;

-   btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to 
RAN");
+   btw("MNCC replies with MNCC_RTP_CREATE");
mncc_sends_to_cc(MNCC_RTP_CREATE, _rtp);

btw("MGW acknowledges the CRCX, triggering Assignment");
@@ -623,7 +623,7 @@

BTW("a call is initiated");

-   btw("CC SETUP causes CRCX towards CN");
+   btw("CC SETUP causes CRCX towards CN and RAN");
expect_crcx(RTP_TO_CN);
expect_crcx(RTP_TO_RAN);
ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
@@ -643,7 +643,7 @@
OSMO_ASSERT(cc_to_mncc_tx_confirmed);
mncc.callref = mncc_rtp.callref = cc_to_mncc_tx_got_callref;

-   btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to 
RAN");
+   btw("MNCC replies with MNCC_RTP_CREATE");
mncc_sends_to_cc(MNCC_RTP_CREATE, _rtp);

btw("MGW acknowledges the CRCX, triggering Assignment");
@@ -720,7 +720,7 @@

BTW("a call is initiated");

-   btw("CC SETUP causes CRCX towards CN");
+   btw("CC SETUP causes CRCX towards CN and RAN");
expect_crcx(RTP_TO_CN);
expect_crcx(RTP_TO_RAN);
ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
@@ -740,7 +740,7 @@
OSMO_ASSERT(cc_to_mncc_tx_confirmed);
mncc.callref = mncc_rtp.callref = cc_to_mncc_tx_got_callref;

-   btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to 
RAN");
+   btw("MNCC replies with MNCC_RTP_CREATE");
mncc_sends_to_cc(MNCC_RTP_CREATE, _rtp);

btw("MGW acknowledges the CRCX, triggering Assignment");
@@ -1232,7 +1232,7 @@
mncc.callref = mncc_rtp.callref = cc_to_mncc_tx_got_callref;
VALIDATE_SDP(cc_to_mncc_tx_last_sdp, t->mo_tx_sdp_mncc_setup_ind);

-   btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to 
RAN");
+   btw("MNCC replies with MNCC_RTP_CREATE");
sdp_str_from_subtype_names(mncc_rtp.sdp, sizeof(mncc_rtp.sdp), 
t->mo_rx_sdp_mncc_rtp_create);
mncc_sends_to_cc(MNCC_RTP_CREATE, _rtp);

diff --git a/tests/msc_vlr/msc_vlr_test_call.err 
b/tests/msc_vlr/msc_vlr_test_call.err
index 5758175..2c090fc 100644
--- a/tests/msc_vlr/msc_vlr_test_call.err
+++ b/tests/msc_vlr/msc_vlr_test_call.err
@@ -275,7 +275,7 @@
 

 - a call is initiated
-- CC SETUP causes CRCX towards CN
+- CC SETUP causes CRCX towards CN and RAN
   MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_SETUP
 DREF 
msc_a(IMSI-90170010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 + rx_from_ms: now used by 2 (cm_service_cc,rx_from_ms)
 DIUCS 
msc_a(IMSI-90170010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 RAN decode: DTAP
@@ -321,7 +321,7 @@
 a=fmtp:112 octet-align=1
 a=ptime:20

-- MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN
+- MNCC replies with MNCC_RTP_CREATE
   MSC <-- MNCC: callref 0x8001: MNCC_RTP_CREATE

 DMNCC trans(CC:INITIATED 
IMSI-90170010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x8001 tid-8) rx MNCC_RTP_CREATE
@@ -1767,7 +1767,7 @@


 - a call is initiated
-- CC SETUP causes CRCX towards CN
+- CC SETUP causes CRCX towards CN and RAN
   MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_SETUP
 DREF 
msc_a(IMSI-90170010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 + rx_from_ms: now used by 2 (cm_service_cc,rx_from_ms)
 DIUCS 

[M] Change in osmo-msc[master]: cc: remove code dup for / fix reading codecs from MNCC

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35305?usp=email )

Change subject: cc: remove code dup for / fix reading codecs from MNCC
..

cc: remove code dup for / fix reading codecs from MNCC

To parse and handle SDP included in incoming MNCC, use rx_mncc_sdp()
everywhere. So now rx_mncc_sdp() is the single implementation for
parsing the SDP string and taking action for codecs if needed.

One current dup of this code has a fall-back to use legacy bearer cap --
absorb that into rx_mncc_sdp(), so that we now also do that fall-back
for all of the incoming MNCC that contains bcap.

This is a cosmetic preparation for implementing MO Re-Assignment to
match MT's codec limitations.

Change-Id: I94ae11654e1f88fbd64361b639a4c583836dc13e
---
M src/libmsc/gsm_04_08_cc.c
M tests/msc_vlr/msc_vlr_test_call.err
2 files changed, 77 insertions(+), 71 deletions(-)

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




diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 31fcb23..fe34127 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -745,15 +745,36 @@
mncc_recvmsg(trans->net, trans, MNCC_SETUP_IND, );
 }

-static void rx_mncc_sdp(struct gsm_trans *trans, uint32_t mncc_msg_type, const 
char *sdp)
+static void rx_mncc_sdp(struct gsm_trans *trans, uint32_t mncc_msg_type, const 
char *sdp,
+   const struct gsm_mncc_bearer_cap *bcap)
 {
-   int rc;
-   if (!sdp[0])
-   return;
-   rc = sdp_msg_from_sdp_str(>cc.remote, sdp);
-   if (rc)
-   LOG_TRANS_CAT(trans, DMNCC, LOGL_ERROR, "rx %s: Failed to parse 
SDP: %d\n",
- get_mncc_name(mncc_msg_type), rc);
+   struct call_leg *cl = trans->msc_a ? trans->msc_a->cc.call_leg : NULL;
+   struct rtp_stream *rtp_cn = cl ? cl->rtp[RTP_TO_CN] : NULL;
+
+   if (sdp[0]) {
+   int rc = sdp_msg_from_sdp_str(>cc.remote, sdp);
+   if (rc)
+   LOG_TRANS_CAT(trans, DMNCC, LOGL_ERROR, "rx %s: Failed 
to parse SDP: %d. Trying anyway.\n",
+ get_mncc_name(mncc_msg_type), rc);
+   }
+
+   /* if there is no SDP information or we failed to parse it, try using 
the Bearer Cap from MNCC, if any. */
+   if (!trans->cc.remote.audio_codecs.count && bcap) {
+   trans->cc.remote = (struct sdp_msg){};
+   trans_cc_set_remote_from_bc(trans, bcap);
+   LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s Bearer Cap: 
remote=%s\n",
+ get_mncc_name(mncc_msg_type), 
sdp_msg_to_str(>cc.remote));
+   }
+
+   if (!trans->cc.remote.audio_codecs.count)
+   LOG_TRANS(trans, LOGL_INFO,
+ "Got no information of remote audio codecs: neither 
SDP nor Bearer Capability. Trying anyway.\n");
+
+   trans_cc_filter_run(trans);
+   if (rtp_cn) {
+   rtp_stream_set_remote_addr_and_codecs(rtp_cn, 
>cc.remote);
+   rtp_stream_commit(rtp_cn);
+   }
 }

 static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
@@ -811,19 +832,10 @@

switch (trans->bearer_cap.transfer) {
case GSM48_BCAP_ITCAP_SPEECH:
-   /* sdp.remote: if SDP is included in the MNCC, take that as 
definitive list of remote audio codecs. */
-   rx_mncc_sdp(trans, setup->msg_type, setup->sdp);
-   /* sdp.remote: if there is no SDP information or we failed to 
parse it, try using the Bearer Capability from
-* MNCC, if any. */
-   if (!trans->cc.remote.audio_codecs.count && (setup->fields & 
MNCC_F_BEARER_CAP)) {
-   trans->cc.remote = (struct sdp_msg){};
-   trans_cc_set_remote_from_bc(trans, >bearer_cap);
-   LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s Bearer 
Cap: remote=%s\n",
- get_mncc_name(setup->msg_type), 
sdp_msg_to_str(>cc.remote));
-   }
-   if (!trans->cc.remote.audio_codecs.count)
-   LOG_TRANS(trans, LOGL_INFO,
- "Got no information of remote audio codecs: 
neither SDP nor Bearer Capability. Trying anyway.\n");
+   /* if SDP is included in the MNCC, take that as definitive list 
of remote audio codecs. */
+   rx_mncc_sdp(trans, setup->msg_type, setup->sdp,
+   (setup->fields & MNCC_F_BEARER_CAP) ? 
>bearer_cap : NULL);
+   /* rx_mncc_sdp() has called trans_cc_filter_run(trans); */
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
@@ -838,14 +850,14 @@
  

[S] Change in osmo-msc[master]: add sdp_audio_codec_to_speech_codec_list()

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35050?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: add sdp_audio_codec_to_speech_codec_list()
..

add sdp_audio_codec_to_speech_codec_list()

Used by I8760feaa8598047369ef8c3ab2673013bac8ac8a to add just a single
codec to a speech codec list, instead of a list.

Change-Id: I6ac23c54bc26939e048ff2df06eb987421cfb1c5
---
M include/osmocom/msc/codec_mapping.h
M src/libmsc/codec_mapping.c
2 files changed, 33 insertions(+), 9 deletions(-)

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




diff --git a/include/osmocom/msc/codec_mapping.h 
b/include/osmocom/msc/codec_mapping.h
index 1232d2d..3b502a9 100644
--- a/include/osmocom/msc/codec_mapping.h
+++ b/include/osmocom/msc/codec_mapping.h
@@ -56,6 +56,7 @@
 struct sdp_audio_codec *sdp_audio_codecs_add_mgcp_codec(struct 
sdp_audio_codecs *ac, enum mgcp_codecs mgcp_codec);
 void sdp_audio_codecs_from_bearer_cap(struct sdp_audio_codecs *ac, const 
struct gsm_mncc_bearer_cap *bc);

+int sdp_audio_codec_to_speech_codec_list(struct gsm0808_speech_codec_list 
*scl, const struct sdp_audio_codec *codec);
 void sdp_audio_codecs_to_speech_codec_list(struct gsm0808_speech_codec_list 
*cl, const struct sdp_audio_codecs *ac);
 void sdp_audio_codecs_from_speech_codec_list(struct sdp_audio_codecs *ac, 
const struct gsm0808_speech_codec_list *cl);

diff --git a/src/libmsc/codec_mapping.c b/src/libmsc/codec_mapping.c
index 114abaa..4063514 100644
--- a/src/libmsc/codec_mapping.c
+++ b/src/libmsc/codec_mapping.c
@@ -414,6 +414,24 @@
}
 }

+/* Append an entry for the given sdp_audio_codec to the 
gsm0808_speech_codec_list.
+ * Return 0 if an entry was added, -ENOENT when there is no mapping to 
gsm0808_speech_codec for the given
+ * sdp_audio_codec, and -ENOSPC when scl is full and nothing could be added. */
+int sdp_audio_codec_to_speech_codec_list(struct gsm0808_speech_codec_list 
*scl, const struct sdp_audio_codec *codec)
+{
+   const struct codec_mapping *m = 
codec_mapping_by_subtype_name(codec->subtype_name);
+   if (!m)
+   return -ENOENT;
+   if (!m->has_gsm0808_speech_codec)
+   return -ENOENT;
+   if (scl->len >= ARRAY_SIZE(scl->codec))
+   return -ENOSPC;
+   scl->codec[scl->len] = m->gsm0808_speech_codec;
+   /* FIXME: apply AMR configuration according to codec->fmtp */
+   scl->len++;
+   return 0;
+}
+
 void sdp_audio_codecs_to_speech_codec_list(struct gsm0808_speech_codec_list 
*scl, const struct sdp_audio_codecs *ac)
 {
const struct sdp_audio_codec *codec;
@@ -421,16 +439,9 @@
*scl = (struct gsm0808_speech_codec_list){};

foreach_sdp_audio_codec(codec, ac) {
-   const struct codec_mapping *m = 
codec_mapping_by_subtype_name(codec->subtype_name);
-   if (!m)
-   continue;
-   if (!m->has_gsm0808_speech_codec)
-   continue;
-   if (scl->len >= ARRAY_SIZE(scl->codec))
+   int rc = sdp_audio_codec_to_speech_codec_list(scl, codec);
+   if (rc == -ENOSPC)
break;
-   scl->codec[scl->len] = m->gsm0808_speech_codec;
-   /* FIXME: apply AMR configuration according to codec->fmtp */
-   scl->len++;
}
 }


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I6ac23c54bc26939e048ff2df06eb987421cfb1c5
Gerrit-Change-Number: 35050
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-msc[master]: implement re-assignment to match codecs

2023-12-12 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35051?usp=email )

Change subject: implement re-assignment to match codecs
..

implement re-assignment to match codecs

This is the last missing piece that allows osmo-msc to make good TFO
codecs choices.

Since the codec_filter, osmo-msc properly gathers codec options and
limitations. But the MO call leg still assigns a voice channel before
getting a response from the MT call leg, and is then stuck with that.

Add the capability to adjust the MO call leg's codec in case the MT side
needs a different codec for TFO.

This is only relevant for 2G; on 3G we always have AMR/IuUP.

For inter-MSC handover, keep the behavior unchanged: offer only the
currently assigned codec to the remote side. Codec-changing HO should be
equally trivial to implement, but that is for another day.

msc_vlr_test_call's codec tests are adjusted to test the new feature in
Ib933554f826c1b4347dfa3f6c4f6fe086be8b133. For now, avoid change in
these tests by validating the first codec in SDP lists only.

Related: OS#6258
Related: osmo-ttcn3-hacks I402ed0523a2a87b83f29c5577b2c828102005d53
Change-Id: I8760feaa8598047369ef8c3ab2673013bac8ac8a
---
M include/osmocom/msc/msc_a.h
M src/libmsc/codec_filter.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/msc_a.c
M src/libmsc/msc_ho.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
7 files changed, 120 insertions(+), 60 deletions(-)

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




diff --git a/include/osmocom/msc/msc_a.h b/include/osmocom/msc/msc_a.h
index 0276d62..4099d4c 100644
--- a/include/osmocom/msc/msc_a.h
+++ b/include/osmocom/msc/msc_a.h
@@ -216,6 +216,7 @@

 int msc_a_ensure_cn_local_rtp(struct msc_a *msc_a, struct gsm_trans *cc_trans);
 int msc_a_try_call_assignment(struct gsm_trans *cc_trans);
+void msc_a_tx_assignment_cmd(struct msc_a *msc_a);

 const char *msc_a_cm_service_type_to_use(struct msc_a *msc_a, enum 
osmo_cm_service_type cm_service_type);

diff --git a/src/libmsc/codec_filter.c b/src/libmsc/codec_filter.c
index a9d93a7..7511f90 100644
--- a/src/libmsc/codec_filter.c
+++ b/src/libmsc/codec_filter.c
@@ -98,46 +98,16 @@
if (remote->audio_codecs.count)
sdp_audio_codecs_intersection(r, >audio_codecs, true);

-#if 0
-   /* Future: If osmo-msc were able to trigger a re-assignment after the 
remote side has picked a codec mismatching
-* the initial Assignment, then this code here would make sense: keep 
the other codecs as available to choose
-* from, but put the currently assigned codec in the first position. So 
far we only offer the single assigned
-* codec, because we have no way to deal with the remote side picking a 
different codec.
-* Another approach would be to postpone assignment until we know the 
codecs from the remote side. */
if (sdp_audio_codec_is_set(a)) {
/* Assignment has completed, the chosen codec should be the 
first of the resulting SDP.
-* Make sure this is actually listed in the result SDP and move 
to first place. */
+* If present, make sure this is listed in first place.
+* If 'select' is NULL, the assigned codec is not present in 
the intersection of possible choices for
+* TFO. Just omit the assigned codec from the filter result, 
and it is the CC code's responsibility to
+* detect this and assign a working codec instead. */
struct sdp_audio_codec *select = sdp_audio_codecs_by_descr(r, 
a);
-
-   if (!select) {
-   /* Not present. Add. */
-   if (sdp_audio_codec_by_payload_type(r, a->payload_type, 
false)) {
-   /* Oh crunch, that payload type number is 
already in use.
-* Find an unused one. */
-   for (a->payload_type = 96; a->payload_type <= 
127; a->payload_type++) {
-   if (!sdp_audio_codec_by_payload_type(r, 
a->payload_type, false))
-   break;
-   }
-
-   if (a->payload_type > 127)
-   return -ENOSPC;
-   }
-   select = sdp_audio_codecs_add_copy(r, a);
-   }
-
-   sdp_audio_codecs_select(r, select);
+   if (select)
+   sdp_audio_codecs_select(r, select);
}
-#else
-   /* Currently, osmo-msc does not trigger re-assignment if the remote 
side has picked a codec that is different
-* from the already assigned codec.
-* So, if locally, 

[M] Change in osmo-msc[master]: cc: remove code dup for / fix reading codecs from MNCC

2023-12-12 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35305?usp=email )

Change subject: cc: remove code dup for / fix reading codecs from MNCC
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I94ae11654e1f88fbd64361b639a4c583836dc13e
Gerrit-Change-Number: 35305
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 01:50:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-msc[master]: implement re-assignment to match codecs

2023-12-12 Thread neels
Attention is currently required from: fixeria.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35051?usp=email )

Change subject: implement re-assignment to match codecs
..


Patch Set 7: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8760feaa8598047369ef8c3ab2673013bac8ac8a
Gerrit-Change-Number: 35051
Gerrit-PatchSet: 7
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 13 Dec 2023 01:49:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp

2023-12-12 Thread neels
Attention is currently required from: laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email )

Change subject: add fmtp string to ptmap: allow all possible fmtp
..


Patch Set 10:

(3 comments)

File include/osmocom/mgcp/fmtp.h:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/09d33fc1_163b5854
PS10, Line 1: #pragma once
> libosmocore is too generic for mgcp specific stuff. […]
ok, will try that


File src/libosmo-mgcp-client/mgcp_client.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/8e78d209_ad654820
PS6, Line 1372: !
> ==
(somehow gerrit lost the right place for this. the == is below.)


File src/libosmo-mgcp-client/mgcp_client.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/3ab13f10_31029c60
PS9, Line 1290: && (mgcp_msg->ptmap[i].codec == 
CODEC_AMR_8000_1
> (fact: the problem with the "&&" at the start of the line instead of 
> appending at the end of last on […]
- it's much more efficient to read the condition with operators at the start.
  at the start, they are in a fixed position, and form a tree structure (akin 
to a file tree view) with the operators as the node bullets.
  With operators at the end, the eye needs to scan around.
- the loss of indent happens only once per logical branch in the condition and 
is only 3 chars...

i would very much like to continue using this structuring in my conditions.



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 10
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: dexter 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 13 Dec 2023 01:46:56 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

2023-12-12 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35334?usp=email )

Change subject: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()
..

vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e
Fixes: CID#322299
---
M src/osmo-bsc/vgcs_fsm.c
1 file changed, 13 insertions(+), 1 deletion(-)

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




diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c
index 37473c5..1f2bbef 100644
--- a/src/osmo-bsc/vgcs_fsm.c
+++ b/src/osmo-bsc/vgcs_fsm.c
@@ -317,8 +317,10 @@
break;
case VGCS_EV_MSC_DTAP:
LOG_CALL(conn, LOGL_DEBUG, "MSC sends DTAP message to 
talker.\n");
-   if (!conn->vgcs_call.talker)
+   if (!conn->vgcs_call.talker) {
msgb_free(data);
+   break;
+   }
rc = 
osmo_fsm_inst_dispatch(conn->vgcs_call.talker->vgcs_chan.fi, VGCS_EV_MSC_DTAP, 
data);
if (rc < 0)
msgb_free(data);

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

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


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: on latest, skip TC_rab_assign_mgw_iuup_addr_chg

2023-12-12 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35350?usp=email )


Change subject: hnbgw: on latest, skip TC_rab_assign_mgw_iuup_addr_chg
..

hnbgw: on latest, skip TC_rab_assign_mgw_iuup_addr_chg

Related: OS#6302
Change-Id: I53f3c67e0cf71cbc6bcc8a8e691b16c871df9d33
---
M hnbgw/HNBGW_Tests.ttcn
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/50/35350/1

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 15fc85f..4bd6d5e 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -2724,7 +2724,10 @@
execute(TC_rab_release());
execute(TC_rab_assign_fail());
execute(TC_rab_assign_mgcp_to());
-   execute(TC_rab_assign_mgw_iuup_addr_chg());
+   if (f_osmo_repo_is("nightly")) {
+   /* The MDCX OK crashes osmo-hnbgw on latest, OS#6302 */
+   execute(TC_rab_assign_mgw_iuup_addr_chg());
+   }
execute(TC_ranap_cs_mo_disconnect());
execute(TC_ranap_ps_mo_disconnect());


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35350?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I53f3c67e0cf71cbc6bcc8a8e691b16c871df9d33
Gerrit-Change-Number: 35350
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[M] Change in libosmo-sccp[master]: ipa: Use ASP name as ipa_unit_name on dynamic ASPs

2023-12-12 Thread laforge
Attention is currently required from: pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email )

Change subject: ipa: Use ASP name as ipa_unit_name on dynamic ASPs
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Gerrit-Change-Number: 35348
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 23:32:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-mgw[master]: client: safely handle dealloc on event dispatch

2023-12-12 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35349?usp=email )


Change subject: client: safely handle dealloc on event dispatch
..

client: safely handle dealloc on event dispatch

See also the long in-code comment.

Related: OS#6302
Change-Id: I6f1c0f6a26f9cd6993dc1910a44070ec0438e636
---
M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
1 file changed, 46 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/49/35349/1

diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 
b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
index 105e54b..6fbfa4d 100644
--- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
@@ -533,10 +533,42 @@
   mgcp_conn_peer_name(ci->got_port_info? >rtp_info : NULL),
   ci->notify.fi ? "" : " (not sending a notification)");

+   /* Below ordering is a delicate decision:
+*
+* We want to
+* - emit the resulting event to ci->notify.fi,
+* - check whether we want to tx the next pending MGCP message.
+* Both these steps may terminate (=deallocate) the ep.
+* So whichever one goes first may cause a use-after-free in the other.
+*
+* When dispatching the FSM event, we don't get an rc indicating 
dealloc of the FSM -- it may deallocate and we
+* cannot tell. The common mechanism for that is 
osmo_fsm_set_dealloc_ctx(OTC_SELECT) and query the still
+* allocated FSM state after termination (here we would check 'if 
(ci->ep != NULL)'), but we cannot assume the
+* caller has actually set up an osmo_fsm_set_dealloc_ctx(). At time of 
writing, e.g. osmo-hnbgw does not use
+* it.
+*
+* In osmo_mgcpc_ep_fsm_check_state_chg_after_response(), we do get an 
rc: false means FSM has terminated.
+* On termination, the ep emits a term event to the FSM's parent.
+* That may cause the notify.fi to be terminated in turn, depending on 
how the caller set things up.
+* So: we cannot store notify.fi before, then call 
osmo_mgcpc_ep_fsm_check_state_chg_after_response(), and then
+* emit the event, because notify.fi may have deallocated. We cannot 
look up whether
+* osmo_mgcpc_ep_cancel_notify() has been called, because ci may have 
deallocated along with ci->ep.
+*
+* We have to skip emitting below success event in case the ep is now 
terminated.
+* - It may be the final DLCX OK: not a problem, 
osmo_mgcpc_ep_ci_dlcx() has no notify args on purpose, so we do
+*   make all callers not set a notify event for DLCX by design. 
notify.fi should always be NULL when the final
+*   DLCX OK terminates the local endpoint state.
+* - It may also be sudden termination due to a bad problem, in which 
case we shouldn't emit success.
+*   The osmo_fsm_inst.parent_term_event should suffice as feedback to 
the caller.
+*/
+
+   if (osmo_mgcpc_ep_fsm_check_state_chg_after_response(ci->ep->fi) == 
false) {
+   /* false means, the ci->ep has been terminated. */
+   return;
+   }
+
if (ci->notify.fi)
osmo_fsm_inst_dispatch(ci->notify.fi, ci->notify.success, 
ci->notify.data);
-
-   osmo_mgcpc_ep_fsm_check_state_chg_after_response(ci->ep->fi);
 }

 /*! Return the MGW's local RTP port information for this connection, i.e. the 
local port that MGW is receiving on, as

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35349?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6f1c0f6a26f9cd6993dc1910a44070ec0438e636
Gerrit-Change-Number: 35349
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[M] Change in libosmo-sccp[master]: ipa: Use ASP name as ipa_unit_name on dynamic ASPs

2023-12-12 Thread pespin
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email

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

The following approvals got outdated and were removed:
Code-Review-1 by pespin, Verified+1 by Jenkins Builder


Change subject: ipa: Use ASP name as ipa_unit_name on dynamic ASPs
..

ipa: Use ASP name as ipa_unit_name on dynamic ASPs

A recent patch fixed a long problem where the ASP name (instead of
expected AS name) was used as ipa_unit_name in IPA based ASPs.
For server side it doesn't matter much, sense anyway the ipa_unit_name
is actually restored on the struct with what's received in IPA GET_RESP
message (see ipa_asp_fsm_wait_id_resp()). So the fix was actually for
the client side in the scenario where a non-dynamic ASP with an assigned
AS was configured in the VTY.

However, dynamic ASPs usually have no assigned AS (because in general it
is really not created/configured, as the ASP is created on the flight).
As a result, the recent patch (see "Fixes" below), broke dynamic ASPs
case because from then one ipa_asp_fsm_start() would fail and terminate
the FSM because ipa_find_as_for_asp() was returning NULL.

So improve the recent patch by applying the previous logic for dynamic
ASPs:
* On the server side, it really doesn't matter since as mentioned, the
  field will be repopulated later on, but allows the code to avoid
  terminating the FSM and hence be brought up and be ready to receive
  clients.
* On the client case, this is how dynamic IPA ASPs were ment to be used
  when they were introduced anyway (use ASP as ipa_unit_id, meaning
  "AS name" == "ASP name").

Furthermore, on the client side, the non-dynamic IPA ASPs need their
bring up be delayed until assigned to an AS, because the AS name is sent
in ipa_unit_name field in Tx IPA ID RESP.
This usually happens at a later point than ASP (FSM) creation, because
first the ASP object is created (through VTY or API) and then assigned
to an AS through osmo_ss7_as_add_asp() usually from a later "asp" vty
command in the "as" node.

Fixes: 65741dca056e3a16973ad156dd4c09760a6a945b
Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Related: SYS#5914
---
M src/osmo_ss7_as.c
M src/xua_asp_fsm.c
M src/xua_asp_fsm.h
3 files changed, 86 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/48/35348/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Gerrit-Change-Number: 35348
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: ipa: Use ASP name as ipa_unit_name on dynamic ASPs

2023-12-12 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email )

Change subject: ipa: Use ASP name as ipa_unit_name on dynamic ASPs
..


Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1:
This is still not fixing the entire problem, because the ASP FSM is started 
during ASP creation in VTY, that means before the AS is created and VTY and 
hence gets assigned to ASP...

We should ideally delay ASP UP until the whole config is read.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Gerrit-Change-Number: 35348
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 12 Dec 2023 17:21:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: Bump version: 1.7.1.3-6a6a1 → 1.7.2

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35346?usp=email )

Change subject: Bump version: 1.7.1.3-6a6a1 → 1.7.2
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
Gerrit-Change-Number: 35346
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:48:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35345?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 35345
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:48:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35344?usp=email )

Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
Gerrit-Change-Number: 35344
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:48:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35343?usp=email )

Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
Gerrit-Change-Number: 35343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:48:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: Bump version: 1.11.0.3-240b2 → 1.11.1

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35342?usp=email )

Change subject: Bump version: 1.11.0.3-240b2 → 1.11.1
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Ifd79073966bd945ce8c330b5dd94f5406b887bc7
Gerrit-Change-Number: 35342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:48:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35341?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I4b58912ad7be3070829614853901aa19108ba2c0
Gerrit-Change-Number: 35341
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35339?usp=email )

Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I23df067df99b76048667131905c4448d32d80640
Gerrit-Change-Number: 35339
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35340?usp=email )

Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Iebb3a634fee680bdc3636a61f3ccaa1e97e54a64
Gerrit-Change-Number: 35340
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Bump version: 1.3.1.13-8a4c → 1.4.0

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email )

Change subject: Bump version: 1.3.1.13-8a4c → 1.4.0
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5b4efbffc6cf056a1e6865d077da4c7870a7e375
Gerrit-Change-Number: 35337
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_...

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email )

Change subject: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()""
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idd113e328a693df2e8f2f5d172eaf5bf2bfcf009
Gerrit-Change-Number: 35338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35334?usp=email )

Change subject: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e
Gerrit-Change-Number: 35334
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()"

2023-12-12 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email )

Change subject: Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()"
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I714efdc9c9403d3ff74e18df1629e2de6876e9d7
Gerrit-Change-Number: 35336
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:47:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: ipa: Use ASP name as ipa_unit_name on dynamic ASPs

2023-12-12 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email )


Change subject: ipa: Use ASP name as ipa_unit_name on dynamic ASPs
..

ipa: Use ASP name as ipa_unit_name on dynamic ASPs

A recent patch fixed a long problem where the ASP name (instead of
expected AS name) was used as ipa_unit_name in IPA based ASPs.
For server side it doesn't matter much, sense anyway the ipa_unit_name
is actually restored on the struct with what's received in IPA GET_RESP
message (see ipa_asp_fsm_wait_id_resp()). So the fix was actually for
the client side in the scenario where a non-dynamic ASP with an assigned
AS was configured in the VTY.

However, dynamic ASPs usually have no assigned AS (because in general it
is really not created/configured, as the ASP is created on the flight).
As a result, the recent patch (see "Fixes" below), broke dynamic ASPs
case because from then one ipa_asp_fsm_start() would fail and terminate
the FSM because ipa_find_as_for_asp() was returning NULL.

So improve the recent patch by applying the previous logic for dynamic
ASPs:
* On the server side, it really doesn't matter since as mentioned, the
  field will be repopulated later on, but allows the code to avoid
terminating the FSM.
* On the client case, this is how dynamic IPA ASPs were mento be used
  when they were introduced anyway.

Fixes: 65741dca056e3a16973ad156dd4c09760a6a945b
Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Related: SYS#5914
---
M src/xua_asp_fsm.c
1 file changed, 48 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/48/35348/1

diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index cc9a13a..6d81ce2 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -1191,24 +1191,33 @@
struct osmo_fsm_inst *fi;
struct ipa_asp_fsm_priv *iafp;
struct osmo_ss7_as *as = ipa_find_as_for_asp(asp);
+   const char *unit_name;

/* allocate as child of AS? */
fi = osmo_fsm_inst_alloc(_asp_fsm, asp, NULL, log_level, 
asp->cfg.name);

-   if (!as) {
-   osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
-   return NULL;
-   }
-
iafp = talloc_zero(fi, struct ipa_asp_fsm_priv);
if (!iafp) {
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
return NULL;
}
+
+   if (as) {
+   unit_name = as->cfg.name;
+   } else if (asp->dyn_allocated) {
+   LOGPFSML(fi, LOGL_INFO, "Dynamic ASP is not assigned to any AS, 
"
+"using ASP name instead of AS name as 
ipa_unit_name\n");
+   unit_name = asp->cfg.name;
+   } else {
+   LOGPFSML(fi, LOGL_ERROR, "ASP is not assigned to any AS, fix 
your config!\n");
+   osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
+   return NULL;
+   }
+
iafp->role = role;
iafp->asp = asp;
iafp->ipa_unit = talloc_zero(iafp, struct ipaccess_unit);
-   iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, as->cfg.name);
+   iafp->ipa_unit->unit_name = talloc_strdup(iafp->ipa_unit, unit_name);
iafp->pong_timer.cb = ipa_pong_timer_cb;
iafp->pong_timer.data = fi;


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35348?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Gerrit-Change-Number: 35348
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-pcu[master]: Bump version: 1.3.1.13-8a4c → 1.4.0

2023-12-12 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email )

Change subject: Bump version: 1.3.1.13-8a4c → 1.4.0
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1:
add -2 to block until the osmo-pcu, osmo-bts, osmo-bsc releases are tested 
together



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5b4efbffc6cf056a1e6865d077da4c7870a7e375
Gerrit-Change-Number: 35337
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:27:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[osmith/1.11.1]: Bump version: 1.11.0.3-240b2 → 1.11.1

2023-12-12 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35342?usp=email )

Change subject: Bump version: 1.11.0.3-240b2 → 1.11.1
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1:
add -2 to block until the osmo-pcu, osmo-bts, osmo-bsc releases are tested 
together



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Ifd79073966bd945ce8c330b5dd94f5406b887bc7
Gerrit-Change-Number: 35342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:27:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bts[osmith/1.7.2]: Bump version: 1.7.1.3-6a6a1 → 1.7.2

2023-12-12 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35346?usp=email )

Change subject: Bump version: 1.7.1.3-6a6a1 → 1.7.2
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1:
add -2 to block until the osmo-pcu, osmo-bts, osmo-bsc releases are tested 
together



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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
Gerrit-Change-Number: 35346
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 12 Dec 2023 16:27:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: ipa_ccm_tlv_to_unitdata(): free previous string if present before all...

2023-12-12 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35347?usp=email )


Change subject: ipa_ccm_tlv_to_unitdata(): free previous string if present 
before allocating new one
..

ipa_ccm_tlv_to_unitdata(): free previous string if present before allocating 
new one

Change-Id: I66cbd900676875145810ad1d5c07e719311852fb
---
M src/gsm/ipa.c
1 file changed, 28 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/35347/1

diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index cd95c6b..40d7098 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -267,34 +267,41 @@
return 0;
 }

+/*! Fill ud struct from tp structure.
+ *  \param[in] ud ipaccess_unit to fill
+ *  \param[in] tp the decoded TLV structure from eg. ID_RESP message
+ *  \returns zero on success, negative on error
+ *
+ * This function expects parameter ud's fields to be initialized to zero if 
not yet set.
+ **/
 int ipa_ccm_tlv_to_unitdata(struct ipaccess_unit *ud,
 const struct tlv_parsed *tp)
 {
int rc = 0;

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_SERNR, 1))
-   ud->serno = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_SERNR));
+   osmo_talloc_replace_string(ud, >serno,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_SERNR));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_UNITNAME, 1))
-   ud->unit_name = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_UNITNAME));
+   osmo_talloc_replace_string(ud, >unit_name,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_UNITNAME));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_LOCATION1, 1))
-   ud->location1 = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_LOCATION1));
+   osmo_talloc_replace_string(ud, >location1,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_LOCATION1));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_LOCATION2, 1))
-   ud->location2 = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_LOCATION2));
+   osmo_talloc_replace_string(ud, >location2,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_LOCATION2));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_EQUIPVERS, 1))
-   ud->equipvers = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_EQUIPVERS));
+   osmo_talloc_replace_string(ud, >equipvers,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_EQUIPVERS));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_SWVERSION, 1))
-   ud->swversion = talloc_strdup(ud, (char *)
-   TLVP_VAL(tp, IPAC_IDTAG_SWVERSION));
+   osmo_talloc_replace_string(ud, >swversion,
+  (char *)TLVP_VAL(tp, 
IPAC_IDTAG_SWVERSION));

if (TLVP_PRES_LEN(tp, IPAC_IDTAG_MACADDR, 17)) {
rc = osmo_macaddr_parse(ud->mac_addr, (char *)

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35347?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35343?usp=email )


Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..

pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

The PCUIF flag PCU_IF_FLAG_SYSMO was originally used by osmo-bts-sysmo
to signal to the PCU that the direct PHY access for the sysmo-bts DSP
should be enabled. With time, support for other BTS models was added and
the flag became a synonym for "direct PHY access", so it makes sense to
rename it to "PCU_IF_FLAG_DIRECT_PHY"

Related: OS#6191
Depends: osmo-pcu.git I29b7b78a3a91d062b9ea3cd72623d30618cd3f0b
Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
(cherry picked from commit 955b7dc637fd7fcea47575b8bf4b65748501952b)
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 20 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/35343/1

diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index b47dc75..a620993 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -40,7 +40,7 @@

 /* flags */
 #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
-#define PCU_IF_FLAG_SYSMO  (1 << 1)/* access PDCH of sysmoBTS directly */
+#define PCU_IF_FLAG_DIRECT_PHY (1 << 1)/* access PHY directly via dedicated 
hardware support */
 #define PCU_IF_FLAG_CS1(1 << 16)
 #define PCU_IF_FLAG_CS2(1 << 17)
 #define PCU_IF_FLAG_CS3(1 << 18)
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index f99c7d2..79b39c4 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -264,7 +264,7 @@
LOGP(DPCU, LOGL_INFO, "BTS is down\n");

if (pcu_direct)
-   info_ind->flags |= PCU_IF_FLAG_SYSMO;
+   info_ind->flags |= PCU_IF_FLAG_DIRECT_PHY;

info_ind->bsic = bts->bsic;
/* RAI */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
Gerrit-Change-Number: 35343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35344?usp=email )


Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..

pcuif_proto: clean up last remains of old PCUIF v10

There are still some remains that are related to the old PCUIF v10
protocol version. Let's clean those up.

Related: OS#5927
Depends: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8
Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
(cherry picked from commit 6ed4a9a1eb83a881897848558ccb85d8b5ac5a28)
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 15 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/35344/1

diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index a620993..15e3e20 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -12,7 +12,6 @@

 /* msg_type */
 #define PCU_IF_MSG_DATA_REQ0x00/* send data to given channel */
-#define PCU_IF_MSG_DATA_CNF0x01/* confirm (e.g. transmission on PCH) */
 #define PCU_IF_MSG_DATA_IND0x02/* receive data from given channel */
 #define PCU_IF_MSG_SUSP_REQ0x03/* BTS forwards GPRS SUSP REQ to PCU */
 #define PCU_IF_MSG_APP_INFO_REQ0x04/* BTS asks PCU to transmit APP 
INFO via PACCH */
@@ -29,8 +28,6 @@

 /* sapi */
 #define PCU_IF_SAPI_RACH   0x01/* channel request on CCCH */
-#define PCU_IF_SAPI_AGCH   0x02/* assignment on AGCH */
-#define PCU_IF_SAPI_PCH0x03/* paging/assignment on PCH */
 #define PCU_IF_SAPI_BCCH   0x04/* SI on BCCH */
 #define PCU_IF_SAPI_PDTCH  0x05/* packet data/control/ccch block */
 #define PCU_IF_SAPI_PRACH  0x06/* packet random access channel */
@@ -256,7 +253,6 @@

union {
struct gsm_pcu_if_data  data_req;
-   struct gsm_pcu_if_data  data_cnf;
struct gsm_pcu_if_data_cnf  data_cnf2;
struct gsm_pcu_if_data  data_ind;
struct gsm_pcu_if_susp_req  susp_req;
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 79b39c4..6116c9e 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -53,8 +53,6 @@

 static const char *sapi_string[] = {
[PCU_IF_SAPI_RACH] ="RACH",
-   [PCU_IF_SAPI_AGCH] ="AGCH",
-   [PCU_IF_SAPI_PCH] = "PCH",
[PCU_IF_SAPI_BCCH] ="BCCH",
[PCU_IF_SAPI_PDTCH] =   "PDTCH",
[PCU_IF_SAPI_PRACH] =   "PRACH",

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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
Gerrit-Change-Number: 35344
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bts[osmith/1.7.2]: Bump version: 1.7.1.3-6a6a1 → 1.7.2

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35346?usp=email )


Change subject: Bump version: 1.7.1.3-6a6a1 → 1.7.2
..

Bump version: 1.7.1.3-6a6a1 → 1.7.2

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/35346/1

diff --git a/debian/changelog b/debian/changelog
index d317627..bf18e97 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+osmo-bts (1.7.2) unstable; urgency=medium
+
+  [ Philipp Maier ]
+  * pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
+  * pcuif_proto: clean up last remains of old PCUIF v10
+  * pcuif_proto: signal BTS model via PCUIF
+
+ -- Oliver Smith   Tue, 12 Dec 2023 16:44:53 +0100
+
 osmo-bts (1.7.1) unstable; urgency=medium

   [ Vadim Yanitskiy ]

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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
Gerrit-Change-Number: 35346
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[M] Change in osmo-bts[osmith/1.7.2]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35345?usp=email )


Change subject: pcuif_proto: signal BTS model via PCUIF
..

pcuif_proto: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU.

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
(cherry picked from commit 4a6a2fdf7ef3f2fd197c1d76fa32d6b6cf231fce)
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 52 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/35345/1

diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index 15e3e20..04936af 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -7,7 +7,7 @@

 #define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"

-#define PCU_IF_VERSION 0x0b
+#define PCU_IF_VERSION 0x0c
 #define TXT_MAX_LEN128

 /* msg_type */
@@ -57,6 +57,17 @@
 #define PCU_IF_ADDR_TYPE_IPV4  0x04/* IPv4 address */
 #define PCU_IF_ADDR_TYPE_IPV6  0x29/* IPv6 address */

+/* BTS model */
+enum gsm_pcuif_bts_model {
+   PCU_IF_BTS_MODEL_UNSPEC,
+   PCU_IF_BTS_MODEL_LC15,
+   PCU_IF_BTS_MODEL_OC2G,
+   PCU_IF_BTS_MODEL_OCTPHY,
+   PCU_IF_BTS_MODEL_SYSMO,
+   PCU_IF_BTS_MODEL_TRX,
+   PCU_IF_BTS_MODEL_RBS,
+};
+
 #define PCU_IF_NUM_NSVC 2
 #define PCU_IF_NUM_TRX 8

@@ -170,6 +181,7 @@
struct in_addr v4;
struct in6_addr v6;
} remote_ip[PCU_IF_NUM_NSVC];
+   uint8_t bts_model; /* enum gsm_pcuif_bts_model */
 } __attribute__ ((packed));

 struct gsm_pcu_if_act_req {
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 6116c9e..048e766 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -230,6 +230,25 @@
}
 }

+static enum gsm_pcuif_bts_model bts_model_from_variant(enum 
gsm_bts_type_variant variant)
+{
+   switch (variant) {
+   case BTS_OSMO_LITECELL15:
+   return PCU_IF_BTS_MODEL_LC15;
+   case BTS_OSMO_OC2G:
+   return PCU_IF_BTS_MODEL_OC2G;
+   case BTS_OSMO_OCTPHY:
+   return PCU_IF_BTS_MODEL_OCTPHY;
+   case BTS_OSMO_SYSMO:
+   return PCU_IF_BTS_MODEL_SYSMO;
+   case BTS_OSMO_TRX:
+   case BTS_OSMO_VIRTUAL:
+   return PCU_IF_BTS_MODEL_TRX;
+   default:
+   return PCU_IF_BTS_MODEL_UNSPEC;
+   }
+}
+
 int pcu_tx_info_ind(void)
 {
struct msgb *msg;
@@ -358,6 +377,8 @@
info_ind_fill_trx(_ind->trx[trx->nr], trx);
}

+   info_ind->bts_model = bts_model_from_variant(bts->variant);
+
return pcu_sock_send(msg);
 }


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

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.2
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 35345
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[osmith/1.11.1]: Bump version: 1.11.0.3-240b2 → 1.11.1

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35342?usp=email )


Change subject: Bump version: 1.11.0.3-240b2 → 1.11.1
..

Bump version: 1.11.0.3-240b2 → 1.11.1

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/35342/1

diff --git a/debian/changelog b/debian/changelog
index d8b5b2e..8bf0362 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+osmo-bsc (1.11.1) unstable; urgency=medium
+
+  [ Philipp Maier ]
+  * pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
+  * pcuif_proto: clean up last remains of old PCUIF v10
+  * pcuif_proto: signal BTS model via PCUIF
+
+ -- Oliver Smith   Tue, 12 Dec 2023 16:53:00 +0100
+
 osmo-bsc (1.11.0) unstable; urgency=medium

   [ Max ]

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Ifd79073966bd945ce8c330b5dd94f5406b887bc7
Gerrit-Change-Number: 35342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: signal BTS model via PCUIF

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35341?usp=email )


Change subject: pcuif_proto: signal BTS model via PCUIF
..

pcuif_proto: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU.

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: I4b58912ad7be3070829614853901aa19108ba2c0
(cherry picked from commit 647bc1e698dae798a25cbe757c53f5a1f2d3df3a)
---
M include/osmocom/bsc/pcuif_proto.h
M src/osmo-bsc/pcu_sock.c
2 files changed, 39 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/41/35341/1

diff --git a/include/osmocom/bsc/pcuif_proto.h 
b/include/osmocom/bsc/pcuif_proto.h
index 1133ca6..33036c3 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -8,7 +8,7 @@

 #define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"

-#define PCU_IF_VERSION 0x0b
+#define PCU_IF_VERSION 0x0c
 #define TXT_MAX_LEN128

 /* msg_type */
@@ -63,6 +63,17 @@
 #define PCU_IF_ADDR_TYPE_IPV4  0x04/* IPv4 address */
 #define PCU_IF_ADDR_TYPE_IPV6  0x29/* IPv6 address */

+/* BTS model */
+enum gsm_pcuif_bts_model {
+   PCU_IF_BTS_MODEL_UNSPEC,
+   PCU_IF_BTS_MODEL_LC15,
+   PCU_IF_BTS_MODEL_OC2G,
+   PCU_IF_BTS_MODEL_OCTPHY,
+   PCU_IF_BTS_MODEL_SYSMO,
+   PCU_IF_BTS_MODEL_TRX,
+   PCU_IF_BTS_MODEL_RBS,
+};
+
 #define PCU_IF_NUM_NSVC 2
 #define PCU_IF_NUM_TRX 8

@@ -176,6 +187,7 @@
struct in_addr v4;
struct in6_addr v6;
} remote_ip[PCU_IF_NUM_NSVC];
+   uint8_t bts_model; /* enum gsm_pcuif_bts_model */
 } __attribute__ ((packed));

 /* E1 CCU connection parameters */
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 24f3c1c..d5fa5b9 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -300,6 +300,14 @@
info_ind_fill_trx(_ind->trx[trx->nr], trx);
}

+   switch (bts->type) {
+   case GSM_BTS_TYPE_RBS2000:
+   info_ind->bts_model = PCU_IF_BTS_MODEL_RBS;
+   break;
+   default:
+   info_ind->bts_model = PCU_IF_BTS_MODEL_UNSPEC;
+   }
+
return pcu_sock_send(bts->network, msg);
 }


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I4b58912ad7be3070829614853901aa19108ba2c0
Gerrit-Change-Number: 35341
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: clean up last remains of old PCUIF v10

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35340?usp=email )


Change subject: pcuif_proto: clean up last remains of old PCUIF v10
..

pcuif_proto: clean up last remains of old PCUIF v10

There are still some remains that are related to the old PCUIF v10
protocol version. Let's clean those up.

Related: OS#5927
Depends: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8
Change-Id: Iebb3a634fee680bdc3636a61f3ccaa1e97e54a64
(cherry picked from commit 801b55ee4ab57fadafc1e7211bb4b0de3e7668b7)
---
M include/osmocom/bsc/pcuif_proto.h
M src/osmo-bsc/pcu_sock.c
2 files changed, 15 insertions(+), 6 deletions(-)



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

diff --git a/include/osmocom/bsc/pcuif_proto.h 
b/include/osmocom/bsc/pcuif_proto.h
index 9df85d9..1133ca6 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -13,7 +13,6 @@

 /* msg_type */
 #define PCU_IF_MSG_DATA_REQ0x00/* send data to given channel */
-#define PCU_IF_MSG_DATA_CNF0x01/* confirm (e.g. transmission on PCH) */
 #define PCU_IF_MSG_DATA_IND0x02/* receive data from given channel */
 #define PCU_IF_MSG_SUSP_REQ0x03/* BTS forwards GPRS SUSP REQ to PCU */
 #define PCU_IF_MSG_APP_INFO_REQ0x04/* BTS asks PCU to transmit APP 
INFO via PACCH */
@@ -35,8 +34,6 @@

 /* sapi */
 #define PCU_IF_SAPI_RACH   0x01/* channel request on CCCH */
-#define PCU_IF_SAPI_AGCH   0x02/* assignment on AGCH */
-#define PCU_IF_SAPI_PCH0x03/* paging/assignment on PCH */
 #define PCU_IF_SAPI_BCCH   0x04/* SI on BCCH */
 #define PCU_IF_SAPI_PDTCH  0x05/* packet data/control/ccch block */
 #define PCU_IF_SAPI_PRACH  0x06/* packet random access channel */
@@ -297,7 +294,6 @@

union {
struct gsm_pcu_if_data  data_req;
-   struct gsm_pcu_if_data  data_cnf;
struct gsm_pcu_if_data_cnf  data_cnf2;
struct gsm_pcu_if_data  data_ind;
struct gsm_pcu_if_susp_req  susp_req;
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index d279093..24f3c1c 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -50,8 +50,6 @@

 static const char *sapi_string[] = {
[PCU_IF_SAPI_RACH] ="RACH",
-   [PCU_IF_SAPI_AGCH] ="AGCH",
-   [PCU_IF_SAPI_PCH] = "PCH",
[PCU_IF_SAPI_BCCH] ="BCCH",
[PCU_IF_SAPI_PDTCH] =   "PDTCH",
[PCU_IF_SAPI_PRACH] =   "PRACH",

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: Iebb3a634fee680bdc3636a61f3ccaa1e97e54a64
Gerrit-Change-Number: 35340
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[osmith/1.11.1]: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35339?usp=email )


Change subject: pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
..

pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY

The PCUIF flag PCU_IF_FLAG_SYSMO was originally used by osmo-bts-sysmo
to signal to the PCU that the direct PHY access for the sysmo-bts DSP
should be enabled. With time, support for other BTS models was added and
the flag became a synonym for "direct PHY access", so it makes sense to
rename it to "PCU_IF_FLAG_DIRECT_PHY"

Related: OS#6191
Depends: osmo-pcu.git I29b7b78a3a91d062b9ea3cd72623d30618cd3f0b
Change-Id: I23df067df99b76048667131905c4448d32d80640
(cherry picked from commit a3a225a16b4a38a9b0c0d34d095389f495d692a9)
---
M include/osmocom/bsc/pcuif_proto.h
M src/osmo-bsc/pcu_sock.c
2 files changed, 20 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/35339/1

diff --git a/include/osmocom/bsc/pcuif_proto.h 
b/include/osmocom/bsc/pcuif_proto.h
index cd2a298..9df85d9 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -46,7 +46,7 @@

 /* flags */
 #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
-#define PCU_IF_FLAG_SYSMO  (1 << 1)/* access PDCH of sysmoBTS directly */
+#define PCU_IF_FLAG_DIRECT_PHY (1 << 1)/* access PHY directly via dedicated 
hardware support */
 #define PCU_IF_FLAG_CS1(1 << 16)
 #define PCU_IF_FLAG_CS2(1 << 17)
 #define PCU_IF_FLAG_CS3(1 << 18)
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index dc2b8e9..d279093 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -200,7 +200,7 @@
info_ind = _prim->u.info_ind;
info_ind->version = PCU_IF_VERSION;
info_ind->flags |= PCU_IF_FLAG_ACTIVE;
-   info_ind->flags |= PCU_IF_FLAG_SYSMO;
+   info_ind->flags |= PCU_IF_FLAG_DIRECT_PHY;

/* RAI */
info_ind->mcc = bts->network->plmn.mcc;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: osmith/1.11.1
Gerrit-Change-Id: I23df067df99b76048667131905c4448d32d80640
Gerrit-Change-Number: 35339
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-pcu[master]: Bump version: 1.3.1.13-8a4c → 1.4.0

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email )


Change subject: Bump version: 1.3.1.13-8a4c → 1.4.0
..

Bump version: 1.3.1.13-8a4c → 1.4.0

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



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

diff --git a/debian/changelog b/debian/changelog
index df278a0..3e50d66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,32 @@
+osmo-pcu (1.4.0) unstable; urgency=medium
+
+  [ Pau Espin Pedrol ]
+  * tbf: Log poll timeout reason
+
+  [ Vadim Yanitskiy ]
+  * pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()
+  * bts: bts_tfi_find_free(): fix -Wmaybe-uninitialized (false positive)
+
+  [ Oliver Smith ]
+  * systemd: remove RestartPreventExitStatus=1
+  * Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()"
+
+  [ Philipp Maier ]
+  * pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
+  * pcuif_proto: drop support for PCUIF v10
+  * pcu_l1_if: signal BTS model via PCUIF
+  * gprs_rlcmac_sched: fix condition for generating dummy blocks on idle
+  * bts: rename struct member gen_idle_blocks to gen_idle_blocks_C0
+
+  [ Andreas Eversberg ]
+  * Increase RR scheduler priority to 20, to avoid dropped bursts
+  * Use uniform log format for default config files
+
+  [ Keith ]
+  * TBF status: Fix VTY output text
+
+ -- Oliver Smith   Tue, 12 Dec 2023 16:58:16 +0100
+
 osmo-pcu (1.3.1) unstable; urgency=medium

   * tbf_dl_fsm: Fix assert hit due to EV_MAX_N3105 received in ST_RELEASING

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35337?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5b4efbffc6cf056a1e6865d077da4c7870a7e375
Gerrit-Change-Number: 35337
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-pcu[master]: Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()"

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email )


Change subject: Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()"
..

Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()"

In preparation for an 1.4.0 osmo-pcu release that should not require a
new libosmocore, revert this patch.

This reverts commit a155fe85de9151d26fdfad7a6593a95592ac9770.

Change-Id: I714efdc9c9403d3ff74e18df1629e2de6876e9d7
---
M TODO-RELEASE
M src/pdch_ul_controller.c
2 files changed, 32 insertions(+), 7 deletions(-)



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

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 73ad83b..cbfda24 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,4 +7,3 @@
 # If any interfaces have been added since the last public release: c:r:a + 1.
 # If any interfaces have been removed or changed since the last public 
release: c:r:0.
 #librarywhatdescription / commit summary line
-libosmocore > 1.9.0added gsm0502_fncmp()
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c
index 661957b..c0e26de 100644
--- a/src/pdch_ul_controller.c
+++ b/src/pdch_ul_controller.c
@@ -17,8 +17,6 @@
 #include 
 #include 

-#include 
-
 #include "pdch_ul_controller.h"
 #include "bts.h"
 #include "sba.h"
@@ -45,6 +43,20 @@
{ 0, NULL }
 };

+#define GSM_MAX_FN_THRESH (GSM_MAX_FN >> 1)
+/* 0: equal, -1: fn1 BEFORE fn2, 1: fn1 AFTER fn2 */
+static inline int fn_cmp(uint32_t fn1, uint32_t fn2)
+{
+   if (fn1 == fn2)
+   return 0;
+   /* FN1 goes before FN2: */
+   if ((fn1 < fn2 && (fn2 - fn1) < GSM_MAX_FN_THRESH) ||
+   (fn1 > fn2 && (fn1 - fn2) > GSM_MAX_FN_THRESH))
+   return -1;
+   /* FN1 goes after FN2: */
+   return 1;
+}
+
 struct pdch_ulc *pdch_ulc_alloc(struct gprs_rlcmac_pdch *pdch, void *ctx)
 {
struct pdch_ulc* ulc;
@@ -66,7 +78,7 @@

while (node) {
it = rb_entry(node, struct pdch_ulc_node, node);
-   res = gsm0502_fncmp(it->fn, fn);
+   res = fn_cmp(it->fn, fn);
if (res > 0) /* it->fn AFTER fn */
node = node->rb_left;
else if (res < 0) /* it->fn BEFORE fn */
@@ -155,7 +167,7 @@

for (node = rb_first(>tree_root); node; node = rb_next(node)) {
it = container_of(node, struct pdch_ulc_node, node);
-   res = gsm0502_fncmp(it->fn, check_fn);
+   res = fn_cmp(it->fn, check_fn);
if (res > 0) { /* it->fn AFTER check_fn */
/* Next reserved FN is passed check_fn, hence it means 
check_fn is free */
return check_fn;
@@ -191,7 +203,7 @@
it = container_of(*n, struct pdch_ulc_node, node);

parent = *n;
-   res = gsm0502_fncmp(item->fn, it->fn);
+   res = fn_cmp(item->fn, it->fn);
if (res < 0) { /* item->fn "BEFORE" it->fn */
n = &((*n)->rb_left);
} else if (res > 0) { /* item->fn "AFTER" it->fn */
@@ -293,7 +305,7 @@
struct rb_node *first;
while ((first = rb_first(>tree_root))) {
item = container_of(first, struct pdch_ulc_node, node);
-   res = gsm0502_fncmp(item->fn, fn);
+   res = fn_cmp(item->fn, fn);
if (res > 0) /* item->fn AFTER fn */
break;
if (res < 0) { /* item->fn BEFORE fn */

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35336?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I714efdc9c9403d3ff74e18df1629e2de6876e9d7
Gerrit-Change-Number: 35336
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-pcu[master]: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_...

2023-12-12 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email )


Change subject: Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to 
gsm0502_fncmp()""
..

Revert "Revert "pdch_ul_controller: migrate from fn_cmp() to gsm0502_fncmp()""

Now that 1.4.0 is released, bring back the patch that was temporarily
reverted to avoid the need for a new libosmocore.

This reverts commit 16729ba72761fc981bcec6d3747d6f7dab4413ca.

Change-Id: Idd113e328a693df2e8f2f5d172eaf5bf2bfcf009
---
M TODO-RELEASE
M src/pdch_ul_controller.c
2 files changed, 21 insertions(+), 18 deletions(-)



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

diff --git a/TODO-RELEASE b/TODO-RELEASE
index cbfda24..73ad83b 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
 # If any interfaces have been added since the last public release: c:r:a + 1.
 # If any interfaces have been removed or changed since the last public 
release: c:r:0.
 #librarywhatdescription / commit summary line
+libosmocore > 1.9.0added gsm0502_fncmp()
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c
index c0e26de..661957b 100644
--- a/src/pdch_ul_controller.c
+++ b/src/pdch_ul_controller.c
@@ -17,6 +17,8 @@
 #include 
 #include 

+#include 
+
 #include "pdch_ul_controller.h"
 #include "bts.h"
 #include "sba.h"
@@ -43,20 +45,6 @@
{ 0, NULL }
 };

-#define GSM_MAX_FN_THRESH (GSM_MAX_FN >> 1)
-/* 0: equal, -1: fn1 BEFORE fn2, 1: fn1 AFTER fn2 */
-static inline int fn_cmp(uint32_t fn1, uint32_t fn2)
-{
-   if (fn1 == fn2)
-   return 0;
-   /* FN1 goes before FN2: */
-   if ((fn1 < fn2 && (fn2 - fn1) < GSM_MAX_FN_THRESH) ||
-   (fn1 > fn2 && (fn1 - fn2) > GSM_MAX_FN_THRESH))
-   return -1;
-   /* FN1 goes after FN2: */
-   return 1;
-}
-
 struct pdch_ulc *pdch_ulc_alloc(struct gprs_rlcmac_pdch *pdch, void *ctx)
 {
struct pdch_ulc* ulc;
@@ -78,7 +66,7 @@

while (node) {
it = rb_entry(node, struct pdch_ulc_node, node);
-   res = fn_cmp(it->fn, fn);
+   res = gsm0502_fncmp(it->fn, fn);
if (res > 0) /* it->fn AFTER fn */
node = node->rb_left;
else if (res < 0) /* it->fn BEFORE fn */
@@ -167,7 +155,7 @@

for (node = rb_first(>tree_root); node; node = rb_next(node)) {
it = container_of(node, struct pdch_ulc_node, node);
-   res = fn_cmp(it->fn, check_fn);
+   res = gsm0502_fncmp(it->fn, check_fn);
if (res > 0) { /* it->fn AFTER check_fn */
/* Next reserved FN is passed check_fn, hence it means 
check_fn is free */
return check_fn;
@@ -203,7 +191,7 @@
it = container_of(*n, struct pdch_ulc_node, node);

parent = *n;
-   res = fn_cmp(item->fn, it->fn);
+   res = gsm0502_fncmp(item->fn, it->fn);
if (res < 0) { /* item->fn "BEFORE" it->fn */
n = &((*n)->rb_left);
} else if (res > 0) { /* item->fn "AFTER" it->fn */
@@ -305,7 +293,7 @@
struct rb_node *first;
while ((first = rb_first(>tree_root))) {
item = container_of(first, struct pdch_ulc_node, node);
-   res = fn_cmp(item->fn, fn);
+   res = gsm0502_fncmp(item->fn, fn);
if (res > 0) /* item->fn AFTER fn */
break;
if (res < 0) { /* item->fn BEFORE fn */

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35338?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idd113e328a693df2e8f2f5d172eaf5bf2bfcf009
Gerrit-Change-Number: 35338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in libosmo-sccp[master]: cosmetic: Fix typo in function doc

2023-12-12 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35335?usp=email )


Change subject: cosmetic: Fix typo in function doc
..

cosmetic: Fix typo in function doc

Change-Id: I1c4fe7d1b3a5cdd4c2c9c942e292a7135467d9e2
---
M src/xua_asp_fsm.c
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/35335/1

diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index cc94ac7..cc9a13a 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -1180,7 +1180,7 @@
 };


-/*! \brief Start a new ASP finite stae machine for given ASP
+/*! \brief Start a new ASP finite state machine for given ASP
  *  \param[in] asp Application Server Process for which to start FSM
  *  \param[in] role Role (ASP, SG, IPSP) of this FSM
  *  \param[in] log_level Logging Level for ASP FSM logging

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35335?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I1c4fe7d1b3a5cdd4c2c9c942e292a7135467d9e2
Gerrit-Change-Number: 35335
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

2023-12-12 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35334?usp=email )


Change subject: vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()
..

vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()

Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e
Fixes: CID#322299
---
M src/osmo-bsc/vgcs_fsm.c
1 file changed, 13 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c
index 37473c5..1f2bbef 100644
--- a/src/osmo-bsc/vgcs_fsm.c
+++ b/src/osmo-bsc/vgcs_fsm.c
@@ -317,8 +317,10 @@
break;
case VGCS_EV_MSC_DTAP:
LOG_CALL(conn, LOGL_DEBUG, "MSC sends DTAP message to 
talker.\n");
-   if (!conn->vgcs_call.talker)
+   if (!conn->vgcs_call.talker) {
msgb_free(data);
+   break;
+   }
rc = 
osmo_fsm_inst_dispatch(conn->vgcs_call.talker->vgcs_chan.fi, VGCS_EV_MSC_DTAP, 
data);
if (rc < 0)
msgb_free(data);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e
Gerrit-Change-Number: 35334
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in osmo-msc[master]: silent_call: check return value of trans_alloc() against NULL

2023-12-12 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35333?usp=email )

Change subject: silent_call: check return value of trans_alloc() against NULL
..

silent_call: check return value of trans_alloc() against NULL

We're checking the result of trans_alloc() 6 out of 7 times, so check
it in gsm_silent_call_start() too, for the sake of consistency.

Change-Id: Ie989cd8146d66d9531cf3f3d84f46a2c6fcc2e5c
Fixes: CID#322140
---
M src/libmsc/silent_call.c
1 file changed, 18 insertions(+), 1 deletion(-)

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




diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index 3b95a90..4de12b9 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -140,7 +140,11 @@
struct vty *vty)
 {
struct gsm_network *net = vsub->vlr->user_ctx;
-   struct gsm_trans *trans = trans_alloc(net, vsub, TRANS_SILENT_CALL, 0, 
0);
+   struct gsm_trans *trans;
+
+   trans = trans_alloc(net, vsub, TRANS_SILENT_CALL, 0, 0);
+   if (trans == NULL)
+   return -ENODEV;

trans->silent_call.ct = *ct;
if (traffic_dst_ip) {

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie989cd8146d66d9531cf3f3d84f46a2c6fcc2e5c
Gerrit-Change-Number: 35333
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-msc[master]: silent_call: check return value of trans_alloc() against NULL

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35333?usp=email )

Change subject: silent_call: check return value of trans_alloc() against NULL
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie989cd8146d66d9531cf3f3d84f46a2c6fcc2e5c
Gerrit-Change-Number: 35333
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:39:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: silent_call: check return value of trans_alloc() against NULL

2023-12-12 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35333?usp=email )


Change subject: silent_call: check return value of trans_alloc() against NULL
..

silent_call: check return value of trans_alloc() against NULL

We're checking the result of trans_alloc() 6 out of 7 times, so check
it in gsm_silent_call_start() too, for the sake of consistency.

Change-Id: Ie989cd8146d66d9531cf3f3d84f46a2c6fcc2e5c
Fixes: CID#322140
---
M src/libmsc/silent_call.c
1 file changed, 18 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/33/35333/1

diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index 3b95a90..4de12b9 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -140,7 +140,11 @@
struct vty *vty)
 {
struct gsm_network *net = vsub->vlr->user_ctx;
-   struct gsm_trans *trans = trans_alloc(net, vsub, TRANS_SILENT_CALL, 0, 
0);
+   struct gsm_trans *trans;
+
+   trans = trans_alloc(net, vsub, TRANS_SILENT_CALL, 0, 0);
+   if (trans == NULL)
+   return -ENODEV;

trans->silent_call.ct = *ct;
if (traffic_dst_ip) {

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie989cd8146d66d9531cf3f3d84f46a2c6fcc2e5c
Gerrit-Change-Number: 35333
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> It's correct. […]
man 2 accept:

"""
The  addrlen  argument is a value-result argument: the caller must initialize 
it to contain the size (in bytes) of the structure pointed to by addr; on 
return it will contain the actual size of the peer address.

The returned address is truncated if the buffer provided is too small; in this 
case, addrlen will return a value greater than was  supplied  to  the call.

"""



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:33:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> Could you elaborate more please? […]
It's correct. the len passed to it needs to be the maximum size of the struct 
which can be copied in.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:32:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> This is wrong.
Could you elaborate more please?

We're passing a pointer to `osa.u.sa` (`struct sockaddr`) but sizeof 
`osa.u.sas` (`struct sockaddr_storage`) to `accept()`. Isn't this wrong?



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:29:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-assoc-status

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email )

Change subject: vty: Introduce show cs7 instance asp-assoc-status
..

vty: Introduce show cs7 instance asp-assoc-status

Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33
Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5
Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f
Related: SYS#6636
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
3 files changed, 182 insertions(+), 7 deletions(-)

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




diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1913dc6..25eeb6e 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -11,4 +11,4 @@
 libosmo-netif >1.4.0   osmo_stream_{srv,cli}_get_fd()
 libosmocore >1.9.0  osmo_sock_multiaddr_get_ip_and_port(), 
osmo_multiaddr_ip_and_port_snprintf()
 libosmocore >1.9.0  osmo_sock_sctp_get_peer_addr_info()
-libosmo-netif >1.4.0osmo_sctp_spinfo_state_str()
+libosmo-netif >1.4.0osmo_sctp_spinfo_state_str(), 
osmo_sctp_sstat_state_str()
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index fe015d9..1483ac0 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -28,6 +28,7 @@

 #include 
 #include 
+#include 

 #include 

@@ -1422,6 +1423,161 @@
return show_asp_remaddr(vty, id, asp_name);
 }

+static void show_one_asp_assoc_status_tcp(struct vty *vty, struct osmo_ss7_asp 
*asp)
+{
+   struct osmo_sockaddr osa = {};
+   struct tcp_info tcpi = {};
+   socklen_t len;
+   int fd, rc;
+   int rx_pend_bytes = 0;
+
+   fd = ss7_asp_get_fd(asp);
+   if (fd < 0) {
+   vty_out(vty, "%-12s  uninitialized%s", asp->cfg.name, 
VTY_NEWLINE);
+   return;
+   }
+
+   len = sizeof(osa.u.sas);
+   rc = getpeername(fd, , );
+
+   len = sizeof(tcpi);
+   rc = getsockopt(fd, SOL_TCP, TCP_INFO, , );
+   if (rc < 0) {
+   char buf_err[128];
+   strerror_r(errno, buf_err, sizeof(buf_err));
+   vty_out(vty, "%-12s  getsockopt(TCP_INFO) failed: %s%s",
+   asp->cfg.name, buf_err, VTY_NEWLINE);
+   return;
+   }
+
+   rc = ioctl(fd, FIONREAD, _pend_bytes);
+
+   /* FIXME: RWND: struct tcp_info from linux/tcp.h contains more fields
+* than the one from netinet/tcp.h we currently use, including
+* "tcpi_rcv_wnd" which we could use to print RWND here. However,
+* linux/tcp.h seems to be missing the state defines used in
+* "tcp_info_state_values", so we cannot use that one instead.
+*/
+
+   vty_out(vty, "%-12s  TCP_%-19s  %-9s  %-10s  %-8s  %-9u  %-7u  %-9u  
%-46s%s",
+   asp->cfg.name,
+   get_value_string(tcp_info_state_values, tcpi.tcpi_state),
+   "-", "-", "-", tcpi.tcpi_unacked, rx_pend_bytes,
+   tcpi.tcpi_pmtu, osmo_sockaddr_to_str(),
+   VTY_NEWLINE);
+}
+
+#ifdef HAVE_LIBSCTP
+static void show_one_asp_assoc_status_sctp(struct vty *vty, struct 
osmo_ss7_asp *asp)
+{
+   struct osmo_sockaddr osa = {};
+   struct sctp_status st;
+   socklen_t len;
+   int fd, rc;
+
+   fd = ss7_asp_get_fd(asp);
+   if (fd < 0) {
+   vty_out(vty, "%-12s  uninitialized%s", asp->cfg.name, 
VTY_NEWLINE);
+   return;
+   }
+
+   memset(, 0, sizeof(st));
+   len = sizeof(st);
+   rc = getsockopt(fd, IPPROTO_SCTP, SCTP_STATUS, , );
+   if (rc < 0) {
+   char buf_err[128];
+   strerror_r(errno, buf_err, sizeof(buf_err));
+   vty_out(vty, "%-12s  getsockopt(SCTP_STATUS) failed: %s%s", 
asp->cfg.name, buf_err, VTY_NEWLINE);
+   return;
+   }
+
+   osa.u.sas = st.sstat_primary.spinfo_address;
+   vty_out(vty, "%-12s  SCTP_%-18s  %-9u  %-10u  %-8u  %-9u  %-7u  %-9u  
%-46s%s",
+   asp->cfg.name,
+   osmo_sctp_sstat_state_str(st.sstat_state),
+   st.sstat_instrms, st.sstat_outstrms,
+   st.sstat_rwnd, st.sstat_unackdata, st.sstat_penddata,
+   st.sstat_fragmentation_point,
+   osmo_sockaddr_to_str(),
+   VTY_NEWLINE);
+}
+#endif
+
+static void show_one_asp_assoc_status(struct vty *vty, struct osmo_ss7_asp 
*asp)
+{
+   int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto);
+
+   switch (proto) {
+   case IPPROTO_TCP:
+   show_one_asp_assoc_status_tcp(vty, asp);
+   break;
+#ifdef HAVE_LIBSCTP
+   case IPPROTO_SCTP:
+   show_one_asp_assoc_status_sctp(vty, asp);
+   break;
+#endif
+   default:
+   vty_out(vty, "%-12s  unknown proto %u%s", asp->cfg.name, proto, 
VTY_NEWLINE);
+   break;
+   }

[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-remaddr

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email )

Change subject: vty: Introduce show cs7 instance asp-remaddr
..

vty: Introduce show cs7 instance asp-remaddr

Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5
Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f
Related: SYS#6636
Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
3 files changed, 204 insertions(+), 5 deletions(-)

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




diff --git a/TODO-RELEASE b/TODO-RELEASE
index c7771bd..1913dc6 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,5 @@
 libosmocore >1.9.0  osmo_sock_multiaddr_{add,del}_local_addr()
 libosmo-netif >1.4.0   osmo_stream_{srv,cli}_get_fd()
 libosmocore >1.9.0  osmo_sock_multiaddr_get_ip_and_port(), 
osmo_multiaddr_ip_and_port_snprintf()
+libosmocore >1.9.0  osmo_sock_sctp_get_peer_addr_info()
+libosmo-netif >1.4.0osmo_sctp_spinfo_state_str()
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index d6400ee..fe015d9 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -47,6 +47,13 @@
 #include "sccp_internal.h"
 #include "ss7_internal.h"

+#include 
+
+#ifdef HAVE_LIBSCTP
+#include 
+#include 
+#endif
+
 #define XUA_VAR_STR"(sua|m3ua|ipa)"

 #define XUA_VAR_HELP_STR   \
@@ -54,6 +61,22 @@
"MTP3 User Adaptation\n"\
"IPA Multiplex (SCCP Lite)\n"

+/* netinet/tcp.h */
+static const struct value_string tcp_info_state_values[] = {
+   { TCP_ESTABLISHED,  "ESTABLISHED" },
+   { TCP_SYN_SENT, "SYN_SENT" },
+   { TCP_SYN_RECV, "SYN_RECV" },
+   { TCP_FIN_WAIT1,"FIN_WAIT1" },
+   { TCP_FIN_WAIT2,"FIN_WAIT2" },
+   { TCP_TIME_WAIT,"TIME_WAIT" },
+   { TCP_CLOSE,"CLOSE" },
+   { TCP_CLOSE_WAIT,   "CLOSE_WAIT" },
+   { TCP_LAST_ACK, "LAST_ACK" },
+   { TCP_LISTEN,   "LISTEN" },
+   { TCP_CLOSING,  "CLOSING" },
+   {}
+};
+
 static const struct value_string asp_quirk_names[] = {
{ OSMO_SS7_ASP_QUIRK_NO_NOTIFY, "no_notify" },
{ OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP,   "daud_in_asp" },
@@ -1244,6 +1267,161 @@
return show_asp(vty, id, asp_name);
 }

+static void show_one_asp_remaddr_tcp(struct vty *vty, struct osmo_ss7_asp *asp)
+{
+   struct osmo_sockaddr osa = {};
+   struct tcp_info tcpi = {};
+   socklen_t len;
+   int fd, rc;
+
+   fd = ss7_asp_get_fd(asp);
+   if (fd < 0) {
+   vty_out(vty, "%-12s  %-46s  uninitialized%s", asp->cfg.name, 
"", VTY_NEWLINE);
+   return;
+   }
+
+   len = sizeof(osa.u.sas);
+   rc = getpeername(fd, , );
+
+   len = sizeof(tcpi);
+   rc = getsockopt(fd, SOL_TCP, TCP_INFO, , );
+   if (rc < 0) {
+   char buf_err[128];
+   strerror_r(errno, buf_err, sizeof(buf_err));
+   vty_out(vty, "%-12s  %-46s  getsockopt(TCP_INFO) failed: %s%s",
+   asp->cfg.name, osmo_sockaddr_to_str(), buf_err, 
VTY_NEWLINE);
+   return;
+   }
+
+   vty_out(vty, "%-12s  %-46s  TCP_%-19s  %-8u  %-8u  %-8u  %-8u%s",
+   asp->cfg.name,
+   osmo_sockaddr_to_str(),
+   get_value_string(tcp_info_state_values, tcpi.tcpi_state),
+   tcpi.tcpi_snd_cwnd, tcpi.tcpi_rtt,
+   tcpi.tcpi_rto, tcpi.tcpi_pmtu,
+   VTY_NEWLINE);
+}
+
+#ifdef HAVE_LIBSCTP
+static void show_one_asp_remaddr_sctp(struct vty *vty, struct osmo_ss7_asp 
*asp)
+{
+   struct sctp_paddrinfo pinfo[OSMO_SOCK_MAX_ADDRS];
+   struct osmo_sockaddr osa = {};
+   size_t pinfo_cnt = ARRAY_SIZE(pinfo);
+   bool more_needed;
+   int fd, rc;
+   unsigned int i;
+
+   fd = ss7_asp_get_fd(asp);
+   if (fd < 0) {
+   vty_out(vty, "%-12s  %-46s  uninitialized%s", asp->cfg.name, 
"", VTY_NEWLINE);
+   return;
+   }
+
+   rc = osmo_sock_sctp_get_peer_addr_info(fd, [0], _cnt);
+   if (rc < 0) {
+   char buf_err[128];
+   strerror_r(errno, buf_err, sizeof(buf_err));
+   vty_out(vty, "%-12s  %-46s  getsockopt(SCTP_GET_PEER_ADDR_INFO) 
failed: %s%s", asp->cfg.name, "", buf_err, VTY_NEWLINE);
+   return;
+   }
+
+   more_needed = pinfo_cnt > ARRAY_SIZE(pinfo);
+   if (pinfo_cnt > ARRAY_SIZE(pinfo))
+   pinfo_cnt = ARRAY_SIZE(pinfo);
+
+   for (i = 0; i < pinfo_cnt; i++) {
+   osa.u.sas = pinfo[i].spinfo_address;
+   

[M] Change in libosmo-sccp[master]: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email )

Change subject: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'
..

vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'

Allow printing only a specific asp by name. Useful when user is only
interested in a uniqe ASP and there's lots of them configured.

Related: SYS#6636
Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336
---
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
2 files changed, 84 insertions(+), 30 deletions(-)

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




diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 7350c13..d6400ee 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1160,14 +1160,39 @@
return buf;
 }

-DEFUN(show_cs7_asp, show_cs7_asp_cmd,
-   "show cs7 instance <0-15> asp",
-   SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n")
+static void show_one_asp(struct vty *vty, struct osmo_ss7_asp *asp)
+{
+   char as_buf[64];
+   char buf_loc[OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN];
+   char buf_rem[sizeof(buf_loc)];
+
+   int fd = ss7_asp_get_fd(asp);
+   if (fd > 0) {
+   int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto);
+   if (!get_sockname_buf(buf_loc, sizeof(buf_loc), fd, proto, 
true))
+   OSMO_STRLCPY_ARRAY(buf_loc, "");
+   if (!get_sockname_buf(buf_rem, sizeof(buf_rem), fd, proto, 
false))
+   OSMO_STRLCPY_ARRAY(buf_rem, "");
+   } else {
+   osmo_ss7_asp_peer_snprintf(buf_loc, sizeof(buf_loc), 
>cfg.local);
+   osmo_ss7_asp_peer_snprintf(buf_rem, sizeof(buf_rem), 
>cfg.remote);
+   }
+
+   vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-4s  %-9s  %-23s  %-23s%s",
+   asp->cfg.name,
+   as_list_for_asp(asp, as_buf, sizeof(as_buf)),
+   asp->fi ? osmo_fsm_inst_state_name(asp->fi) : "uninitialized",
+   get_value_string(osmo_ss7_asp_protocol_vals, asp->cfg.proto),
+   osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, 
asp->cfg.role)),
+   asp->cfg.is_server ? "server" : "client",
+   buf_loc, buf_rem,
+   VTY_NEWLINE);
+}
+
+static int show_asp(struct vty *vty, int id, const char *asp_name)
 {
struct osmo_ss7_instance *inst;
-   struct osmo_ss7_asp *asp;
-   char as_buf[64];
-   int id = atoi(argv[0]);
+   struct osmo_ss7_asp *asp = NULL;

inst = osmo_ss7_instance_find(id);
if (!inst) {
@@ -1175,37 +1200,50 @@
return CMD_WARNING;
}

+   if (asp_name) {
+   asp = osmo_ss7_asp_find_by_name(inst, asp_name);
+   if (!asp) {
+   vty_out(vty, "No ASP %s found%s", asp_name, 
VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+   }
+
vty_out(vty, "ASP Name  AS Name   State  Type  Role  
SCTP Role  Local Addresses  Remote Addresses%s", VTY_NEWLINE);
vty_out(vty, "    -      
-  ---  ---%s", VTY_NEWLINE);

-   llist_for_each_entry(asp, >asp_list, list) {
-   char buf_loc[OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN];
-   char buf_rem[sizeof(buf_loc)];
-   int fd = ss7_asp_get_fd(asp);
-   if (fd > 0) {
-   int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto);
-   if (!get_sockname_buf(buf_loc, sizeof(buf_loc), fd, 
proto, true))
-   OSMO_STRLCPY_ARRAY(buf_loc, "");
-   if (!get_sockname_buf(buf_rem, sizeof(buf_rem), fd, 
proto, false))
-   OSMO_STRLCPY_ARRAY(buf_rem, "");
-   } else {
-   osmo_ss7_asp_peer_snprintf(buf_loc, sizeof(buf_loc), 
>cfg.local);
-   osmo_ss7_asp_peer_snprintf(buf_rem, sizeof(buf_rem), 
>cfg.remote);
-   }
-
-   vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-4s  %-9s  %-23s  
%-23s%s",
-   asp->cfg.name,
-   as_list_for_asp(asp, as_buf, sizeof(as_buf)),
-   asp->fi? osmo_fsm_inst_state_name(asp->fi) : 
"uninitialized",
-   get_value_string(osmo_ss7_asp_protocol_vals, 
asp->cfg.proto),
-   
osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)),
-   asp->cfg.is_server ? "server" : "client",
-   buf_loc, buf_rem,
-   VTY_NEWLINE);
+   if (asp) {
+   show_one_asp(vty, asp);
+   return CMD_SUCCESS;
}
+
+   llist_for_each_entry(asp, >asp_list, list)
+  

[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email )

Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved 
from socket
..

vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

Until now, we were in general printing the list of remote addresses that
were stored in config, because we didn't have an easy way to retrieve
the addresses from the socket. Since recently some libosmocore APIs make
that easy, so use them now.
If the socket is not yet created, then log the addrress list from the config.

Furthermore, take the chance to print now both local and remote
addresses.

Related: SYS#6636
Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
---
M src/osmo_ss7_asp.c
M src/osmo_ss7_vty.c
M src/ss7_internal.h
M tests/vty/ss7_asp_test.vty
4 files changed, 104 insertions(+), 46 deletions(-)

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




diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 55e5a29..f867ce5 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -1134,3 +1134,19 @@
 {
return asp->cfg.proto;
 }
+
+/*! \brief Get the fd of a given ASP
+ *  \param[in] asp The ASP for which the fd is requested
+ *  \returns The fd of the ASP if acailable, negative otherwise
+ */
+int ss7_asp_get_fd(const struct osmo_ss7_asp *asp)
+{
+   if (asp->cfg.is_server) {
+   if (asp->server)
+   return osmo_stream_srv_get_fd(asp->server);
+   } else {
+   if (asp->client)
+   return osmo_stream_cli_get_fd(asp->client);
+   }
+   return -1;
+}
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 39d5b3b..7350c13 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1133,13 +1133,39 @@
return buf;
 }

+/* Similar to osmo_sock_multiaddr_get_name_buf(), but aimed at listening 
sockets (only local part): */
+static char *get_sockname_buf(char *buf, size_t buf_len, int fd, int proto, 
bool local)
+{
+   char hostbuf[OSMO_SOCK_MAX_ADDRS][INET6_ADDRSTRLEN];
+   size_t num_hostbuf = ARRAY_SIZE(hostbuf);
+   char portbuf[6];
+   struct osmo_strbuf sb = { .buf = buf, .len = buf_len };
+   bool need_more_bufs;
+   int rc;
+
+   rc = osmo_sock_multiaddr_get_ip_and_port(fd, proto, [0][0],
+_hostbuf, 
sizeof(hostbuf[0]),
+portbuf, sizeof(portbuf), 
local);
+   if (rc < 0)
+   return NULL;
+
+   need_more_bufs = num_hostbuf > ARRAY_SIZE(hostbuf);
+   if (need_more_bufs)
+   num_hostbuf = ARRAY_SIZE(hostbuf);
+   OSMO_STRBUF_APPEND(sb, osmo_multiaddr_ip_and_port_snprintf,
+  [0][0], num_hostbuf, sizeof(hostbuf[0]), 
portbuf);
+   if (need_more_bufs)
+   OSMO_STRBUF_PRINTF(sb, "");
+
+   return buf;
+}
+
 DEFUN(show_cs7_asp, show_cs7_asp_cmd,
"show cs7 instance <0-15> asp",
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n")
 {
struct osmo_ss7_instance *inst;
struct osmo_ss7_asp *asp;
-   char buf[512];
char as_buf[64];
int id = atoi(argv[0]);

@@ -1149,28 +1175,32 @@
return CMD_WARNING;
}

-   vty_out(vty, "  
Current Primary Link%s", VTY_NEWLINE);
-   vty_out(vty, "ASP Name  AS Name   State  Type  Role  
SCTP Role  Remote Addresses%s", VTY_NEWLINE);
-   vty_out(vty, "    -      
-  ---%s", VTY_NEWLINE);
+   vty_out(vty, "ASP Name  AS Name   State  Type  Role  
SCTP Role  Local Addresses  Remote Addresses%s", VTY_NEWLINE);
+   vty_out(vty, "    -      
-  ---  ---%s", VTY_NEWLINE);

llist_for_each_entry(asp, >asp_list, list) {
-   if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA && 
asp->cfg.remote.port == 0 && asp->server) {
-   int fd = osmo_stream_srv_get_fd(asp->server);
-   char hostbuf[64];
-   char portbuf[16];
-   osmo_sock_get_ip_and_port(fd, hostbuf, sizeof(hostbuf),
- portbuf, sizeof(portbuf), 
false);
-   snprintf(buf, sizeof(buf), "%s:%s", hostbuf, portbuf);
-   } else
-   osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), 
>cfg.remote);
-   vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-4s  %-9s  %-23s%s",
+   char buf_loc[OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN];
+   char 

[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address...

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email )

Change subject: vty: show cs7 instance asp: Swap columns SCTP Role and Remote 
Address list
..

vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list

The Remote Address is by far the potentially largest column, as well as
the one with more variable length, so move it to the end for better formatting.

Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
3 files changed, 49 insertions(+), 37 deletions(-)

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




diff --git a/TODO-RELEASE b/TODO-RELEASE
index 2b15a91..c7771bd 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,4 +9,4 @@
 #library   whatdescription / commit summary line
 libosmocore >1.9.0  osmo_sock_multiaddr_{add,del}_local_addr()
 libosmo-netif >1.4.0   osmo_stream_{srv,cli}_get_fd()
-libosmocore >1.9,0  osmo_sock_multiaddr_get_ip_and_port(), 
osmo_multiaddr_ip_and_port_snprintf()
\ No newline at end of file
+libosmocore >1.9.0  osmo_sock_multiaddr_get_ip_and_port(), 
osmo_multiaddr_ip_and_port_snprintf()
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 6c36768..39d5b3b 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1149,9 +1149,9 @@
return CMD_WARNING;
}

-   vty_out(vty, "   
Current Primary Link%s", VTY_NEWLINE);
-   vty_out(vty, "ASP Name  AS Name   State  Type  Role  
Remote IPaddr & Port SCTP Role%s", VTY_NEWLINE);
-   vty_out(vty, "    -      
---  -%s", VTY_NEWLINE);
+   vty_out(vty, "  
Current Primary Link%s", VTY_NEWLINE);
+   vty_out(vty, "ASP Name  AS Name   State  Type  Role  
SCTP Role  Remote Addresses%s", VTY_NEWLINE);
+   vty_out(vty, "    -      
-  ---%s", VTY_NEWLINE);

llist_for_each_entry(asp, >asp_list, list) {
if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA && 
asp->cfg.remote.port == 0 && asp->server) {
@@ -1163,14 +1163,14 @@
snprintf(buf, sizeof(buf), "%s:%s", hostbuf, portbuf);
} else
osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), 
>cfg.remote);
-   vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-4s  %-23s  %-9s%s",
+   vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-4s  %-9s  %-23s%s",
asp->cfg.name,
as_list_for_asp(asp, as_buf, sizeof(as_buf)),
asp->fi? osmo_fsm_inst_state_name(asp->fi) : 
"uninitialized",
get_value_string(osmo_ss7_asp_protocol_vals, 
asp->cfg.proto),

osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)),
-   buf,
asp->cfg.is_server ? "server" : "client",
+   buf,
VTY_NEWLINE);
}
return CMD_SUCCESS;
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index dcea4ca..73a13b5 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -256,27 +256,27 @@
 ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.200
 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.100
 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp
-   Current Primary Link
-ASP Name  AS Name   State  Type  Role  Remote IPaddr & Port
 SCTP Role
-    -      --- 
 -
-my-asp? uninitialized  m3ua  sg127.0.0.200:12345   
 server
+  Current 
Primary Link
+ASP Name  AS Name   State  Type  Role  SCTP Role  Remote 
Addresses
+    -      -  
---
+my-asp? uninitialized  m3ua  sgserver 
127.0.0.200:12345
 ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201
 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.101
 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp
-   Current Primary Link
-ASP Name  AS Name   State  Type  Role  Remote IPaddr & Port
 SCTP Role
-    -      --- 
 -
-my-asp? 

[S] Change in libosmo-sccp[master]: vty: Retrieve IP addr set from sk when dumping xUA server

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email )

Change subject: vty: Retrieve IP addr set from sk when dumping xUA server
..

vty: Retrieve IP addr set from sk when dumping xUA server

Until now we simply printed back the configured set of IP addresses, not
the one retrieved from the socket at the time, because we didn't have
any easy means to retrieve multiple addresses from a socket.
This is possible since recently using libosmocore APIs. Use them.

Depends: libosmo-netif.git Change-Id I1bd3f790d93af74c150938a59108b882ad2820f3
Depends: libosmocore.git Change-Id I18a0e1a652a3e8ef3e97154355eb1d07a14ef0bd
Related: SYS#6636
Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
2 files changed, 44 insertions(+), 4 deletions(-)

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




diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1e4c41a..2b15a91 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,3 +9,4 @@
 #library   whatdescription / commit summary line
 libosmocore >1.9.0  osmo_sock_multiaddr_{add,del}_local_addr()
 libosmo-netif >1.4.0   osmo_stream_{srv,cli}_get_fd()
+libosmocore >1.9,0  osmo_sock_multiaddr_get_ip_and_port(), 
osmo_multiaddr_ip_and_port_snprintf()
\ No newline at end of file
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 5a637b4..6c36768 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -610,11 +610,33 @@

 static void vty_dump_xua_server(struct vty *vty, struct osmo_xua_server *xs)
 {
-   char buf[512];
+   char buf[OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN];
const char *proto = get_value_string(osmo_ss7_asp_protocol_vals, 
xs->cfg.proto);
-   if (osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), >cfg.local) < 0)
-   snprintf(buf, sizeof(buf), "");
-   vty_out(vty, "xUA server for %s on %s%s", proto, buf, VTY_NEWLINE);
+   int fd = xs->server ? osmo_stream_srv_link_get_fd(xs->server) : -1;
+
+   if (fd < 0) {
+   if (osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), 
>cfg.local) < 0)
+   snprintf(buf, sizeof(buf), "");
+   } else {
+   char hostbuf[OSMO_SOCK_MAX_ADDRS][INET6_ADDRSTRLEN];
+   size_t num_hostbuf = ARRAY_SIZE(hostbuf);
+   char portbuf[6];
+   int rc;
+   rc = osmo_sock_multiaddr_get_ip_and_port(fd, 
ss7_asp_proto_to_ip_proto(xs->cfg.proto),
+[0][0], 
_hostbuf, sizeof(hostbuf[0]),
+portbuf, 
sizeof(portbuf), true);
+   if (rc < 0) {
+   snprintf(buf, sizeof(buf), "");
+   } else {
+   if (num_hostbuf > ARRAY_SIZE(hostbuf))
+   num_hostbuf = ARRAY_SIZE(hostbuf);
+   osmo_multiaddr_ip_and_port_snprintf(buf, sizeof(buf),
+   [0][0], 
num_hostbuf, sizeof(hostbuf[0]),
+   portbuf);
+   }
+   }
+   vty_out(vty, "xUA server for %s on %s is %s%s",
+   proto, buf, fd >= 0 ? "listening" : "inactive", VTY_NEWLINE);
 }

 DEFUN(show_cs7_xua, show_cs7_xua_cmd,

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
Gerrit-Change-Number: 35242
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-assoc-status

2023-12-12 Thread pespin
Attention is currently required from: daniel.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email )

Change subject: vty: Introduce show cs7 instance asp-assoc-status
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33
Gerrit-Change-Number: 35284
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:26:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-assoc-status

2023-12-12 Thread osmith
Attention is currently required from: daniel, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email )

Change subject: vty: Introduce show cs7 instance asp-assoc-status
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33
Gerrit-Change-Number: 35284
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:26:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-remaddr

2023-12-12 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email )

Change subject: vty: Introduce show cs7 instance asp-remaddr
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0
Gerrit-Change-Number: 35281
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:25:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email )

Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved 
from socket
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
Gerrit-Change-Number: 35274
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:25:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'

2023-12-12 Thread osmith
Attention is currently required from: fixeria, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email )

Change subject: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336
Gerrit-Change-Number: 35275
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:25:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-sccp[master]: vty: Retrieve IP addr set from sk when dumping xUA server

2023-12-12 Thread pespin
Attention is currently required from: fixeria, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email )

Change subject: vty: Retrieve IP addr set from sk when dumping xUA server
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
Gerrit-Change-Number: 35242
Gerrit-PatchSet: 3
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: Tue, 12 Dec 2023 15:25:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address...

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email )

Change subject: vty: show cs7 instance asp: Swap columns SCTP Role and Remote 
Address list
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd
Gerrit-Change-Number: 35253
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:25:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

2023-12-12 Thread osmith
Attention is currently required from: fixeria, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email )

Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved 
from socket
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
Gerrit-Change-Number: 35274
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:24:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-sccp[master]: vty: Retrieve IP addr set from sk when dumping xUA server

2023-12-12 Thread osmith
Attention is currently required from: fixeria, laforge, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email )

Change subject: vty: Retrieve IP addr set from sk when dumping xUA server
..


Patch Set 3: Code-Review+1

(1 comment)

File src/osmo_ss7_vty.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/35242/comment/3bd4cb52_78a7e750
PS2, Line 632:  num_hostbuf = ARRAY_SIZE(hostbuf);
> Because in libosmocore I'm already using a strbuf and it was easy. […]
Ack



--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
Gerrit-Change-Number: 35242
Gerrit-PatchSet: 3
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: Tue, 12 Dec 2023 15:23:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: socket: Introduce defines OSMO_SOCK_MULTIADDR_{PEER_STR,NAME}_MAXLEN

2023-12-12 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35330?usp=email )

Change subject: socket: Introduce defines 
OSMO_SOCK_MULTIADDR_{PEER_STR,NAME}_MAXLEN
..


Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
very nice, thanks!



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35330?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I18a0e1a652a3e8ef3e97154355eb1d07a14ef0bd
Gerrit-Change-Number: 35330
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:19:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1: 
This is wrong.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:19:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )


Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..

osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Fixes: CID#321414
---
M src/stream_srv.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/32/35332/1

diff --git a/src/stream_srv.c b/src/stream_srv.c
index 0dca10a..7cad4c4 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -117,7 +117,7 @@
int ret;
int sock_fd;
struct osmo_sockaddr osa;
-   socklen_t sa_len = sizeof(osa.u.sas);
+   socklen_t sa_len = sizeof(osa.u.sa);
struct osmo_stream_srv_link *link = ofd->data;

ret = accept(ofd->fd, , _len);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[M] Change in libosmo-netif[master]: stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the ...

2023-12-12 Thread pespin
Attention is currently required from: laforge, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email )

Change subject: stream_srv_link: osmo_stream_srv_link_get_sockname() now 
returns the full set of addresses
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I216502a9aeafe638940f110bc9fddf2504b2ac3a
Gerrit-Change-Number: 35287
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:17:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the ...

2023-12-12 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email )

Change subject: stream_srv_link: osmo_stream_srv_link_get_sockname() now 
returns the full set of addresses
..

stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the full set 
of addresses

As a result, internal stream_srv_link logging will also show the whole
set of listening addresses. This is mostly fine since it mainly happens
only once, during connection accept(), and this way it provides full
view of where from and where to the client connected.

Depends: libosmocore.git Change-Id I18a0e1a652a3e8ef3e97154355eb1d07a14ef0bd
Related: SYS#5581
Change-Id: I216502a9aeafe638940f110bc9fddf2504b2ac3a
---
M src/stream_srv.c
1 file changed, 48 insertions(+), 12 deletions(-)

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




diff --git a/src/stream_srv.c b/src/stream_srv.c
index 0dca10a..dbf8aed 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -85,7 +85,7 @@
 struct osmo_stream_srv_link {
struct osmo_fd  ofd;
char*name;
-   charsockname[OSMO_SOCK_NAME_MAXLEN];
+   charsockname[OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN];
char*addr[OSMO_STREAM_MAX_ADDRS];
uint8_t addrcnt;
uint16_tport;
@@ -338,22 +338,42 @@
return link->data;
 }

+/* Similar to osmo_sock_multiaddr_get_name_buf(), but aimed at listening 
sockets (only local part): */
+static char *get_local_sockname_buf(char *buf, size_t buf_len, int fd, int 
proto)
+{
+   char hostbuf[OSMO_STREAM_MAX_ADDRS][INET6_ADDRSTRLEN];
+   size_t num_hostbuf = ARRAY_SIZE(hostbuf);
+   char portbuf[6];
+   struct osmo_strbuf sb = { .buf = buf, .len = buf_len };
+   bool need_more_bufs;
+   int rc;
+
+   rc = osmo_sock_multiaddr_get_ip_and_port(fd, proto, [0][0],
+_hostbuf, 
sizeof(hostbuf[0]),
+portbuf, sizeof(portbuf), 
true);
+   if (rc < 0)
+   return NULL;
+
+   need_more_bufs = num_hostbuf > ARRAY_SIZE(hostbuf);
+   if (need_more_bufs)
+   num_hostbuf = ARRAY_SIZE(hostbuf);
+   OSMO_STRBUF_APPEND(sb, osmo_multiaddr_ip_and_port_snprintf,
+  [0][0], num_hostbuf, sizeof(hostbuf[0]), 
portbuf);
+   if (need_more_bufs)
+   OSMO_STRBUF_PRINTF(sb, "");
+
+   return buf;
+}
+
 /*! \brief Get description of the stream server link e. g. 127.0.0.1:1234
  *  \param[in] link Stream Server Link to examine
  *  \returns Link description or NULL in case of error */
 char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link 
*link)
 {
-   static char buf[INET6_ADDRSTRLEN + 6];
-   int rc = osmo_sock_get_local_ip(link->ofd.fd, buf, INET6_ADDRSTRLEN);
-   if (rc < 0)
+   static char buf[sizeof(link->sockname)];
+
+   if (!get_local_sockname_buf(buf, sizeof(buf), link->ofd.fd, 
link->proto))
return NULL;
-
-   buf[strnlen(buf, INET6_ADDRSTRLEN + 6)] = ':';
-
-   rc = osmo_sock_get_local_ip_port(link->ofd.fd, buf + strnlen(buf, 
INET6_ADDRSTRLEN + 6), 6);
-   if (rc < 0)
-   return NULL;
-
return buf;
 }

@@ -443,7 +463,7 @@
return -EIO;
}

-   OSMO_STRLCPY_ARRAY(link->sockname, 
osmo_stream_srv_link_get_sockname(link));
+   get_local_sockname_buf(link->sockname, sizeof(link->sockname), 
link->ofd.fd, link->proto);
return 0;
 }


--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I216502a9aeafe638940f110bc9fddf2504b2ac3a
Gerrit-Change-Number: 35287
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in libosmo-sccp[master]: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'

2023-12-12 Thread pespin
Attention is currently required from: fixeria, osmith, pespin.

Hello Jenkins Builder, fixeria, osmith,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'
..

vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'

Allow printing only a specific asp by name. Useful when user is only
interested in a uniqe ASP and there's lots of them configured.

Related: SYS#6636
Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336
---
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
2 files changed, 84 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/35275/4
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336
Gerrit-Change-Number: 35275
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-assoc-status

2023-12-12 Thread pespin
Attention is currently required from: daniel, osmith, pespin.

Hello Jenkins Builder, daniel, osmith,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by daniel, Code-Review+1 by osmith, Verified-1 by Jenkins Builder


Change subject: vty: Introduce show cs7 instance asp-assoc-status
..

vty: Introduce show cs7 instance asp-assoc-status

Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33
Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5
Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f
Related: SYS#6636
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
3 files changed, 182 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/84/35284/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33
Gerrit-Change-Number: 35284
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-sccp[master]: vty: Retrieve IP addr set from sk when dumping xUA server

2023-12-12 Thread pespin
Attention is currently required from: fixeria, laforge, osmith.

Hello Jenkins Builder, fixeria, laforge, osmith,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: vty: Retrieve IP addr set from sk when dumping xUA server
..

vty: Retrieve IP addr set from sk when dumping xUA server

Until now we simply printed back the configured set of IP addresses, not
the one retrieved from the socket at the time, because we didn't have
any easy means to retrieve multiple addresses from a socket.
This is possible since recently using libosmocore APIs. Use them.

Depends: libosmo-netif.git Change-Id I1bd3f790d93af74c150938a59108b882ad2820f3
Depends: libosmocore.git Change-Id I18a0e1a652a3e8ef3e97154355eb1d07a14ef0bd
Related: SYS#6636
Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
---
M TODO-RELEASE
M src/osmo_ss7_vty.c
2 files changed, 44 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/42/35242/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35242?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I331b6e2fe11cd97e286b7ba684d4a17b8055f9d4
Gerrit-Change-Number: 35242
Gerrit-PatchSet: 3
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-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

2023-12-12 Thread pespin
Attention is currently required from: fixeria, osmith.

Hello Jenkins Builder, osmith,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved 
from socket
..

vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

Until now, we were in general printing the list of remote addresses that
were stored in config, because we didn't have an easy way to retrieve
the addresses from the socket. Since recently some libosmocore APIs make
that easy, so use them now.
If the socket is not yet created, then log the addrress list from the config.

Furthermore, take the chance to print now both local and remote
addresses.

Related: SYS#6636
Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
---
M src/osmo_ss7_asp.c
M src/osmo_ss7_vty.c
M src/ss7_internal.h
M tests/vty/ss7_asp_test.vty
4 files changed, 104 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/35274/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
Gerrit-Change-Number: 35274
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket

2023-12-12 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email )

Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved 
from socket
..


Patch Set 2:

(2 comments)

File src/osmo_ss7_vty.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/35274/comment/8ed22aba_8713fd2a
PS2, Line 1152: Current Primary Link
> So `Current Primary Link` is not the case anymore? […]
It is added in a follow-up patch where one can print the assoc info.
In here I opted for printing more general information to identify each ASP.


https://gerrit.osmocom.org/c/libosmo-sccp/+/35274/comment/7aad8305_fe8db384
PS2, Line 1182: OSMO_SOCK_MAX_ADDRS * INET6_ADDRSTRLEN + OSMO_SOCK_MAX_ADDRS + 
2 + 6 + 1
> (put in a define somewhere? https://gerrit.osmocom. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea
Gerrit-Change-Number: 35274
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:06:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


  1   2   >